Changes from arch/CVS synchronization
[bpt/guile.git] / libguile / ChangeLog
1 2007-10-27 Ludovic Courtès <ludo@gnu.org>
2
3 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
4 containing the port. Fixes a bug in the new port table (2007-08-26).
5 (scm_evict_ports): Use `scm_c_port_for_each ()'.
6
7 2007-10-21 Neil Jerram <neil@ossau.uklinux.net>
8
9 * eval.c (unmemoize_delay): Extend the environment before
10 unmemoizing the promise thunk. This fixes a segmentation fault
11 reported by Frank Schwidom.
12
13 2007-10-20 Julian Graham <joolean@gmail.com>
14
15 Add support for thread cancellation and user-defined thread
16 cleanup handlers. Small rework by Ludovic Courtès.
17
18 * null-threads.h (scm_i_pthread_cancel,
19 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
20 * pthread-threads.h (scm_i_pthread_cancel,
21 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
22 * scmsigs.c (scm_i_signal_delivery_thread,
23 signal_delivery_thread_mutex): New.
24 (signal_delivery_thread): Leave when `read_without_guile ()'
25 returns zero.
26 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
27 before spawning the thread. Initialize
28 SCM_I_SIGNAL_DELIVERY_THREAD.
29 (ensure_signal_delivery_thread): Renamed to...
30 (scm_i_ensure_signal_delivery_thread): this.
31 (scm_i_close_signal_pipe): New.
32 * scmsigs.h: Updated.
33 * threads.c (thread_mark): Mark `t->cleanup_handler'.
34 (guilify_self_1): Initialize `t->cleanup_handler' and
35 `t->canceled'.
36 (do_thread_exit): Invoke `t->cleanup_handler'.
37 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
38 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
39 vanishes.
40 (scm_leave_guile_cleanup): New.
41 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
42 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
43 than call `scm_leave_guile ()' after FUNC.
44 (scm_cancel_thread, scm_set_thread_cleanup_x,
45 scm_threads_cleanup): New.
46 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
47 returned list.
48 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
49 fields.
50 Add declarations of new functions.
51
52 2007-10-17 Ludovic Courtès <ludo@gnu.org>
53
54 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
55 regression compared to 1.8.2. Reported by Puneet
56 <schemer@gmail.com>.
57
58 2007-10-10 Ludovic Courtès <ludo@gnu.org>
59
60 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
61 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
62 * gen-scmconfig.h.in
63 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
64 * gen-scmconfig.c (main): Define
65 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
66
67 2007-10-04 Ludovic Courtès <ludo@gnu.org>
68
69 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
70 `leave_locale_section ()' on failure of
71 `enter_locale_section ()' since the mutex is not held and locale
72 settings are unchanged.
73 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
74 `restore_locale_settings ()' instead of `leave_locale_section ()'
75 since the mutex is not held.
76
77 2007-10-02 Ludovic Courtès <ludo@gnu.org>
78
79 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
80 since we're already in non-guile mode. Reported by Greg Toxel
81 for NetBSD.
82
83 2007-10-01 Ludovic Courtès <ludo@gnu.org>
84
85 * ports.c (flush_output_port): Expect directly a port instead of
86 a pair. Fixes a bug in the new port table (2007-08-26).
87
88 2007-09-11 Kevin Ryde <user42@zip.com.au>
89
90 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
91 putenv("NAME") as the fallback everywhere else. In particular this is
92 needed for solaris 9. Reported by Frank Storbeck.
93
94 2007-09-03 Ludovic Courtès <ludo@gnu.org>
95
96 * read.c (flush_ws): Handle SCSH block comments.
97
98 2007-09-03 Ludovic Courtès <ludo@gnu.org>
99
100 Fix alignment issues which showed up at least on SPARC.
101
102 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
103 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
104 alignment.
105 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
106 correct alignment.
107 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
108 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
109 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
110 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
111 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
112
113 2007-09-03 Kevin Ryde <user42@zip.com.au>
114
115 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
116 before using clog(). It's possible for gcc to provide the "complex
117 double" type, but for the system not to have the complex funcs.
118 (scm_exp): Ditto HAVE_CEXP for cexp().
119 (clog, cexp, carg): Remove fallback definitions. These only
120 duplicated the code within scm_log and scm_exp, and the latter have to
121 exist for the case when there's no "complex double". So better just
122 fix up the conditionals selecting between the complex funcs and plain
123 doubles than worry about fallbacks.
124
125 2007-09-02 Ludovic Courtès <ludo@gnu.org>
126
127 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
128 This fixes a memory leak.
129
130 2007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
131
132 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
133 gc.c: replace port table with weak hash table. This simplifies
134 memory management, and fixes freed cells appearing in
135 port-for-each output.
136
137 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
138 held.
139
140 2007-08-23 Ludovic Courtès <ludo@gnu.org>
141
142 * read.c (scm_read_quote): Record position and copy source
143 expression when asked to. Reported by Kevin.
144
145 * stime.c: Define `_REENTRANT' only if not already defined.
146
147 2007-08-21 Kevin Ryde <user42@zip.com.au>
148
149 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
150 tc16 values so big, real, complex and fraction can be distinguished.
151
152 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
153 was making numbers come out as "type 23" in gc-live-object-stats.
154 Fix tests of the tc16 number types, they were checked under
155 scm_tc7_number, but the values went down the tag>=255 smob case.
156 Put smob case under scm_tc7_smob instead of using tag>=255, per
157 recommendation in comments with scm_tc7_smob to use symbolic values.
158 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
159 code. Lose some unnecessary "break" statements.
160
161 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
162 element returned, rather than two lookups scm_hashq_ref and
163 scm_hashq_set_x.
164
165 2007-08-17 Kevin Ryde <user42@zip.com.au>
166
167 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
168 solaris 2.6. Reported by anirkko.
169
170 2007-07-29 Ludovic Courtès <ludo@gnu.org>
171
172 * Makefile.am (INCLUDES): Added Gnulib includes.
173 (gnulib_library): New.
174 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
175 `$(gnulib_library)'.
176 (libguile_la_LIBADD): Likewise.
177
178 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
179 to define it when available.
180 * srfi-14.c: Likewise.
181 * i18n.c: Likewise. Include Gnulib's <alloca.h>
182 * eval.c: Include Gnulib's <alloca.h>.
183 * filesys.c: Likewise.
184 * read.c: Don't include <strings.h> and don't provide an
185 `strncasecmp ()' replacement; use Gnulib's <string.h> and
186 `strncasecmp ()' instead.
187
188 2007-07-25 Ludovic Courtès <ludo@gnu.org>
189
190 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
191 immediately. This used to produce a circular memoized
192 expression, e.g., for `(set (quote x) #t)'.
193
194 2007-07-22 Ludovic Courtès <ludo@gnu.org>
195
196 Overhauled the reader, making it faster.
197
198 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
199 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
200 of `scm_lreadr ()'.
201
202 * read.c: Overhauled. No longer use a token buffer. Use a
203 on-stack C buffer in the common case and use Scheme strings when
204 larger buffers are needed.
205 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
206 scm_lreadr, scm_lreadrecparen): Removed.
207 (scm_i_input_error): Marked as `SCM_NORETURN'.
208
209 2007-07-15 Ludovic Courtès <ludo@gnu.org>
210
211 * script.c (scm_compile_shell_switches): Updated copyright year.
212
213 2007-07-11 Ludovic Courtès <ludo@gnu.org>
214
215 * goops.c (scm_sys_method_more_specific_p): Added docstring.
216 Make sure LEN is greater than or equal to the minimum length of
217 specializers of M1 and M2. This fixes a segfault later on in
218 `more_specificp ()' if TARGS is too small. Reported by Marco
219 Maggi <marco.maggi-ipsu@poste.it>.
220
221 2007-06-26 Ludovic Courtès <ludo@gnu.org>
222
223 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
224 sure to free the previous array after the new one has been
225 installed. This leak is made visible by running
226 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
227 from the REPL within Valgrind.
228
229 2007-06-12 Ludovic Courtès <ludo@chbouib.org>
230
231 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
232 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
233 bus error on SPARC (and possibly others) due to unaligned access.
234
235 2007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
236
237 * posix.c (scm_ttyname): Check whether RESULT is NULL before
238 making a string from it (reported by Dan McMahill). Don't call
239 `scm_from_locale_string ()' before the mutex is released.
240
241 2007-05-26 Ludovic Courtès <ludo@chbouib.org>
242
243 * eval.c (scm_m_define): Updated comment. Changed order for value
244 evaluation and `scm_sym2var ()' call, which is perfectly valid per
245 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
246
247 2007-05-05 Ludovic Courtès <ludo@chbouib.org>
248
249 Implemented lazy duplicate binding handling.
250
251 * modules.c (scm_export): Renamed to...
252 (scm_module_export): This. Now public.
253 (module_variable): Removed.
254 (default_duplicate_binding_procedures_var): New variable.
255 (default_duplicate_binding_handlers, resolve_duplicate_binding,
256 module_imported_variable, scm_module_local_variable,
257 scm_module_variable): New functions.
258 (scm_module_import_interface): Rewritten.
259 (scm_module_reverse_lookup): Exported as a Scheme function.
260 * modules.h (scm_module_index_duplicate_handlers,
261 scm_module_index_import_obarray): New macros.
262 (scm_module_variable, scm_module_local_variable,
263 scm_module_export): New declarations.
264
265 2007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
266
267 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
268 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
269
270 2007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
271
272 * numbers.c (carg): provide carg, cexp, clog in case they are
273 missing.
274
275 2007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
276
277 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
278 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
279 Steven Wu.
280
281 2007-03-08 Kevin Ryde <user42@zip.com.au>
282
283 * struct.c, struct.h (scm_make_vtable): New function, providing
284 `make-vtable'.
285 * stacks.c (scm_init_stacks): Use it.
286
287 2007-03-06 Kevin Ryde <user42@zip.com.au>
288
289 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
290 allocating a tail array. If there's no such then those tail fields
291 are uninitialized and garbage SCMs there can cause a segv if printed
292 (after fetching with struct-ref).
293
294 2007-02-22 Kevin Ryde <user42@zip.com.au>
295
296 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
297 (scm_usleep): Update docstring per manual, cross reference sleep.
298
299 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
300 scm_struct_init is not within that section. scm_struct_init can
301 thrown an error, which within a critical section results in an
302 abort().
303
304 2007-02-19 Neil Jerram <neil@ossau.uklinux.net>
305
306 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
307 is included in the distribution.
308 (noinst_HEADERS): And the same for eval.i.c.
309
310 2007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
311
312 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
313 unconditionally. Include <langinfo.h> and <nl_types.h> when
314 available.
315 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
316 SCM_LIST_OR_INTEGER_P): New macros.
317 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
318 as powers of two instead of `(1 << LC_*)'.
319 (scm_i_locale_free): New function/macro.
320 (scm_global_locale): New global variable.
321 (smob_locale_free): Use `scm_i_locale_free ()'.
322 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
323 (get_current_locale_settings): Return `EINVAL' instead of `errno'
324 when `setlocale' fails.
325 (restore_locale_settings): Likewise.
326 (install_locale_categories): Likewise.
327 (install_locale): Likewise. Stop the locale stack traversal when
328 all categories have been handled.
329 (get_current_locale, category_to_category_mask,
330 category_list_to_category_mask): New function.
331 (scm_make_locale): Use them. Accept both lists of `LC_*' values
332 and single `LC_*' values as the first argument. Handle the case
333 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
334 duplicate C_BASE_LOCALE before using it.
335 (scm_nl_langinfo, define_langinfo_items): New functions.
336 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
337 `nl-langinfo' and invoke `define_langinfo_items ()'.
338 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
339 * posix.c: Include <xlocale.h> when available.
340 (scm_i_locale_mutex): Always define it. Statically initialized.
341 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
342 acquiring the locale mutex.
343 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
344
345 2007-01-27 Kevin Ryde <user42@zip.com.au>
346
347 * ports.c (scm_port_line, scm_set_port_line_x), read.c
348 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
349 port line number type, should be "long" not "int", as per line_number
350 field of scm_t_port. (Makes a difference only on 64-bit systems, and
351 only then for a linenum above 2Gig.)
352
353 2007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
354
355 * vector.c: remove comment as per kryde's request.
356
357 2007-01-25 Kevin Ryde <user42@zip.com.au>
358
359 * sort.c (scm_stable_sort): Return empty list for input empty list, as
360 done in guile 1.6 and as always done by plain `sort'. Was falling
361 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
362
363 2007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
364
365 * vectors.c (s_scm_vector_move_right_x): complain about naming.
366
367 * srcprop.c: regularize comments.
368
369 * eval.c: remove superfluous ifndef DEVAL.
370
371 * private-options.h: idem.
372
373 * eval.i.c: copyright nitpicking.
374
375 * eval.c: distangle. move duplicate code to eval.i.c and include
376 twice.
377
378 * eval.i.c: new file.
379
380 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
381 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
382 read.h, stacks.c, symbols.c, throw.c: use private-options.h
383
384 * private-options.h: new file: contain hardcoded option
385 definitions.
386
387 * private-gc.h: add FSF header.
388
389 2007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
390
391 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
392 memoize-symbol is set.
393
394 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
395
396 * eval.c (CEVAL): add memoize_symbol trap.
397
398 * options.c (scm_options_try): new function. This allows error
399 reporting before changing options in a critical section.
400
401 * srcprop.c: use double cell for storing source-properties. Put
402 filename in the plist, and share between srcprops if possible.
403 Remove specialized storage.
404
405 * srcprop.h: remove macros without SCM_ prefix from
406 interface. Remove specialized storage/type definitions.
407
408 * read.c: idem.
409
410 * print.c: idem.
411
412 * eval.c: terminate option lists with 0.
413
414 * options.c: remove n (for length) from scm_option_X
415 functions. Detect option list length by looking for NULL name.
416
417 2007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
418
419 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
420 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
421 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
422 added by `make-vtable-vtable'. Reported by Marco Maggi.
423
424 2007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
425
426 * throw.c (scm_ithrow): more refined error message: print symbols
427 too.
428
429 2007-01-16 Kevin Ryde <user42@zip.com.au>
430
431 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
432 implementing `set-program-arguments'.
433
434 * filesys.c (scm_init_filesys): Use scm_from_int rather than
435 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
436 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
437 O_LARGEFILE. These are all int not long, per arg to open().
438 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
439 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
440 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
441 an int arg to fcntl.
442
443 * posix.c (scm_putenv): Correction to "len" variable, was defined only
444 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
445 Move it to where it's used. Reported by Hugh Sasse.
446
447 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
448 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
449 meant #\nul in the input (detected by scm_to_locale_string) and a bad
450 flags arg (detected by scm_to_int) would throw from a critical
451 section, causing an abort().
452
453 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
454 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
455 REG_NOTEOL; they're all ints not longs (per args to regcomp and
456 regexec).
457
458 2007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
459
460 * throw.c (scm_ithrow): print out key symbol and string arguments
461 when error happens inside a critical section, and document why.
462
463 2007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
464
465 * read.c (s_scm_read_hash_extend): document #f argument to
466 read-hash-extend.
467
468 2007-01-04 Kevin Ryde <user42@zip.com.au>
469
470 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
471 scm_minor_version, scm_micro_version, scm_effective_version,
472 scm_version, scm_init_version): Use SCM_API instead of just extern,
473 for the benefit of mingw. Reported by Cesar Strauss.
474
475 2007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
476
477 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
478 too.
479 (gc_update_stats): update scm_gc_cells_allocated_acc too.
480
481 2006-12-27 Kevin Ryde <user42@zip.com.au>
482
483 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
484 the basic scm_get_stack_base. As advised by Nils Durner.
485
486 * threads.c (get_thread_stack_base): Add a version using
487 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
488 As advised by Heikki Lindholm.
489
490 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
491 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
492 Durner.
493
494 2006-12-24 Kevin Ryde <user42@zip.com.au>
495
496 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
497 error if pid is not our own process, instead of silently doing nothing.
498
499 * print.c (scm_write, scm_display, scm_write_char): Disable port close
500 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
501 check in configure.in unintentionally enabled it. Believe that
502 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
503 can leave errno in that state. popen.test "no duplicates" output test
504 provoked that.
505
506 2006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
507
508 * numbers.c (scm_i_fraction_reduce): move logic into
509 scm_i_make_ratio(), so fractions are only read.
510 scm_i_fraction_reduce() modifies a fraction when reading it. A
511 race condition might lead to fractions being corrupted by reading
512 them concurrently.
513
514 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
515 comparisons between reduced and unreduced fractions go wrong.
516
517 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
518 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
519 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
520 SCM_FRACTION_REDUCED.
521
522 2006-12-16 Kevin Ryde <user42@zip.com.au>
523
524 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
525 more direct for a procedure called raise.
526 (kill): Remove mingw fake fallback.
527
528 2006-12-15 Kevin Ryde <user42@zip.com.au>
529
530 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
531 _pipe on mingw.
532
533 2006-12-14 Kevin Ryde <user42@zip.com.au>
534
535 * threads.c (thread_print): Cope with the case where pthread_t is a
536 struct, as found on mingw. Can't just cast to size_t for printing.
537 Reported by Nils Durner.
538
539 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
540 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
541
542 2006-12-13 Kevin Ryde <user42@zip.com.au>
543
544 * eval.c (scm_m_define): Set 'name procedure property on any
545 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
546 procedures with setters as used in srfi-17.
547
548 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
549 linux man page says is a possibility.
550
551 2006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
552
553 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
554 instead of RES (reported by Szavai Gyula). This allows the use of
555 negative lower bounds.
556 (scm_i_read_array): Make sure LEN is non-negative (reported by
557 Szavai Gyula).
558
559 (scm_array_in_bounds_p): Iterate over S instead of always
560 comparing indices with the bounds of S[0]. This fixes
561 `array-in-bounds?' for arrays with a rank greater than one and
562 with different lower bounds for each dimension.
563
564 2006-12-05 Kevin Ryde <user42@zip.com.au>
565
566 * numbers.c (scm_product): For flonum*inum and complex*inum, return
567 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
568 and as per R5RS section "Exactness".
569
570 2006-12-03 Kevin Ryde <user42@zip.com.au>
571
572 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
573 allow $AWK from the environment to override. It had syntax gremlins,
574 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
575 Makefile stopped it having any effect. Use just $(AWK), which can be
576 overridden with "make AWK=xxx" in the usual way if desired.
577
578 2006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
579
580 * libguile/vectors.c (scm_vector_to_list): Fixed list
581 construction: elements were not copied when INC is zero (see
582 "shared array" example in `vectors.test'). Reported by
583 Szavai Gyula.
584
585 2006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
586
587 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
588 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
589 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
590 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
591 (DOT_X_FILES): Added `gettext.x'.
592 (DOT_DOC_FILES): Likewise.
593 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
594 (modinclude_HEADERS): Added `gettext.h'.
595 (EXTRA_DIST): Added `libgettext.h'.
596
597 * gettext.h: Renamed to...
598 * libgettext.h: New file.
599
600 * i18n.c: Renamed to...
601 * gettext.c: New file.
602
603 * i18n.h: Renamed to...
604 * gettext.h: New file.
605
606 * i18n.c, i18n.h, locale-categories.h: New files.
607
608 * init.c: Include "libguile/gettext.h" instead of
609 "libguile/i18n.h".
610 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
611 `scm_init_i18n ()'.
612
613 * posix.c: Include "libguile/gettext.h" instead of
614 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
615 (USE_GNU_LOCALE_API): New macro.
616 (scm_i_locale_mutex): New variable.
617 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
618
619 * posix.h: Include "libguile/threads.h".
620 (scm_i_locale_mutex): New declaration.
621
622 2006-11-17 Neil Jerram <neil@ossau.uklinux.net>
623
624 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
625
626 2006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
627
628 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
629 "sweep_stats" arguments; use them instead of accessing the global
630 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
631
632 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
633 before each iteration of the loop.
634 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
635 (scm_i_get_new_heap_segment): Take an additional argument
636 SWEEP_STATS. Compute MIN_CELLS as a function of it.
637
638 * libguile/gc.c (scm_gc_cells_collected,
639 scm_gc_cells_collected_1): Removed.
640 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
641 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
642 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
643 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
644 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
645 `scm_gc_cells_(collected|swept)'.
646 (gc_update_stats): New.
647 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
648 `scm_i_gc_sweep_stats_1' instead of the former globals.
649 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
650 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
651 would keep allocating new segments instead of re-using collected
652 cells (because `scm_gc_cells_collected' would remain zero).
653
654 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
655 scm_gc_cell_yield_percentage): Removed.
656
657 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
658 (scm_i_adjust_min_yield): Updated.
659 (scm_i_get_new_heap_segment): Updated.
660
661 2006-11-02 Neil Jerram <neil@ossau.uklinux.net>
662
663 * modules.c: Correct comment saying that low-level environments
664 will be used "in the next release".
665
666 * init.c: Comment out #include of environments.h.
667 (scm_i_init_guile): Comment out scm_environments_prehistory() and
668 scm_init_environments() calls.
669
670 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
671 (DOT_X_FILES): Remove environments.x.
672 (DOT_DOC_FILES): Remove environments.doc.
673 (modinclude_HEADERS): Remove environments.h.
674
675 2006-10-25 Neil Jerram <neil@ossau.uklinux.net>
676
677 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
678
679 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
680 scm_ia64_register_backing_store_base() instead of Linux-specific
681 implementations.
682
683 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
684 New declarations.
685
686 * gc.c (__libc_ia64_register_backing_store_base): Declaration
687 removed.
688 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
689 implementations for Linux and HP-UX.
690
691 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
692 and scm_ia64_register_backing_store_base() instead of
693 Linux-specific implementations.
694
695 * continuations.h (__libc_ia64_register_backing_store_base):
696 Declaration removed.
697 (scm_t_contregs): New "fresh" field.
698
699 * continuations.c (ia64_getcontext): Removed.
700 (scm_make_continuation): Use continuation fresh field instead of
701 interpreting getcontext return values (which isn't portable). Use
702 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
703 instead of Linux-specific implementations.
704 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
705 instead of Linux-specific implementation.
706
707 * _scm.h (__ia64__): Also detect __ia64.
708
709 2006-10-03 Kevin Ryde <user42@zip.com.au>
710
711 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
712 arguments or 3 or more arguments. Previously 0 called proc with
713 SCM_UNDEFINED, and 3 or more silently used just the first 2.
714
715 2006-09-28 Kevin Ryde <user42@zip.com.au>
716
717 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
718 for chsize fallback, instead of hard-coding mingw. Mingw in fact
719 supplies ftruncate itself these days.
720
721 * ports.c (fcntl.h): Can include this unconditionally, no need for
722 __MINGW32__.
723
724 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
725 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
726 "off_t" for parameters, per usual definition of this function, rather
727 than "char *" and "int". Use ftruncate instead of chsize. Check for
728 error on final close.
729
730 2006-09-27 Kevin Ryde <user42@zip.com.au>
731
732 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
733 in mingw.
734
735 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
736 const *" for mingw to suppress warnings from gcc (which are errors
737 under the configure default -Werror). Reported by Nils Durner.
738
739 2006-09-26 Kevin Ryde <user42@zip.com.au>
740
741 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
742 * fports.c (scm_open_file): Use open_or_open64.
743 (fport_seek_or_seek64): New function, adapting fport_seek.
744 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
745 functions.
746 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
747 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
748
749 * ports.c (scm_truncate_file): Update docstring per manual.
750
751 2006-09-23 Kevin Ryde <user42@zip.com.au>
752
753 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
754 functions.
755
756 2006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
757
758 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
759 (make_predset, define_predset, make_strset, define_strset, false,
760 true): Removed.
761 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
762 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
763 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
764 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
765 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
766 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
767 (define_charset, scm_srfi_14_compute_char_sets): New functions.
768 (scm_init_srfi_14): Use `define_charset ()' instead of
769 `define_predset ()' and `define_strset ()'.
770
771 * srfi-14.h (scm_c_init_srfi_14): Removed.
772 (scm_srfi_14_compute_char_sets): New declaration.
773
774 * posix.h: Include "srfi-14.h".
775 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
776 successful `setlocale ()' call.
777
778 2006-09-08 Kevin Ryde <user42@zip.com.au>
779
780 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
781 (scm_recvfrom): Update docstring from manual.
782
783 2006-08-31 Rob Browning <rlb@defaultvalue.org>
784
785 * ports.c (scm_c_port_for_each): Add a
786 scm_remember_upto_here_1(ports) at the end of the function to fix
787 a GC bug.
788
789 2006-08-28 Neil Jerram <neil@ossau.uklinux.net>
790
791 * backtrace.c (scm_display_backtrace_with_highlights): Minor
792 improvements to docstring.
793 (scm_backtrace_with_highlights): Analogous improvements.
794
795 2006-08-12 Kevin Ryde <user42@zip.com.au>
796
797 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
798 New, set from configure.
799 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
800 to scmconfig.h.
801 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
802 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
803 Reported by Claes Wallin.
804
805 2006-08-11 Neil Jerram <neil@ossau.uklinux.net>
806
807 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
808 frame, not a stack).
809
810 2006-07-25 Kevin Ryde <user42@zip.com.au>
811
812 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
813 on pthreads version, since pthread_getattr_np not available on solaris
814 and macos. Reported by Claes Wallin.
815
816 2006-07-24 Kevin Ryde <user42@zip.com.au>
817
818 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
819 it's a macro on MacOS X. Reported by Claes Wallin.
820
821 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
822 for the benefit of Solaris 10. Reported by Claes Wallin.
823
824 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
825 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
826
827 2006-07-21 Kevin Ryde <user42@zip.com.au>
828
829 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
830 autoconf recommendation. Should fix Solaris 10 reported by Claes
831 Wallin.
832
833 * threads.c: Include <string.h>, needed for memset() which is used by
834 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
835
836 2006-07-18 Rob Browning <rlb@defaultvalue.org>
837
838 * continuations.c: Add __attribute__ ((returns_twice)) to the
839 ia64_getcontext prototype so that gcc will make the right
840 arrangements and avoid an illegal instruction during
841 call-with-current-continuation.
842
843 2006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
844
845 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
846 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
847
848 2006-07-08 Kevin Ryde <user42@zip.com.au>
849
850 * environments.c (core_environments_unobserve): Use if/else rather
851 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
852 about them not being rvalues. Reported by Mike Gran.
853
854 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
855 portable and in particular fails on OpenBSD and AIX (see autoconf
856 manual too). Reported by Mike Gran.
857
858 2006-06-25 Kevin Ryde <user42@zip.com.au>
859
860 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
861 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
862 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
863 HAVE_TM_ZONE.
864 (scm_strptime): Use tm_gmtoff from the strptime result when that field
865 exists, it's set by glibc strptime "%s".
866
867 2006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
868
869 * eq.c: Include "struct.h", "goops.h" and "objects.h".
870 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
871 are not GOOPS instances.
872 * struct.c: Include "eq.h".
873 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
874 hand-written code.
875 (scm_i_struct_equalp): New.
876 * struct.h (scm_i_struct_equalp): New declaration.
877
878 2006-06-06 Kevin Ryde <user42@zip.com.au>
879
880 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
881 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
882 reported by Mattias Holm.
883
884 2006-06-03 Kevin Ryde <user42@zip.com.au>
885
886 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
887 unused variable warning when elisp disabled. Reported by Ryan
888 VanderBijl.
889
890 * throw.c (scm_handle_by_message): Add dummy return value to avoid
891 compiler warning on cygwin. Reported by Ryan VanderBijl.
892
893 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
894 duplicate of EXTRA_DOT_DOC_FILES.
895 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
896 Add scmconfig.h to dependencies, since these all run cpp. Helps a
897 parallel "make -j2". Reported by Mattias Holm.
898
899 2006-05-30 Kevin Ryde <user42@zip.com.au>
900
901 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
902 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
903 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
904 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
905 port type descriptor, same as scm_make_port_type return value.
906
907 2006-05-30 Marius Vollmer <mvo@zagadka.de>
908
909 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
910 of the arguments is a array. This allows vectors to be equal to
911 one-dimensional arrays.
912
913 2006-05-29 Marius Vollmer <mvo@zagadka.de>
914
915 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
916 that we have a pair before accessing its cdr. Thanks to Bill
917 Schottstaedt!
918
919 2006-05-28 Kevin Ryde <user42@zip.com.au>
920
921 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
922 by "The Senator".
923
924 2006-05-27 Marius Vollmer <mvo@zagadka.de>
925
926 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
927 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
928
929 2006-05-26 Kevin Ryde <user42@zip.com.au>
930
931 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
932 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
933 Reported by "The Senator".
934 For select and ioctl, move fdes into those conditionals, to avoid
935 unused variable warning when neither of those used.
936
937 2006-05-23 Kevin Ryde <user42@zip.com.au>
938
939 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
940 It's unused and will be in stdio.h anyway (if it's anywhere).
941
942 2006-05-20 Kevin Ryde <user42@zip.com.au>
943
944 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
945 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
946
947 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
948 symlink). Probably can't create symlinks with mknod anyway though.
949
950 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
951 generation.
952
953 2006-05-15 Kevin Ryde <user42@zip.com.au>
954
955 * simpos.c, simpos.h (scm_primitive__exit): New function.
956 (scm_primitive_exit): Update docstring, no longer the best exit after
957 a fork.
958
959 2006-05-09 Kevin Ryde <user42@zip.com.au>
960
961 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
962 rather than converting to doubles, to avoid inf or nan when the inputs
963 are too big for a double but the quotient does fit. This affects
964 conversions exact->inexact of big fractions.
965
966 * filesys.c (scm_open_fdes): Use open64.
967 (scm_init_filesys): Add O_LARGEFILE.
968
969 * ports.c (scm_seek): Use lseek64.
970 (scm_truncate_file): Use ftruncate64.
971
972 2006-05-08 Marius Vollmer <mvo@zagadka.de>
973
974 * private-gc.h (CELL_P): Also check that the potential pointer is
975 correctly aligned for a cell. Thanks to Miroslav Lichvar!
976
977 2006-04-18 Rob Browning <rlb@defaultvalue.org>
978
979 * _scm.h: Add back error if the size of off_t is unknown. The bug
980 was actually in guile-readline's configuration.
981
982 2006-04-18 Kevin Ryde <user42@zip.com.au>
983
984 * posix.c (scm_mkstemp): Update docstring from the manual, in
985 particular file mode 0600 is not guaranteed.
986
987 2006-04-17 Kevin Ryde <user42@zip.com.au>
988
989 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
990 size, to help the guile-readline build where off_t is unused.
991
992 2006-04-16 Kevin Ryde <user42@zip.com.au>
993
994 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
995 (scm_readdir): Use readdir64.
996 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
997 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
998 and ftruncate take off_t not size_t.
999 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1000 available.
1001
1002 2006-04-06 Kevin Ryde <user42@zip.com.au>
1003
1004 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
1005 instead of toggling it. Reported by Ludovic Courtès.
1006
1007 2006-03-26 Marius Vollmer <mvo@zagadka.de>
1008
1009 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1010 instead of accessing __libc_stack_end directly, and only do this
1011 when pthread_attr_getstack is known not to work for the main
1012 thread or when not using pthreads at all.
1013
1014 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1015 unknown instead of returning NULL.
1016
1017 2006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
1018
1019 * numbers.c (scm_i_mem2number): Renamed to
1020 scm_c_locale_stringn_to_number.
1021 * numbers.c, print.c, read.c: Updated callers.
1022 * numbers.h: Update function declaration.
1023
1024 2006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1025
1026 * unif.c (string_set): Don't return in a void function. (Reported
1027 by Mike Gran.)
1028
1029 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1030 rather than void*, so we can do pointer arithmetic on it.
1031 (Reported by Mike Gran.)
1032 (s_scm_uniform_vector_write): Ditto.
1033
1034 2006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1035
1036 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1037 oldra is not an array. (Reported by Steve Juranich.)
1038
1039 * threads.c (do_unlock): Renamed from "unlock", which is defined
1040 in unistd.h on QNX. (Reported by Matt Kraai.)
1041
1042 2006-03-04 Kevin Ryde <user42@zip.com.au>
1043
1044 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1045 not SCM_CRITICAL_SECTION_START.
1046
1047 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1048 Mike Gran.
1049
1050 2006-02-28 Kevin Ryde <user42@zip.com.au>
1051
1052 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1053
1054 2006-02-26 Kevin Ryde <user42@zip.com.au>
1055
1056 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1057 NAME_MAX is not available, which is so on Solaris 10. Report and help
1058 by Bill Schottstaedt.
1059
1060 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1061 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1062 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1063 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1064 use "unsigned char", not signed char. This ensures comparisons are
1065 the same as `char<?' etc, and is also the same as guile 1.6 did.
1066 Reported by Sven Hartrumpf.
1067
1068 2006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1069
1070 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1071 SCM_HAVE_T_INT64.
1072 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1073 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1074 scm_t_int32.
1075
1076 2006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
1077
1078 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1079 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1080 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1081 Take into account SEG->SPAN when computing CELLS_SWEPT.
1082 (scm_i_sweep_segment): Take one more argument, similarly.
1083 (scm_i_sweep_all_segments): Likewise.
1084 (scm_i_sweep_some_segments): Likewise.
1085 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1086 refer to SCM_GC_CELLS_COLLECTED.
1087
1088 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1089 argument, an `scm_i_sweep_statistics' object.
1090 Change the way DELTA is collected: don't take into account
1091 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1092
1093 * gc-malloc.c (scm_realloc): Pass an extra argument
1094 to `scm_i_sweep_all_segments ()'.
1095
1096 * gc.c (gc_start_stats): Updated accordingly.
1097 (gc_end_stats): Take an additional SWEEP_STATS argument.
1098 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1099 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1100 Decrement SCM_CELLS_ALLOCATED.
1101 (scm_i_gc): Likewise.
1102
1103 * private-gc.h (scm_i_sweep_*): Updated function
1104 prototypes accordingly.
1105 (scm_t_sweep_statistics): New type.
1106 (scm_i_sweep_statistics_init): New macro.
1107 (scm_i_sweep_statistics_sum): New macro
1108
1109 2006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
1110
1111 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1112 LEN. Without this, too much collectable memory gets unregistered,
1113 which results in an underflow of SCM_MALLOCATED in
1114 `decrease_mtrigger()'.
1115
1116 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1117 equal to SCM_MALLOCATED.
1118
1119 2006-02-13 Marius Vollmer <mvo@zagadka.de>
1120
1121 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1122 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1123 configured --without-threads.
1124 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1125
1126 2006-02-12 Marius Vollmer <mvo@zagadka.de>
1127
1128 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1129 filling when the fill parameter is omitted, as documented, but
1130 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1131 can not store characters.
1132
1133 2006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1134
1135 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1136 on to scm_fill_sockaddr call.
1137
1138 2006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1139
1140 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1141 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1142
1143 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1144 (struct pre_unwind_data): New, replaces struct lazy_catch.
1145 (scm_c_catch): New, replaces scm_internal_catch as the primary
1146 catch API for C code; adds pre-unwind handler support.
1147 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1148 compatibility.
1149 (tc16_pre_unwind_data, pre_unwind_data_print,
1150 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1151 "lazy_catch" equivalents.
1152 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1153 as the primary C API for a "lazy" catch.
1154 (scm_internal_lazy_catch): Now just a wrapper for
1155 scm_c_with_throw_handler, for back compatibility.
1156 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1157 pre-unwind handler support.
1158 (scm_catch): Now just a wrapper for
1159 scm_catch_with_pre_unwind_handler, for back compatibility.
1160 (scm_with_throw_handler): New.
1161 (scm_lazy_catch): Update comment to say that the handler can
1162 return, and what happens if it does.
1163 (toggle_pre_unwind_running): New.
1164 (scm_ithrow): When identifying the throw target, take running
1165 flags into account. In general, change naming of things from
1166 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1167 don't unwind the dynamic context first. Add dynwind framing to
1168 manage the running flag of a throw handler. If a lazy catch or
1169 throw handler returns, rethrow the same exception again. Add
1170 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1171
1172 * root.c (scm_internal_cwdr): Add NULL args to
1173 scm_i_with_continuation_barrier call.
1174
1175 * dynwind.c: Change comment mentioning lazy-catch to mention
1176 pre-unwind data and throw handler also.
1177
1178 * continuations.h (scm_i_with_continuation_barrier): Add
1179 pre-unwind handler args.
1180
1181 * continuations.c (scm_i_with_continuation_barrier): Add
1182 pre-unwind handler args, and pass on to scm_c_catch (changed from
1183 scm_internal_catch).
1184 (c_handler): Remove scm_handle_by_message_noexit call.
1185 (scm_c_with_continuation_barrier): Call
1186 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1187 as the pre-unwind handler.
1188 (scm_handler): Remove scm_handle_by_message_noexit call.
1189 (s_scm_with_continuation_barrier): Call
1190 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1191 as the pre-unwind handler.
1192
1193 2006-02-04 Kevin Ryde <user42@zip.com.au>
1194
1195 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1196
1197 2006-02-03 Kevin Ryde <user42@zip.com.au>
1198
1199 * list.c, list.h (scm_list): Restore this function for use from C.
1200 It's a complete no-op but in theory might used by someone.
1201
1202 2006-01-30 Marius Vollmer <mvo@zagadka.de>
1203
1204 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1205 so that it gets unlocked in all cases.
1206 (SCM_APPLY, CEVAL): Likewise.
1207
1208 2006-01-29 Marius Vollmer <mvo@zagadka.de>
1209
1210 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1211 scm_is_typed_array instead.
1212
1213 Renamed the "frames" that are related to dynamic-wind to "dynamic
1214 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1215 Updated documentation.
1216
1217 Disabled "futures":
1218
1219 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1220 * eval.c, init.c: Comment out all 'future' related things.
1221
1222 2006-01-28 Marius Vollmer <mvo@zagadka.de>
1223
1224 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1225 to inline.h to make it inline.
1226
1227 2005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
1228
1229 * strings.c (scm_i_take_stringbufn): New.
1230 (scm_i_c_take_symbol): New.
1231 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1232
1233 * strings.h (scm_i_c_take_symbol): New.
1234 (scm_i_take_stringbufn): New.
1235
1236 * symbols.c (lookup_interned_symbol): New function.
1237 (scm_i_c_mem2symbol): New function.
1238 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1239 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1240 creating a new Scheme string.
1241 (scm_from_locale_symboln): Likewise.
1242 (scm_take_locale_symbol): New.
1243 (scm_take_locale_symboln): New.
1244
1245 * symbols.h (scm_take_locale_symbol): New.
1246 (scm_take_locale_symboln): New.
1247
1248 2006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1249
1250 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1251 free_count.
1252
1253 2005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1254
1255 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1256 upon error
1257
1258 2005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1259
1260 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
1261 the GC when allocated_fluids_len is zero.
1262
1263 2005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1264
1265 * load.c (the_reader, the_reader_fluid_num): New.
1266 (scm_primitive_load): Support custom reader.
1267 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1268 the_reader as `current-reader'.
1269
1270 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1271 (rather than an uninitialized pointer on the stack).
1272
1273 2005-12-07 Marius Vollmer <mvo@zagadka.de>
1274
1275 Reported by Bruce Korb:
1276
1277 * init.c (invoke_main_func): Don't call exit here. Throws that
1278 are only caught by scm_with_guile will bypass us and would cause
1279 scm_boot_guile to return erroneously.
1280 (scm_boot_guile): Expect scm_with_guile to return and call exit
1281 here, passing it an appropriate exit code.
1282
1283 From Andy Wingo:
1284
1285 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1286 unsigned char cast to an int, or -1 for EOS.
1287
1288 2005-12-06 Marius Vollmer <mvo@zagadka.de>
1289
1290 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1291 non-const.
1292 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
1293
1294 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1295 scm_enter_guile): Removed from public API. See comment at
1296 scm_without_guile for the rationale.
1297
1298 * scmsigs.c (read_without_guile): New.
1299 (signal_delivery_thread): Use it instead of
1300 scm_leave_guile/read/scm_enter_guile.
1301
1302 From Stephen Compall:
1303
1304 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1305 (CEVAL): Evaluate SRFI 61 cond clauses.
1306
1307 2005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
1308
1309 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1310 This was typically hit when running `gc-live-object-stats' right
1311 after starting Guile.
1312
1313 2005-11-30 Kevin Ryde <user42@zip.com.au>
1314
1315 * srfi-13.c (scm_string_append_shared): No copying if just one
1316 non-empty string in args.
1317
1318 2005-11-26 Kevin Ryde <user42@zip.com.au>
1319
1320 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
1321 by Ludovic Courtès.
1322
1323 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1324 "register".
1325
1326 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1327 scm_malloc returning NULL, it never does that.
1328 * putenv.c (putenv): Likewise.
1329
1330 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1331 much too big to want to inline.
1332
1333 2005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
1334
1335 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1336 the value at its top. This fixes a reference leak.
1337 (PUSH_REF): Perform `pstate->top++' after calling
1338 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1339 effects.
1340
1341 2005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
1342
1343 * gc.c (scm_weak_vectors): Removed.
1344
1345 2005-11-12 Kevin Ryde <user42@zip.com.au>
1346
1347 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
1348 by Ludovic Courtès.
1349
1350 2005-11-07 Marius Vollmer <mvo@zagadka.de>
1351
1352 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1353 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1354 section might exit non-locally.
1355
1356 2005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1357
1358 * eval.c (sym_instead): New symbol.
1359 (ENTER_APPLY): Remove optional use of a continuation when making
1360 trap call.
1361 (scm_debug_opts): Change doc for 'cheap option to make clear that
1362 it is now obsolete.
1363 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1364 making trap calls, and implement substitution of eval expressions
1365 and return values using the values that the trap call handlers
1366 return.
1367
1368 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1369
1370 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
1371
1372 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1373 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1374 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1375 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1376 scm_c_make_socket_address): New functions.
1377 * socket.h: Add prototypes.
1378
1379 2005-10-24 Kevin Ryde <user42@zip.com.au>
1380
1381 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1382 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1383 POSIX spec examples, the latter are not available on for instance
1384 NetBSD.
1385
1386 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1387 posix.texi.
1388
1389 * stime.c (scm_strftime): Update docstring from posix.texi.
1390
1391 2005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1392
1393 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1394
1395 * null-threads.h, pthread-threads.h
1396 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1397 (scm_i_pthread_mutexattr_recursive): New.
1398
1399 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1400 (scm_i_critical_section_mutex): Do not initialize statically.
1401 (scm_threads_prehistory): Initialize
1402 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1403 here.
1404
1405 * eval.c (source_mutex): Do not initialiaze statically.
1406 (scm_init_eval): Do it here, using
1407 scm_i_pthread_mutexattr_recursive.
1408
1409 2005-09-05 Marius Vollmer <mvo@zagadka.de>
1410
1411 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1412 New.
1413 (sym_reader): New.
1414 (scm_print_opts): Added "quote-keywordish-symbols" option.
1415 (quote_keywordish_symbol): New, for evaluating the option.
1416 (scm_print_symbol_name): Use it.
1417 (scm_init_print): Initialize new option to sym_reader.
1418
1419 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1420
1421 * eval.c (eval_letrec_inits): New.
1422 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1423
1424 2005-08-12 Marius Vollmer <mvo@zagadka.de>
1425
1426 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1427 Peter Gavin!
1428
1429 2005-08-12 Kevin Ryde <user42@zip.com.au>
1430
1431 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1432
1433 2005-08-06 Kevin Ryde <user42@zip.com.au>
1434
1435 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1436 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1437 scm_string_index, scm_string_index_right, scm_string_skip,
1438 scm_string_skip_right, scm_string_count, scm_string_map,
1439 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1440 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1441 procedures called in loops.
1442
1443 2005-08-02 Kevin Ryde <user42@zip.com.au>
1444
1445 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1446 avoid lots of copying where previoulsy growing by only 80 bytes at a
1447 time.
1448
1449 2005-08-01 Marius Vollmer <mvo@zagadka.de>
1450
1451 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1452 already have scm_lookup_closure_module, which does the same thing.
1453
1454 2005-08-01 Marius Vollmer <mvo@zagadka.de>
1455
1456 New marking algorithm for weak hashtables that fixes the problem
1457 that references from the non-weak value to the associated weak
1458 key (for example) would prevent the entry from ever being dropped.
1459
1460 Guardians have been changed back to their original semantics and
1461 are no longer greedy and no longer drop cycles.
1462
1463 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1464 hashtable and guardian machinery but call the relevant functions
1465 directly.
1466
1467 * guardians.h, guardians.c, deprecated.h,
1468 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1469 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1470 Deprecated and moved into deprecated.[ch].
1471
1472 * guardians.h, guardians.c: Mostly rewritten.
1473 (scm_i_init_guardians_for_gc,
1474 scm_i_identify_inaccessible_guardeds,
1475 scm_i_mark_inaccessible_guardeds): New.
1476 (scm_make_guardian): Removed greedy_p argument.
1477
1478 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1479 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1480 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1481 (scm_weaks_prehistory): Removed.
1482 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1483 scm_i_mark_weak_vectors_non_weaks,
1484 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1485 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1486 scm_scan_weak_vectors): Removed.
1487
1488 * hashtab.h (scm_i_scan_weak_hashtables): New.
1489 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1490 SCM_WVECTF_NOSCAN.
1491 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1492 t->n_items.
1493 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1494 to latter. Do not scan the alists themselves, this is done by the
1495 weak vector code now. Just update the element count.
1496
1497 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1498 to latter. The type is now only part of the cell word.
1499 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1500
1501 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1502
1503 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1504
1505 Some changes towards making it possible to run Guile on the EM64T
1506 platform.
1507
1508 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1509 mallocating for (unsigned long *bounds).
1510
1511 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1512 scm_t_bits before storing them in the type word.
1513
1514 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1515 scm_t_bits to int.
1516
1517 2005-07-12 Kevin Ryde <user42@zip.com.au>
1518
1519 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1520 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1521 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1522 than scm_makfrom0str.
1523 Reported by Ken Raeburn.
1524
1525 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1526 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1527 returning SCM_GC_CARD_BVEC.
1528
1529 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1530 rather than latin-1 acute accent, the latter may not print on all
1531 terminals.
1532
1533 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1534 trailing deletions, so as to return a substring if those are the only
1535 changes.
1536
1537 2005-07-10 Kevin Ryde <user42@zip.com.au>
1538
1539 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1540 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1541 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1542 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1543
1544 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1545
1546 * gc-card.c (scm_i_card_statistics): init tag.
1547
1548 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1549
1550 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1551
1552 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1553 string.
1554
1555 2005-06-25 Kevin Ryde <user42@zip.com.au>
1556
1557 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1558 last change, use plain copy-on-write substrings, the individual
1559 descriptions in the srfi don't mention shared storage (only the
1560 introduction does).
1561
1562 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1563 null-terminator, rather than mallocing a whole new block.
1564 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1565
1566 2005-06-12 Marius Vollmer <mvo@zagadka.de>
1567
1568 * ramap.c (scm_array_index_map_x): First test for real arrays,
1569 then check for generalized vectors. This ensures that the
1570 generalized vector case need only work with zero-origin ranges.
1571 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1572 to access the target array, making these functions work with all
1573 kinds of arrays, not just bit arrays.
1574
1575 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1576 gh_list.c, gh_predicates.c: Deprecated everything.
1577
1578 * environments.c (environment_default_folder,
1579 environment_default_observer): Do not use gh_call3, gh_call1.
1580
1581 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1582
1583 * modules.c (s_scm_eval_closure_module): new function. Return the
1584 module inside an eval-closure.
1585
1586 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1587 table. This means that procedure properties are GC'd if the
1588 procedure dies.
1589
1590 2005-06-11 Kevin Ryde <user42@zip.com.au>
1591
1592 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1593 charset cases, count chars kept and build a string in a second pass,
1594 rather than using a cons cell for every char kept. Use a shared
1595 substring when nothing removed (such sharing is allowed by the srfi).
1596
1597 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1598
1599 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1600 string, so live object stats can be sorted with string<?.
1601
1602 2005-06-06 Marius Vollmer <mvo@zagadka.de>
1603
1604 * print.c (iprin1): When writing a string, collect all characters
1605 that can be printed directly into one call to scm_lfwrite.
1606 Previously, every character was output with its own call to
1607 write(2) on unbuffered ports.
1608
1609 * eval.c (scm_eval_options_interface): Use
1610 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1611 and SCM_CRITICAL_SECTION_END.
1612
1613 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1614 check for generalized vectors. This ensures that the generalized
1615 vector case need only work with zero-origin ranges.
1616
1617 2005-06-06 Kevin Ryde <user42@zip.com.au>
1618
1619 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1620 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1621 matched.
1622
1623 2005-06-05 Marius Vollmer <mvo@zagadka.de>
1624
1625 * eval.c: Added comment on how to make case 1.1 of
1626 r5rs_pitfall.test succeed.
1627
1628 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1629
1630 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1631
1632 * socket.c: Remove obsolete comment about socklen_t.
1633 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1634
1635 * numbers.h (isnan)[__MINGW32__]: Remove.
1636
1637 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1638 DEFAULT_INCLUDES when cross compiling.
1639
1640 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1641
1642 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
1643 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1644 from Jan's patch.)
1645
1646 2005-05-22 Marius Vollmer <mvo@zagadka.de>
1647
1648 * unif.c (scm_make_shared_array): Add old base to new base since
1649 scm_array_handle_pos does not include the base.
1650 (scm_aind): Likewise.
1651
1652 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1653 output port.
1654
1655 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1656
1657 Mac OS X compile warning fixes, reported by Richard Todd.
1658
1659 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1660 that it is signed.
1661
1662 * strports.c (st_resize_port): Add unsigned char cast.
1663 (scm_mkstrport): Make read/write_buf cast unsigned.
1664
1665 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1666
1667 * rdelim.c (scm_read_line): Initialize slen.
1668
1669 * load.c (scm_search_path): Remove weird >=1, and add
1670 parentheses to clarify conditions.
1671
1672 * hash.c (scm_hasher): Add const unsigned char cast.
1673
1674 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1675
1676 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1677
1678 Fix C99isms reported by Ludovic Courtès:
1679
1680 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1681 code.
1682
1683 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1684 of code.
1685
1686 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1687 of code.
1688 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1689 and current.
1690
1691 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1692
1693 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1694 compile warning reported by Werner Scheinast.
1695
1696 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1697
1698 * list.h: remove scm_list()
1699
1700 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1701 SCM_DEBUG_CELL_ACCESSES
1702 (FLUID_NEXT_LOC): idem.
1703
1704 2005-04-30 Kevin Ryde <user42@zip.com.au>
1705
1706 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1707 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1708 zero when re==0 and im<0. Reported by Jean Crepeau.
1709
1710 2005-04-25 Kevin Ryde <user42@zip.com.au>
1711
1712 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
1713 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1714 few sensible uses (like filling with a random number generator say),
1715 but has been allowed in the past and so should be kept.
1716
1717 2005-04-23 Kevin Ryde <user42@zip.com.au>
1718
1719 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1720 scm_hash_fn_remove_x.
1721
1722 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1723 the caller when cons* is reached through apply.
1724
1725 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1726 list is called using apply, under the debugging evaluator.
1727 (scm_list): Remove.
1728
1729 * list.c, list.h (scm_make_list): New code, moving make-list from
1730 boot-9.scm.
1731
1732 2005-04-14 Kevin Ryde <user42@zip.com.au>
1733
1734 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1735 converted from scheme code in boot-9.scm.
1736
1737 2005-04-11 Kevin Ryde <user42@zip.com.au>
1738
1739 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1740 Validate list argument, scm_string_append and scm_string_append_shared
1741 don't do that to their rest argument (in a normal build).
1742
1743 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1744
1745 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1746 closure can not be stored since it is no longer valid at GC time.
1747 (make_hash_table): Initialize 'hash_fn' field.
1748 (scm_i_rehash): Only store hash_fn in hash table when closre is
1749 NULL.
1750 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1751 non-NULL. Always use a NULL closure.
1752 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1753 few entries.
1754
1755 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1756
1757 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1758 argument; always use scm_delq_x. The delete_fn function works on
1759 the handle, not the key, and it therefore makes no sense to make
1760 it configurable. Changed all callers.
1761 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1762 (scm_hash_clear): Accept plain vectors as hashtables.
1763 (scm_delx_x): Removed.
1764
1765 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1766
1767 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1768 compatibility with gcc -std=c99.
1769
1770 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1771
1772 * async.h (scm_mask_ints): Removed left over reference to
1773 scm_root.
1774
1775 * threads.c: Removed fprintf debug statements.
1776
1777 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1778
1779 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1780
1781 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1782
1783 * debug.c (scm_make_memoized): Remove unnecessary critical
1784 section, and simplify by using SCM_RETURN_NEWSMOB.
1785
1786 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1787
1788 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1789
1790 2005-03-18 Kevin Ryde <user42@zip.com.au>
1791
1792 * arbiters.c (FETCH_STORE) [generic C]: Should be
1793 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
1794
1795 2005-03-13 Kevin Ryde <user42@zip.com.au>
1796
1797 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1798 srfi-60.
1799
1800 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1801 because OR-ing bits into a negative can reduce the value to an inum.
1802
1803 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1804 casting inum to double since that can lose precision.
1805
1806 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1807
1808 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1809 (guilify_self_1): Initialize it.
1810
1811 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1812 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1813 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1814 field.
1815 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1816 recursively.
1817 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1818 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1819 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1820 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1821 scm_after_gc_c_hook here.
1822 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1823 scm_after_gc_c_hook when a full GC has in fact been performed.
1824 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1825
1826 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1827 scm_gc_heap_lock.
1828
1829 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1830 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1831
1832 * inline.h (scm_cell, scm_double_cell): Do not check
1833 scm_gc_running_p, allocation during sweeping is OK.
1834
1835 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1836 not set scm_block_gc.
1837
1838 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1839
1840 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1841 instead of scm_malloc. The latter can not be used during GC.
1842
1843 2005-03-09 Marius Vollmer <mvo@zagadka.de>
1844
1845 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1846 years.
1847
1848 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1849
1850 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1851 scm_gc_running_p. Sweeping can happen in parallel with
1852 allocation.
1853
1854 * inline.h: Updated comments for current threading implementation.
1855
1856 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1857 (scm_i_thread): Removed unused signal_asyncs field.
1858 (threads_mark): Do not mark it.
1859 (guilify_self_1): Do not initialize it. Do initialize
1860 continuation_root field.
1861 (do_thread_exit): Do not remove thread from all_threads list.
1862 (on_thread_exit): Do it here, after leaving guile mode.
1863 (sleep_level): Removed.
1864 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1865 returning. Do not support recursive sleeps.
1866 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1867 entry. Do not support recursive sleeps.
1868
1869 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1870 resize_all_states): Collapsed ensure_state_size and
1871 ensure_all_state_sizes into one function named resize_all_states.
1872 Allocate new vectors outside of single threaded region. Do only
1873 simple things inside that region.
1874 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1875 while adding to the global lists.
1876
1877
1878 2005-03-08 Marius Vollmer <mvo@zagadka.de>
1879
1880 libltdl is no longer distributed. We expect it to be installed
1881 already.
1882
1883 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1884 (libguile_la_LIBADD): Removed @LIBLTDL@.
1885
1886 2005-03-07 Marius Vollmer <mvo@zagadka.de>
1887
1888 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1889 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1890 they also block/unblock execution of asyncs and call
1891 scm_async_click which is declared in async.h but threads.h can not
1892 include async.h since async.h already includes threads.h.
1893 (scm_i_critical_section_level): New, for checking mistakes in the
1894 use of the SCM_CRITICAL_SECTION_* macros.
1895 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1896 critical sections can be nested.
1897
1898 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1899 not zero.
1900
1901 * threads.h, threads.c (scm_frame_lock_mutex): New.
1902 (scm_frame_critical_section): Take mutex as argument.
1903 (framed_critical_section_mutex): New, used as default for above.
1904 (scm_init_threads): Initialize it.
1905 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1906 scm_i_critical_section_mutex; both are initialized statically.
1907
1908 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1909 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
1910 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1911 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
1912
1913 * debug.c (scm_debug_options): Replace
1914 SCM_CRITICAL_SECTION_START/END with a frame and
1915 scm_frame_critical_section.
1916
1917 * continuations.c (scm_make_continuation): No longer a critical
1918 section.
1919 (scm_dynthrow): Abort when scm_i_critical_section_level is
1920 not zero.
1921
1922 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1923
1924 * threads.c (scm_try_mutex): Renamed argument for consistency.
1925
1926 * root.c (scm_call_with_dynamic_root): New docstring.
1927
1928 * eval.c: Define _GNU_SOURCE.
1929
1930 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1931
1932 Big merge from the mvo-thread-cleanup branch. The main changes
1933 are:
1934
1935 - The dynamic roots functionality has been split into dynamic
1936 states and continuations barriers. Fluids have been
1937 reimplemented and can now be garbage collected.
1938
1939 - Initialization of Guile now works in a multi-thread friendly
1940 manner. Threads can freely enter and leave guile mode.
1941
1942 - Blocking on mutexes or condition variables or while selecting
1943 can now be reliably interrupted via system asyncs.
1944
1945 - The low-level threading interface has been removed.
1946
1947 - Signals are delivered via a pipe to a dedicated 'signal delivery
1948 thread'.
1949
1950 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1951
1952 * throw.c (scm_handle_by_message): Exit only the current thread,
1953 not the whole process.
1954 (scm_handle_by_message_noexit): Exit when catching 'quit.
1955
1956 * scmsigs.c (take_signal, signal_delivery_thread,
1957 start_signal_delivery_thread, ensure_signal_delivery_thread,
1958 install_handler): Reimplemented signal delivery as explained in
1959 the comments.
1960
1961 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
1962 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
1963 scm_i_sched_yield, scm_i_pthread_sigmask,
1964 SCM_I_PTHREAD_MUTEX_INITIALIZER,
1965 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
1966 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
1967 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
1968 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
1969 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
1970 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
1971 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
1972 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
1973 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
1974 scm_i_pthread_key_create, scm_i_pthread_setspecific,
1975 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
1976 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
1977 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
1978 when using pthreads.
1979 * null-threads.c, null-threads.h: Provide dummy definitions for
1980 the above symbols when not using pthreads.
1981
1982 * modules.h, modules.c (scm_frame_current_module): New.
1983
1984 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
1985 instead of scm_internal_dynamic_wind.
1986
1987 * init.h, init.c (restart_stack, start_stack): Removed.
1988 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
1989 (scm_boot_guile_1): Removed.
1990 (scm_i_init_mutex): New.
1991 (really_cleanup_for_exit, cleanup_for_exit): New.
1992 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
1993 Moved around some init funcs. Call
1994 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
1995 with atexit.
1996
1997 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
1998 Use "!scm_is_eq" instead of "!=".
1999
2000 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2001 SCM_USE_COOP_THREADS): Removed.
2002
2003 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2004 maintained. Unlock scm_i_sweep_mutex before running
2005 scm_after_gc_c_hook.
2006 (scm_permanent_object): Allocate outside of critical section.
2007 (cleanup): Removed.
2008
2009 * fluids.h, fluids.c: Reimplemented completely.
2010 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2011 SCM_FAST_FLUID_SET): Reimplemented as functions.
2012 (scm_is_fluid): New.
2013 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2014 (scm_make_dynamic_state, scm_dynamic_state_p,
2015 scm_is_dynamic_state, scm_current_dynamic_state,
2016 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2017 scm_c_with_dynamic_state, scm_with_dynamic_state,
2018 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2019
2020 * feature.c (progargs_fluid): New.
2021 (scm_program_arguments, scm_set_program_arguments): Use it instead
2022 of scm_progargs.
2023 (scm_init_feature): Allocate it. Also, only add "threads" feature
2024 when SCM_USE_PTHREAD_THREADS is true.
2025
2026 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2027 scm_make_rec_mutex, with all the consequences.
2028 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2029 scm_internal_dynamic_wind. Handle dynamic states as second
2030 argument.
2031
2032 * threads.h, threads.c (scm_internal_select): Renamed to
2033 scm_std_select and discouraged old name.
2034 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2035 and scm_std_usleep.
2036 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2037 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2038 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2039 SCM_THREAD_DATA): Removed.
2040 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2041 (scm_i_thread): New.
2042 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2043 Use scm_assert_smob_type.
2044 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2045 scm_thread_self, scm_thread_yield, scm_mutex_init,
2046 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2047 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2048 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2049 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2050 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2051 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2052 scm_thread_select): Removed. Replaced with scm_i_pthread
2053 functions as appropriate.
2054 (scm_in_guile, scm_outside_guile): Removed.
2055 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2056 take a ticket.
2057 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2058 New.
2059 (scm_i_frame_single_threaded): New.
2060 (scm_init_threads_default_dynamic_state): New.
2061 (scm_i_create_thread): Removed.
2062 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2063 (scm_make_recursive_mutex): New.
2064 (scm_frame_critical_section): New.
2065 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2066 latter, changed all uses.
2067 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2068 scm_i_set_last_debug_frame): New, use them instead of scm_root
2069 stuff.
2070 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2071 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2072 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2073 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2074 (remqueue): Allow the removal of already removed cells. Indicate
2075 whether a real removal has happened.
2076 (scm_thread): Removed, replaced with scm_i_thread.
2077 (make_thread, init_thread_creatant): Removed.
2078 (cur_thread): Removed.
2079 (block_self, unblock_from_queue): New.
2080 (block, timed_block, unblock): Removed.
2081 (guilify_self_1, guilify_self_2, do_thread_exit,
2082 init_thread_key_once, init_thread_key,
2083 scm_i_init_thread_for_guile, get_thread_stack_base,
2084 scm_init_guile): New initialisation method.
2085 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2086 thread creation.
2087 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2088 "fair" to fat and implemented new semantics, including reliable
2089 interruption.
2090 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2091 (scm_threads_mark_stacks): Explicitly mark handle.
2092 (scm_std_select): Allow interruption by also selecting on the
2093 sleep_pipe.
2094 (scm_i_thread_put_to_sleep): Handle recursive requests for
2095 single-threadedness.
2096 (scm_threads_prehistory, scm_init_threads): Put current thread
2097 into guile mode via guileify_self_1 and guileify_self_2,
2098 respectively.
2099
2100 * fluid.h (SCM_FLUIDP): Deprecated.
2101
2102 * coop-threads.c: Removed.
2103
2104 * continuations.h, continuations.c (scm_with_continuation_barrier,
2105 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2106 New.
2107
2108 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2109 (async_mutex): New.
2110 (scm_async_click): Protected with async_mutex. Do not deal with
2111 signal_asyncs, which are gone. Set cdr of handled async cell to
2112 #f.
2113 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2114 current sleep.
2115 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2116 since that might not work during early initialization.
2117
2118 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2119 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2120 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2121 and SCM_CRITICAL_SECTION_END.
2122 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2123 SCM_CRITICAL_SECTION_START/END.
2124
2125 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2126 (libguile_la_SOURCES): Added null-threads.c
2127 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2128 threads-plugin.c.
2129 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2130
2131 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2132 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2133 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2134 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2135 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2136 scm_make_root): Removed or deprecated. Replaced with references
2137 to the current thread, dynamic state, continuation barrier, or
2138 some fluid, as appropriate.
2139 (root_mark, root_print): Removed.
2140 (scm_internal_cwdr): Reimplemented guts with
2141 scm_frame_current_dynamic_state and
2142 scm_i_with_continuation_barrier.
2143 (scm_dynamic_root): Return current continuation barrier.
2144
2145
2146 2005-02-28 Marius Vollmer <mvo@zagadka.de>
2147
2148 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2149 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2150 cleanliness.
2151 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2152 IP_DROP_MEMBERSHIP.
2153 Thanks to Greg Troxel!
2154
2155 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2156
2157 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2158 block.
2159
2160 2005-02-25 Marius Vollmer <mvo@zagadka.de>
2161
2162 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2163 so that no two weak alist vectors share a spine.
2164 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2165 during GC before inserting the new alist cell.
2166
2167 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2168
2169 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2170 the hashtable.
2171 (scm_hash_fn_create_handle_x): Likewise.
2172 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2173
2174 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2175
2176 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2177 the prototypical examples mentioned in the old reference manual.
2178 Instead keep the old semantics of dispatching on type. (Yes, this
2179 is extremely ugly, but the whole point of keeping the deprecated
2180 interface is not to break old code.)
2181
2182 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2183
2184 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2185 scm_i_array_dims.
2186
2187 2005-01-28 Kevin Ryde <user42@zip.com.au>
2188
2189 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2190 integer-expt and multiply/divide. Inexacts and fractions no longer
2191 supported (they happened to work before for left shifts, but not
2192 right). Don't really need inexacts and fractions, since ash is
2193 documented as a "bitwise operation", and all the rest of those only
2194 take exact integers.
2195
2196 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2197
2198 * gc-card.c (scm_i_card_statistics): map structs, closures and
2199 subrs to one tag.
2200
2201 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
2202 (tag_table_to_type_alist): ignore unknown types.
2203
2204 * gc-segment.c (scm_i_all_segments_statistics): new function.
2205 (scm_i_heap_segment_statistics): new function
2206
2207 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2208 statistics on the number of live objects of each type.
2209
2210 * gc-card.c (scm_i_tag_name): new function.
2211 (scm_i_card_statistics): new function.
2212
2213 2005-01-24 Kevin Ryde <user42@zip.com.au>
2214
2215 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2216 POSIX and C99 don't document errno being set. Reported by Bruno
2217 Haible.
2218 (scm_flock): Update docstring from manual.
2219
2220 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2221 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2222 a 64-bit system.
2223
2224 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2225 sa_handler, needs to be a long on 64-bit systems where int is only 32
2226 bits.
2227
2228 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2229
2230 * environments.c (obarray_enter, obarray_replace): Call
2231 SCM_HASHTABLE_INCREMENT when adding a new entry.
2232
2233 * objects.c: Include goops.h for the scm_class_of prototype.
2234
2235 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2236 sizes to be smaller than the maximum lengths of vectors.
2237
2238 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2239
2240 * ports.c, smob.c: Include "libguile/goops.h".
2241
2242 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2243 scm_class_char, scm_class_pair, scm_class_procedure,
2244 scm_class_string, scm_class_symbol,
2245 scm_class_procedure_with_setter, scm_class_primitive_generic,
2246 scm_class_vector, scm_class_null, scm_class_real,
2247 scm_class_complex, scm_class_integer, scm_class_fraction,
2248 scm_class_unknown, scm_port_class, scm_smob_class,
2249 scm_no_applicable_method, scm_class_of): Moved from objects to
2250 goops since they are only useable once goops has been loaded.
2251 (scm_classes_initialized): Removed.
2252 (scm_class_of): Do not check it.
2253 (create_standard_classes): Do not set it.
2254
2255 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2256
2257 * objects.h, objects.c (scm_classes_initialized): New.
2258 (scm_class_of): Signal error when scm_classes_initialized is zero.
2259 * goops.c (create_standard_classes): Set scm_classes_initialized
2260 to one.
2261
2262 * random.c (scm_random_solid_sphere_x): Use
2263 scm_c_generalized_vector_length instead of
2264 scm_uniform_vector_length.
2265
2266 2005-01-16 Marius Vollmer <mvo@zagadka.de>
2267
2268 * script.c (scm_compile_shell_switches): Removed debugging output.
2269
2270 2005-01-15 Kevin Ryde <user42@zip.com.au>
2271
2272 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2273 docstrings from manual.
2274 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2275
2276 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2277
2278 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2279 its value.
2280
2281 Implement u64 and s64 uniform numeric vectors with bignums when
2282 scm_t_uint64 and scm_t_int64 are not available.
2283
2284 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2285 scm_array_handle_u64_elements,
2286 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2287 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2288 is not available.
2289 (scm_take_s64vector, scm_array_handle_s64_elements,
2290 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2291 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2292 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2293 scm_t_int64/scm_t_uint64 are not available.
2294 (uvec_mark): New, to mark the bignums.
2295 (alloc_uvec): Initialize bignums.
2296 (uvec_fast_ref): Return bignums directly.
2297 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2298 assert_exact_integer): New.
2299 (uvec_fast_set): Use them to validate the bignums.
2300 (scm_init_srfi_4): Set mark function of smob when needed.
2301 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2302 scm_int64_max.
2303
2304 Recognize 1.4 -e syntax.
2305
2306 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2307 (scm_compile_shell_switches): Use them to recognize and convert
2308 1.4 "-e" syntax.
2309
2310 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2311
2312 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2313 deprecated features that once were macros but are now functions
2314 back into macros.
2315
2316 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2317
2318 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2319 * deprecation.c (scm_issue_deprecation_warning,
2320 scm_c_issue_deprecation_warning_fmt): Use it.
2321 (mode): Removed.
2322 (print_summary): New.
2323 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2324 mode.
2325
2326 Deprecated SCM_ARRAY* macros.
2327
2328 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2329 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2330 version. Changed all uses.
2331 (scm_tc16_array, scm_i_tc16_array,
2332 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2333 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2334 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2335 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2336 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2337 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2338 SCM_ARRAY_V, SCM_I_ARRAY_V,
2339 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2340 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2341 scm_t_array, scm_i_t_array): Likewise.
2342 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2343 Moved from unif.h to unif.c.
2344 (scm_c_array_rank): New.
2345 (scm_array_rank): Reimplement using it.
2346
2347 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2348 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2349 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2350
2351 2005-01-11 Marius Vollmer <mvo@zagadka.de>
2352
2353 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2354 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2355 scm_c_generalized_vector_ref and scm_cvref, and
2356 scm_c_generalized_vector_set_x, respectively.
2357 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2358 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2359
2360 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2361 former to latter and made public. Changed all uses.
2362 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2363 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2364 (scm_i_shap2ra): New internal version of scm_shap2ra.
2365 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2366 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2367 (scm_ra_set_contp): Deprecated, changed all uses to
2368 scm_i_ra_set_contp.
2369 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2370
2371 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2372
2373 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2374 Trotts!
2375
2376 * unif.c (scm_list_to_typed_array): Allow the specification of the
2377 upper bound as well. This is needed for empty arrays.
2378 (l2ra): Give needed number of elements in error message.
2379 (scm_i_print_array): Print length information for arrays that need
2380 it.
2381 (scm_i_read_array): Parse it.
2382
2383 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2384 scm_i_object_chars, scm_i_object_length): Brought back from the
2385 dead.
2386
2387 2005-01-10 Marius Vollmer <mvo@zagadka.de>
2388
2389 * ramap.c: Replaced single-index uses of scm_array_set_x with
2390 scm_c_generalized_vector_set_x.
2391
2392 * unif.c (scm_array_rank, scm_array_dimensions,
2393 scm_shared_array_offset, scm_shared_array_increments,
2394 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2395 to simplify code and make it more general.
2396 (scm_shared_array_root): Work with all kinds of arrays, including
2397 naked vectors.
2398 (indices_to_pos): New.
2399 (scm_make_shared_array): Use it instead of scm_aind; use handle
2400 for oldra.
2401
2402 2005-01-10 Kevin Ryde <user42@zip.com.au>
2403
2404 * posix.c (scm_mkstemp): Update docstring from manual.
2405
2406 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2407
2408 2005-01-09 Marius Vollmer <mvo@zagadka.de>
2409
2410 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2411 scm_i_uniform_vector_set_proc): New.
2412 (u8ref, u8set, s8ref, s8set, etc): New.
2413 (uvec_reffers, uvec_setters): New.
2414 (uvec_to_list): Use generic scm_array_handle_ref instead of
2415 uvec_fast_ref since scm_array_handle_ref should be faster now.
2416 (coerce_to_uvec, scm_c_uniform_vector_ref,
2417 scm_c_uniform_vector_set_x): Likewise.
2418
2419 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2420 New.
2421 (scm_t_array_handle): Added ref, set, elements and
2422 writable_elements for fast inline operation of
2423 scm_array_handle_ref and scm_array_handle_set.
2424 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2425 and replaced with inline code that simply calls the ref/set
2426 members of the handle.
2427 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2428 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2429 New.
2430 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2431 and memoize_set.
2432 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2433 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2434 scm_bit_invert_x): Correctly multiply index with increment in the
2435 general case.
2436
2437 * unif.c (scm_array_handle_set): Correctly execute only one
2438 alternative. D'Oh!
2439 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2440 the array; this covers all cases with much simpler code.
2441
2442 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2443 as well.
2444
2445 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2446
2447 * srfi-4.c (uvec_type): New.
2448 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2449 scm_c_uniform_vector_x): Use it to get concrete type.
2450
2451 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2452 fit the docs.
2453
2454 * unif.c (ra2l): Handle zero rank arrays.
2455 (scm_i_print_array): Print zero rank arrays specially.
2456 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2457 (scm_i_read_array): Allow zero rank arrays.
2458
2459 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2460
2461 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2462 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2463 and SCM_SET_HASHTAB_BUCKET.
2464
2465 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2466 Removed ref_stack field.
2467 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2468 of a print state. Use them everywhere instead of ref_stack.
2469
2470 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2471
2472 * srfi-4.c: Include deprecation.h.
2473
2474 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2475 deprecated.c, eq.c
2476 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2477 (scm_vector_elements, scm_vector_writable_elements,
2478 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2479 unif.[hc].
2480 (SCM_SIMPLE_VECTOR_LOC): Removed.
2481 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2482 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2483 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2484 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2485 latter. Changed use in eq.c.
2486
2487 2005-01-07 Marius Vollmer <mvo@zagadka.de>
2488
2489 Make the uniform vector routines also deal with one dimensional
2490 arrays.
2491
2492 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2493 SCM_SMOB_PREDICATE in this file.
2494 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2495 of the right type.
2496 (scm_is_uniform_vector): Likewise.
2497 (uvec_fast_ref): Made BASE param const.
2498 (uvec_writable_elements, uvec_elements): New.
2499 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2500 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2501 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2502 arrays.
2503 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2504 argument convention.
2505 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2506 checking.
2507 (scm_uniform_vector_length): Use uvec_length.
2508
2509 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2510
2511 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2512 scm_c_uniform_vector_size): Removed.
2513 (scm_array_handle_uniform_element_size): New.
2514
2515
2516 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2517 type of POS parameter to be signed, positions can be negative.
2518 (scm_array_handle_release): New, changed all uses of
2519 scm_t_array_handle to properly call it.
2520 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2521 Renamed former to latter, changed all uses.
2522
2523 2005-01-05 Marius Vollmer <mvo@zagadka.de>
2524
2525 Updated bitvector routines to also use scm_t_array_handles.
2526
2527 * unif.h (scm_bitvector_elements,
2528 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2529 deliver offset, length and increment to caller. Changed all uses.
2530 (scm_bitvector_release_elements,
2531 scm_frame_bitvector_release_elements,
2532 scm_bitvector_release_writable_elements,
2533 scm_frame_bitvector_release_writable_elements): Removed.
2534 (scm_array_handle_bit_elements,
2535 scm_array_handle_bit_writable_elements,
2536 scm_array_handle_bit_elements_offset): New.
2537 (scm_make_typed_array): The special value for non-initialized
2538 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2539 was a valid value to fill bitvectors with, so it can't really be
2540 specialed out.
2541
2542 2005-01-04 Kevin Ryde <user42@zip.com.au>
2543
2544 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2545 Reported by Bill Schottstaedt.
2546
2547 2005-01-02 Marius Vollmer <mvo@zagadka.de>
2548
2549 * sort.c (quicksort): Added INC parameter for non-contigous
2550 vectors.
2551 (quicksort1): New, for contigous vectors. Both functions are
2552 generated from the same code by including "quicksort.i.c".
2553 (scm_restricted_vector_sort_x): Call one of quicksort and
2554 quicksort1, depending on increment of vector.
2555 (scm_sort): Simply call scm_sort_x on a copy of the list or
2556 vector.
2557 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2558 size_t, added inc parameter.
2559 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2560 so that it doesn't leak.
2561 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2562 list or vector.
2563
2564 * ramap.c (scm_array_map_x): Do not try to convert fill value
2565 before filling, any necessary conversion is done while storing.
2566
2567 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2568 doing it inline.
2569
2570 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2571 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2572 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2573
2574 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2575 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2576 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2577 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2578 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2579 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2580 vector elements API or simple vector API, as appropriate. Removed
2581 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2582 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2583
2584 * srfi-4.h, srfi-4.c,
2585 srfi-4.i.c (scm_array_handle_uniform_elements,
2586 scm_array_handle_uniform_writable_elements,
2587 scm_uniform_vector_elements,
2588 scm_uniform_vector_writable_elements):
2589 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2590 scm_t_array_handle, deliver length and increment.
2591 (scm_array_handle_<foo>_elements,
2592 scm_array_handle_<foo>_writable_elements): New.
2593
2594 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2595 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2596
2597 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2598 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2599 scm_array_handle_set, scm_array_handle_elements
2600 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2601 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2602 scm_dimensions_to_uniform_array): Deprecated for real.
2603 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2604 snarfing wont allow a mismatch between C and Scheme arglists.
2605 (scm_make_shared_array, scm_enclose_array): Correctly use
2606 scm_c_generalized_vector_length instead of
2607 scm_uniform_vector_length.
2608
2609 * validate.h (SCM_VALIDATE_VECTOR,
2610 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2611 of SCM_VECTORP.
2612
2613 * weaks.h, weaks.c: Use new internal weak vector API from
2614 vectors.h.
2615
2616 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2617 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2618 'extra' to being regular sources.
2619 (noinst_HEADERS): Added quicksort.i.c.
2620 * quicksort.i.c: New file.
2621
2622 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2623 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2624 and reimplemented. Replaced all uses with scm_vector_elements,
2625 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2626 appropriate.
2627 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2628 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2629 SCM_SIMPLE_VECTOR_LOC): New.
2630 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2631 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2632 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2633 Removed.
2634 (scm_vector_copy): New.
2635 (scm_vector_elements, scm_vector_writable_elements): Use
2636 scm_t_array_handle, deliver length and increment. Moved to
2637 unif.h. Changed all uses.
2638 (scm_vector_release_elements,
2639 scm_vector_release_writable_elements,
2640 (scm_frame_vector_release_elements,
2641 scm_frame_vector_release_writable_elements): Removed.
2642 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2643 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2644 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2645 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2646 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2647 weak vectors.
2648
2649 2004-12-29 Marius Vollmer <mvo@zagadka.de>
2650
2651 No longer use creators to specify the type of an array. Creators
2652 expose the fact that arrays are wrapped around vectors, but that
2653 might change.
2654
2655 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2656 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2657 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2658 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2659 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2660 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2661 uvec_proc_vars): Removed.
2662 (scm_i_generalized_vector_creator): Removed.
2663 (scm_i_generalized_vector_type): New.
2664
2665 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2666 scm_make_typed_array, scm_array_type, scm_list_to_array,
2667 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2668 (scm_array_creator): Removed.
2669 (scm_array_p): Deprecated second PROT argument.
2670 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2671 Deprecated, reimplemented in terms of scm_make_typed_array and
2672 scm_list_to_typed_array.
2673 (scm_i_proc_make_vector, scm_i_proc_make_string,
2674 scm_i_proc_make_bitvector): Removed.
2675 (type_creator_table, init_type_creator_table, type_to_creator,
2676 make_typed_vector): New.
2677 (scm_i_convert_old_prototype): Removed.
2678 (prototype_to_type): New.
2679 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2680 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2681 minor added clarity.
2682 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2683 instead of scm_make_uve.
2684 (tag_creator_table, scm_i_tag_to_creator): Removed.
2685 (tag_to_type): New.
2686 (scm_i_read_array): Use scm_list_to_typed_array instead of
2687 scm_list_to_uniform_array.
2688
2689 2004-12-27 Marius Vollmer <mvo@zagadka.de>
2690
2691 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2692 (scm_bitvector_writable_elements): New.
2693 (scm_bitvector_release, scm_bitvector_release_elements):
2694 Renamed former to latter. Added explicit call to
2695 scm_remember_upto_here_1.
2696 (scm_frame_bitvector_release,
2697 scm_frame_bitvector_release_elements): Renamed former to latter.
2698 (scm_bitvector_release_writable_elements,
2699 scm_bitvector_release_writable_elements): New.
2700 Changed all uses as required by the changes above.
2701
2702 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2703 scm_u8vector_elements, etc): Made return value "const".
2704 (scm_uniform_vector_writable_elements,
2705 scm_u8vector_writable_elements, etc): New.
2706 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2707 Renamed former to latter. Added explicit call to
2708 scm_remember_upto_here_1.
2709 (scm_frame_uniform_vector_release,
2710 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2711 (scm_uniform_vector_release_writable_elements,
2712 scm_frame_uniform_vector_release_writable_elements): New. Takes
2713 crown of longest identifier yet.
2714 Changed all uses as required by the changes above.
2715
2716 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2717 void.
2718 (scm_is_vector, scm_vector_p, scm_vector_length,
2719 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2720 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2721 scm_vector_move_left_x, scm_vector_move_right_x,
2722 scm_vector_fill_x): handle one-dimensional arrays.
2723 (scm_vector_elements, scm_vector_release_elements,
2724 scm_vector_frame_release_elements, scm_vector_writable_elements,
2725 scm_vector_release_writable_elements,
2726 scm_vector_frame_release_writable_elements): New.
2727 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2728 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
2729
2730 * ramap.c (scm_ramapc, scm_raeql): Use
2731 scm_c_generalized_vector_length instead of
2732 scm_uniform_vector_length.
2733 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2734 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2735
2736 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2737
2738 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2739 member for relocating debug frames.
2740 (scm_make_continuation): Set it.
2741
2742 * stacks.c (read_frame, read_frames, scm_make_stack,
2743 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2744 of continuations instead of calculating the offset ourselves.
2745 Relocate 'vect' member of scm_t_debug_frame.
2746
2747 2004-12-16 Kevin Ryde <user42@zip.com.au>
2748
2749 * ramap.c (scm_array_map_x): Check for at least one source argument.
2750
2751 2004-12-14 Kevin Ryde <user42@zip.com.au>
2752
2753 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2754 the C code so for the final call to the predicate procedure is a tail
2755 call, per SRFI-13 spec.
2756
2757 2004-12-10 Kevin Ryde <user42@zip.com.au>
2758
2759 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2760 recent revision to the reference manual.
2761
2762 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2763 with "%", C99 says it's well-defined.
2764
2765 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2766 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2767 bother trying to fit scm_from_ulong, not really worth the trouble if
2768 addresses are more than 4 bytes usually.
2769
2770 2004-11-30 Kevin Ryde <user42@zip.com.au>
2771
2772 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2773 arm32. Reported by Greg Troxel.
2774
2775 2004-11-14 mvo <mvo@zagadka.de>
2776
2777 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2778
2779 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2780
2781 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2782
2783 Enclosed arrays are now their own smob. This has been done to
2784 make the code more explicit about them and to prepare for the time
2785 when generalized vectors include arbitrary one-dimensional
2786 arrays. (Uptonow, enclosed arrays have been recognized by their
2787 use of an array as their storage 'vector'. When all generalized
2788 vectors are allowed as storage, including one-dimensional arrays,
2789 this will no longer work.)
2790
2791 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2792 New.
2793 (exactly_one_third, singp): Removed.
2794 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2795 scm_shared_array_offset, scm_shared_array_increments): Handle
2796 enclosed arrays explicitely.
2797 (scm_array_rank): Likewise. Also, do not return zero for
2798 non-arrays, signal an error instead since arrays with rank zero do
2799 exist.
2800 (scm_i_make_ra): New, for specifying the tag of the new array.
2801 (scm_make_enclosed_array): Use it.
2802 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2803 (scm_make_shared_array): Use scm_c_generalized_vector_length
2804 instead of scm_uniform_vector_length.
2805 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2806 (scm_i_cvref): New, doing the job of scm_cvref.
2807 (scm_cvref): Use scm_i_cvref.
2808 (scm_array_ref): Do not accept non-arrays when no indices are
2809 given. Use scm_i_cvref to do the actual access.
2810 ("uniform-array-set1"): Do not register.
2811 (scm_array_set_x, scm_uniform_array_read_x,
2812 scm_uniform_array_write): Handle enclosed arrays explicitly.
2813 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2814 handle enclosed arrays.
2815 (scm_array_to_list): Handle enclosed arrays explicitly.
2816 (rapr1): Removed.
2817 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2818 enclosed arrays.
2819 (scm_i_print_enclosed_array): New.
2820 (tag_proto_table, tag_creator_table): Renamed former to latter.
2821 Added "a" and "b" for strings and bitvectors, resp.
2822 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2823 latter. Tag "a" is in the table now, no need to handle it as a
2824 legacy tag.
2825 (scm_raprin1): Just call scm_iprin1.
2826 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2827 explicitly.
2828 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2829 Use scm_i_print_array as printer for scm_tc16_array.
2830
2831 2004-11-10 Marius Vollmer <mvo@zagadka.de>
2832
2833 * ramap.c (cind): Changed second arg to be pointer to long instead
2834 of uniform vector.
2835 (scm_ramapc): Allocate index vector with scm_malloc and not as
2836 uniform vector. Wrap it in a frame so that it gets properly freed.
2837 (scm_array_index_map_x): Likewise.
2838
2839 * unif.c: Changed all uses of scm_array_prototype to
2840 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2841 prototype is known.
2842 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2843 in terms of scm_uniform_vector_read_x and
2844 scm_uniform_vector_write, respectively. Strings and
2845 bitvector support has been dropped.
2846
2847 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2848 needed files directly. Include config.h, <unistd.h> and <io.h>
2849 when available.
2850 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2851
2852 2004-11-09 Marius Vollmer <mvo@zagadka.de>
2853
2854 * gh_data.c (gh_uniform_vector_length): Properly use
2855 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2856
2857 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2858
2859 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2860 New.
2861 (scm_i_uniform_vector_creator): Removed.
2862 (scm_i_generalized_vector_creator): New.
2863 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2864 handle generalized vectors, only uniform numeric vectors.
2865 (alloc_uvec): Do length check here...
2866 (make_uvec): ...but not here.
2867 (coerce_to_uvec): Use new generalized vector functions to handle
2868 all kinds of vectors in one go.
2869
2870 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2871 remaining scm_tc7_unused tags to get a neatly ordered list.
2872
2873 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2874 longer handle scm_tc7_bvect bitvectors.
2875
2876 * ramap.c: Use the new generalized vector functions to handle all
2877 vector like things.
2878
2879 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2880 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2881 scm_generalized_vector_length, scm_generalized_vector_ref,
2882 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2883 scm_is_generalized_vector, scm_c_generalized_vector_length,
2884 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2885 New.
2886
2887 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2888 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2889 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2890 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2891 scm_c_bitvector_length, scm_c_bitvector_ref,
2892 scm_c_bitvector_set_x, scm_bitvector_elements,
2893 scm_bitvector_release, scm_frame_bitvector_release,
2894 scm_tc16_bitvector, bitvector_free, bitvector_print,
2895 bitvector_equalp, count_ones, find_first_one): New.
2896 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2897 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2898 using the new C API for bitvectors and maybe count_ones or
2899 find_first_one, as appropriate.
2900 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2901 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2902 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2903 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2904 new functions from above.
2905 (scm_i_proc_make_vector, scm_i_proc_make_string,
2906 scm_i_proc_make_bitvector): Made non-static for use in
2907 scm_i_generalized_vector_creator.
2908 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2909 (scm_make_uve): Validate that the created object is a generalized
2910 vector.
2911 (scm_i_legacy_tag): Removed.
2912 (scm_i_print_array): Do it here.
2913 (scm_raprin1): Only print enclosed arrays.
2914
2915 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2916
2917 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2918
2919 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2920 added portability.
2921
2922 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2923 for "space". Thanks to Bruce Korb!
2924
2925 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2926 only after dest has been set. Thanks to Hyper Division!
2927
2928 * gh_data.c (gh_uniform_vector_length): Use
2929 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2930
2931 2004-11-03 Marius Vollmer <mvo@zagadka.de>
2932
2933 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2934 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2935 SCM_SET_UVECTOR_LENGTH): Removed.
2936
2937 2004-11-02 Marius Vollmer <mvo@zagadka.de>
2938
2939 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
2940 Thanks!
2941
2942 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2943 first and the second line of the SCM_DEFINE macro call, since old
2944 preprocessors cannot handle definitions that are split into two
2945 lines.
2946
2947 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2948 declarations.
2949
2950 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2951 scm_t_uint32 to fix the mismatch between the function declaration
2952 and definition.
2953
2954 * sort.c (quicksort): Don't use C99 variable declarations.
2955
2956 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2957 SCM_BOOL_F if no type matches.
2958
2959 * threads.c (thread_print): Cast a pointer to size_t when printing
2960 with scm_uintprint.
2961
2962 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
2963 defined.
2964 (scm_array_prototype): Deprecated.
2965
2966 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2967
2968 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
2969 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
2970 more efficient access to the u32vector.
2971
2972 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
2973 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
2974 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
2975
2976 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
2977 instead of the old-style dvectors.
2978
2979 * gh_data.c: Use new-style uniform arrays in place of old-style
2980 ones.
2981
2982 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
2983 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
2984
2985 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
2986 instead of old-sytle uvectors.
2987
2988 * convert.c, convert.i.c: Rewritten completely, using
2989 scm_any_to_u8vector, etc and other new-style uniform vector
2990 functions.
2991
2992 * random.c (scm_random_solid_sphere_x,
2993 scm_random_hollow_sphere_x): Do not validate vector argument, this
2994 is already done elsewhere.
2995
2996 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
2997 scm_any_to_u8vector, etc): New.
2998 (scm_uniform_element_size, scm_uniform_vector_length): Do no
2999 longer handle old-style uniform vectors.
3000
3001 * read.c (scm_lreadr): Bugfix: include the last bit in the
3002 bit vector.
3003
3004 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3005
3006 * unif.h, unif.c (scm_array_creator): New.
3007 (scm_i_get_old_prototype): New.
3008 (scm_array_prototype): use it to return old-style prototype, never
3009 return creators.
3010 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3011 arg of SCM_UNDEFINED. The latter is wrong.
3012
3013 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3014 (make_uve): Removed.
3015 (scm_i_proc_make_vector, scm_i_proc_make_string,
3016 scm_i_proc_make_u1vector): New.
3017 (scm_init_unif): Initialize them.
3018 (scm_i_convert_old_prototype): New.
3019 (scm_make_uve): Use it to get the creator procedure. Removed all
3020 old code that created old-style uniform vectors.
3021 (scm_array_p): Handle generic vectors.
3022 (scm_dimensions_to_uniform_array): Do not fill new array with
3023 prototype when that is a procedure.
3024 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3025 the NDIM argument.
3026 (scm_i_print_array): Print rank for shared or non-zero-origin
3027 vectors.
3028 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3029 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3030 which I do not understand yet.
3031 (scm_array_prototype): Explicitely handle generic vectors.
3032
3033 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3034 (iflo2str): Use icmplx2str for complex numbers.
3035
3036 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3037 scm_i_uniform_vector_prototype): Removed.
3038 (scm_i_uniform_vector_creator): New.
3039 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3040 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3041 Updated all tables and generic functions to support them.
3042 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3043 (scm_init_srfi_4): Initialize them.
3044
3045 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3046 sizeof(CTYPE) as explained in the comment.
3047
3048 * read.c (scm_lreadr): Call scm_i_read_array for all characters
3049 following '#' that can start an array. Explicitely disambiguate
3050 'i' and 'e' between introducing numbers and uniform vectors. Do
3051 not call scm_i_read_homogenous_vector, since that is also handled
3052 by scm_i_read_array now.
3053
3054 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3055
3056 First cut at integrating uniform vectors from srfi-4 with the rest
3057 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3058 vector. The plan is to gradually replace one type after the other
3059 until none is left and then to consider general cleanups and
3060 optimizations.
3061
3062 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3063
3064 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3065 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3066 scm_uniform_vector_to_list, scm_is_uniform_vector,
3067 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3068 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3069 scm_uniform_vector_release): New.
3070 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3071 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3072 from unif.h, unif.c and extended to handle both the old and new
3073 uniform vectors.
3074
3075 * tags.h (scm_tc7_byvect): Commented out.
3076
3077 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3078 the former to the latter.
3079 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3080 srfi-4.h, srfi-4.c.
3081 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3082 (scm_array_p, scm_array_rank, scm_array_dimensions,
3083 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3084 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3085 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3086 vectors. Removed code for scm_tc7_byvect.
3087 (scm_dimensions_to_uniform_array): Fill array with 0 when
3088 prototype is #\nul.
3089 (scm_i_print_array_dimension, scm_i_legacy_tag,
3090 scm_i_print_array): New.
3091 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3092 for scm_tc7_byvect.
3093
3094 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3095 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3096 uniform vectors. Removed code for scm_tc7_byvect
3097
3098 * print.c (iprin1): Removed code for scm_tc7_byvect.
3099 * objects.c (scm_class_of): Likewise.
3100 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3101 * gc-card.c (scm_i_sweep_card): Likewise.
3102 * evalext.c (scm_self_evaluating_p): Likewise.
3103 * eq.c (scm_equal_p): Likewise.
3104
3105 * gh_data.c (gh_chars2byvect): Reimplemented with
3106 scm_make_s8vector.
3107 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3108
3109 * srfi-4.c (take_uvec): New.
3110 (alloc_uvec): Use it.
3111 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3112
3113 * random.c (vector_scale, vector_scale_x): Renamed former to the
3114 latter, since it modifies its argument.
3115 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3116 Do not use scm_universal_vector_length for non-uniform vectors.
3117 Use scm_f64vector_elements to access innards of uniform vectors.
3118
3119 * convert.i.c: Convert srfi-4 style uniform vectors when
3120 requested.
3121 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3122 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3123
3124 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3125
3126 * numbers.h, numbers.c (scm_i_print_double): New.
3127
3128 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3129 ../srfi/ but heavily modified.
3130 * Makefile.am: Add them in all the right places.
3131 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3132 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3133 '#u', and '#s'.
3134
3135 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3136 and made non-static. Changed all uses.
3137
3138 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3139
3140 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3141 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3142 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3143 scm_uintprint to print unsigned integers, raw heap words, and
3144 adresses, using a cast to scm_t_bits to turn pointers into
3145 integers.
3146
3147 * unif.c: Include "libguile/print.h".
3148
3149 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3150 scm_t_intmax values.
3151 (scm_uint2str): New, for scm_t_uintmax.
3152 (scm_iint2str): Argument type changed to scm_t_intmax,
3153 reimplemented in terms of scm_uint2str.
3154
3155 * print.c, print.h (scm_uintprint): New, for printing
3156 scm_t_uintmax values.
3157 (scm_intprint): Argument type changed to scm_t_intmax.
3158
3159 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3160 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3161 strategic places so that the loops can be interrupted.
3162
3163 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3164 "-I$(top_srcdir)/libguile-ltdl".
3165 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3166 "../libguile-ltdl/libguile-ltdl.a".
3167
3168 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3169 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3170 instead of <libguile-ltdl.h>.
3171
3172 2004-10-20 Marius Vollmer <mvo@zagadka.de>
3173
3174 * sort.c (quicksort): Copy pivot out of the array while
3175 constructing the partitions; it could get overwritten otherwise.
3176 Because of the ultimate insertion sort, this bug did not cause
3177 quicksort to fail, it just put all the burdon on the insertion
3178 sort and was thus very slow. Thanks to Rolan Orre for reporting
3179 the slowness!
3180
3181 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3182
3183 * numbers.c (scm_i_range_error): New.
3184 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3185 scm_out_of_range.
3186
3187 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
3188 endpos. State inclusiveness/exclusiveness of bounds in docstring.
3189
3190 * unif.c (scm_array_p): When no prototype is given, explicitely
3191 test for allowable types, do not simply return true. Thanks to
3192 Roland Orre for reporting this!
3193
3194 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3195
3196 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3197 segment to scm_max_segment_size.
3198
3199 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3200
3201 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3202
3203 * inline.h (scm_double_cell): abort if GC running.
3204 (scm_cell): idem.
3205
3206 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3207
3208 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3209 pos == 0.
3210
3211 Keywords no longer store a 'dash symbol'. Instead, they store a
3212 symbol with their real name.
3213
3214 * keywords.h, keywords.c, deprecated.h, deprecated.c
3215 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3216 terms of scm_is_keyword and scm_keyword_dash_symbol.
3217
3218 * keywords.h, keywords.c, discouraged.h, discouraged.c
3219 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3220 scm_c_make_keyword): Discouraged.
3221
3222 * keywords.h, keywords.c (scm_symbol_to_keyword,
3223 scm_keyword_to_symbol): Implemented in C.
3224 (scm_is_keyword, scm_from_locale_keyword,
3225 scm_from_locale_keywordn): New.
3226
3227 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3228
3229 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3230 scm_from_locale_keyword instead of scm_c_make_keyword.
3231
3232 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3233 better error message.
3234
3235 * deprecated.c: Include discouraged.h and keywords.h.
3236
3237 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3238 reading '#:' or ':'. See NEWS for consequences.
3239
3240 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3241
3242 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3243 literals are now read-write again (until SCM_STRING_CHARS is
3244 removed).
3245
3246 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3247 strings with an error message that blames SCM_STRING_CHARS.
3248
3249 * options.c (change_option_setting): Use scm_car instead of
3250 explicit type check plus SCM_CAR.
3251
3252 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3253 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3254 (scm_iprin1): Use them instead of the previoulsy hardcoded
3255 strings.
3256 (scm_init_print): Initialize them.
3257
3258 * backtrace.c (display_frame_expr): Do not remove control
3259 characters from the final string. Print it directly using
3260 scm_display.
3261
3262 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3263 Thanks to Roland Orre!
3264
3265 2004-09-29 Kevin Ryde <user42@zip.com.au>
3266
3267 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3268 be whole original string in match struct, not offsetted substring.
3269
3270 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3271
3272 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3273
3274 2004-09-24 Marius Vollmer <mvo@zagadka.de>
3275
3276 * Makefile.am (EXTRA_DIST): Added gettext.h.
3277
3278 * smob.c, smob.h (scm_assert_smob_type): New.
3279
3280 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
3281 Include GUILE_CFLAGS.
3282 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3283 now.
3284 (libpath.h): Put GUILE_CFLAGS in the build-info.
3285
3286 2004-09-23 Marius Vollmer <mvo@zagadka.de>
3287
3288 * print.h (scm_print_state): Added highlight_objects.
3289 * print.c (make_print_state, scm_free_print_state): Initialize it
3290 to SCM_EOL.
3291 (scm_iprin1): Wrap output in '{...}' when object is contained in
3292 highlight_objects.
3293
3294 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3295 scm_backtrace_with_highlights): New. Set highlight_objects of
3296 printstate.
3297
3298 * error.c (scm_error_scm): Document new meaning of data/rest
3299 argument for out-of-range and wrong-type-arg errors.
3300 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3301 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3302 exception so that it gets highlighted in the backtrace.
3303 Don't talk about "argument" when not giving a position.
3304
3305 * throw.c (handler_message): The rest argument is the fourth
3306 argument, not everything after the third. Call
3307 scm_display_backtrace_with_highlights, passing the rest argument
3308 when appropriate.
3309
3310 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3311
3312 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3313 <bruno@clisp.org>:
3314
3315 * i18n.c: Handle --disable-nls (thanks Bruno).
3316
3317 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3318 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3319
3320 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3321 LC categories.
3322 * posix.c (scm_setlocale): Use it.
3323
3324 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3325 scm_bind_textdomain_codeset): Make wrappers similar to C function
3326 they wrap.
3327
3328 * i18n.h: New file.
3329 * i18n.c: New file.
3330 * gettext.h: New file, taken from GNU gettext.
3331 * init.c: Include libguile/i18n.h.
3332 (scm_init_guile_1): Add call to scm_init_i18n().
3333 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3334 (DOT_X_FILES): Add i18n.x.
3335 (DOT_DOC_FILES): Add i18n.doc.
3336 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3337 (modinclude_HEADERS): Add i18n.h.
3338
3339 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3340
3341 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3342
3343 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3344 discouraged.h. Replaced all uses with scm_is_pair.
3345 (SCM_I_CONSP): New name for SCM_CONSP.
3346
3347 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3348 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3349 scm_cadr, etc): New.
3350 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3351 uses with scm_is_null.
3352
3353 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3354 instead of explicit code.
3355
3356 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3357
3358 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3359 Reworded logic a bit so that #f is returned immediately when s1 is
3360 too short to contain s2.
3361
3362 * regex-posix.c (scm_regexp_exec): Convert string to
3363 zero-terminated locale string before matching against it.
3364
3365 * strings.h, strings.c (scm_substring_read_only,
3366 scm_c_substring_read_only, scm_i_substring_read_only): New.
3367 (RO_STRING_TAG, IS_RO_STRING): New.
3368 (scm_i_string_writable_chars): Bail on read-only strings.
3369
3370 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3371 literals, thus making them read-only as specified by R5RS.
3372
3373 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3374
3375 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3376 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3377
3378 2004-09-21 Marius Vollmer <mvo@zagadka.de>
3379
3380 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3381 numbers.c.
3382 (scm_to_mpz, scm_from_mpz): New.
3383 Thanks to Andreas Vögele!
3384
3385 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3386 just on a line of its own.
3387
3388 * srfi-13.c (scm_string_any, scm_string_every,
3389 scm_string_tabulate, string_upcase_x, string_down_case_x,
3390 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3391 size_t instead of int for indices into strings. Make sure that no
3392 over- or underflow occurs. Thanks to Andreas Vögele!
3393 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3394 indices, which can also be negative.
3395
3396 2004-09-20 Marius Vollmer <mvo@zagadka.de>
3397
3398 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3399
3400 * threads.c (scm_threads_mark_stacks): Call
3401 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3402 only used once.
3403
3404 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3405
3406 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3407 Bugfix: when subtracting unsigned values, make sure that result
3408 does not wrap.
3409
3410 2004-09-09 Kevin Ryde <user42@zip.com.au>
3411
3412 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3413 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
3414 by Andreas Vögele.
3415
3416 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3417
3418 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3419
3420 * eq.c (real_eqv): Pretend that all NaNs are equal.
3421
3422 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3423
3424 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3425
3426 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3427 use size_t for some locals instead of int.
3428
3429 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3430 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3431 (skip_scsh_block_comment): Use scm_input_error instead of
3432 scm_misc_error in case of EOF.
3433
3434 2004-09-07 Kevin Ryde <user42@zip.com.au>
3435
3436 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
3437 Bug report by Bill Schottstaedt.
3438
3439 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3440 column.
3441 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3442
3443 * posix.c (scm_access): Update docstring per manual.
3444
3445 * posix.c (scm_nice): Correction to error detection. Reported by
3446 Matthias Koeppe.
3447
3448 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3449 throw error before unlocking mutex with SCM_ALLOW_INTS.
3450
3451 2004-09-06 Kevin Ryde <user42@zip.com.au>
3452
3453 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3454 available. This also gets around CLK_TCK being absent when
3455 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3456
3457 2004-09-03 Stefan Jahn <stefan@lkcc.org>
3458
3459 * threads.c (scm_threads_mark_stacks): Fixed local variable
3460 definitions.
3461
3462 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
3463 local variable definitions.
3464
3465 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3466 MinGW32 because it conflicts with its pthread headers.
3467 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3468 (scm_strftime): Using scm_from_locale_string() instead of
3469 scm_makfrom0str().
3470
3471 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
3472 part.
3473
3474 * numbers.c (scm_init_numbers): Removed check_sanity() call
3475 inside GUILE_DEBUG. The function has been removed somewhen...
3476
3477 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3478 MinGW32 because it conflicts with its pthread headers.
3479
3480 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3481
3482 * strings.c (SCM_STRINGP): Accept all strings.
3483 (SCM_STRING_CHARS): Reject shared substrings here.
3484
3485 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3486 the Copyright years.
3487
3488 2004-08-27 Kevin Ryde <user42@zip.com.au>
3489
3490 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3491 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3492 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3493
3494 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3495
3496 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3497 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3498 scm_i_symbol_is_interned, scm_i_mem2symbol,
3499 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3500
3501 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3502
3503 * srfi-13.c: First cut at thread-safeness and proper use of
3504 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3505 been inserted. Made sure that no internal string pointer is used
3506 across a SCM_TICK or a possible GC.
3507
3508 * script.c (scm_compile_shell_switches): Use
3509 scm_from_locale_string instead of scm_makfrom0str.
3510
3511 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3512 always been.
3513
3514 2004-08-25 Marius Vollmer <mvo@zagadka.de>
3515
3516 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3517 strop.c.
3518
3519 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3520 * strop.h, strop.c: Removed, they are now empty.
3521 * Makefile.am: Updated for new and removed files.
3522
3523 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3524 to scm_string_to_symbol.
3525
3526 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3527 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3528 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3529 charset instead of libc functions.
3530
3531 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3532 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3533 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3534 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3535 instead of explicit code.
3536
3537 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3538 "srfi-13.h" instead of "strop.h".
3539
3540 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3541 scm_init_srfi_14. Do not call scm_init_strop.
3542
3543 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3544
3545 * numbers.c (scm_inf_p): Synced docstring back from manual.
3546
3547 2004-08-22 Marius Vollmer <mvo@zagadka.de>
3548
3549 * strings.c (get_str_buf_start): New helper function.
3550 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3551 scm_i_string_char, scm_i_string_writable_chars): Use it.
3552 (scm_i_substring_copy): Make START argument optional for C
3553 callers, for upcoming SRFI-13 integration.
3554
3555 2004-08-21 Marius Vollmer <mvo@zagadka.de>
3556
3557 From Richard Todd, Thanks!
3558
3559 * script.c (scm_compile_shell_switches): added '-L' switch to add
3560 to the %load-path.
3561
3562 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3563
3564 * eval.c (unmemoize_exprs): When dropping internal body markers
3565 from the output during unmemoization, also drop those that are not
3566 immediately at the beginning of a body.
3567
3568 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3569
3570 * eval.c (scm_lookupcar1): Report "Variable used before given a
3571 value" insetad of an "Unbound" one for variables that are found
3572 but still contain SCM_UNDEFINED.
3573
3574 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3575 expects a null-terminated string in the locale encoding, but
3576 scm_i_string_writable_chars doesn't give that. Fixed by letting
3577 mkstemp modify a locale version of the tmpl argument and copying
3578 the result back into tmpl.
3579
3580 * strop.c (scm_substring_move_x): Store into str2, not str1.
3581
3582 2004-08-20 Kevin Ryde <user42@zip.com.au>
3583
3584 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3585 to modify the input string.
3586
3587 2004-08-19 Marius Vollmer <mvo@zagadka.de>
3588
3589 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3590 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3591 scm_c_symbol_length.
3592
3593 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3594
3595 New string implementation, with copy-on-write strings and
3596 mutation-sharing substrings, and a new internal string API.
3597 Symbols can now share memory with strings.
3598
3599 * tags.h (scm_tc7_stringbuf): New tag.
3600
3601 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3602 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3603 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3604 uses.
3605 (scm_i_make_string, scm_c_make_string): New, to replace
3606 scm_allocate_string. Updated all uses.
3607 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3608 SCM_STRING_LENGTH): Deprecated.
3609 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3610 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3611 Discouraged. Replaced all uses with scm_from_locale_string or
3612 similar, as appropriate.
3613 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3614 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3615 scm_substring_shared, scm_substring_copy): New.
3616
3617 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3618 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3619 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3620 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3621 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3622 Deprecated.
3623 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3624 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3625 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3626 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3627 Updated all uses.
3628 (scm_gensym): Generate only the number suffix in the buffer, just
3629 string-append the prefix.
3630
3631 * error.c (scm_memory_error): Do not try to throw, just abort.
3632 Throwing will not work anyway.
3633
3634 * gh.h, gh-data.c (gh_set_substr): Made src const.
3635
3636 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3637 (scm_mode_bits): Use it.
3638 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3639 a vector normally and fill that instead of consing a list with a
3640 blocked GC.
3641
3642 * read.c (scm_i_casei_streq): New, for counted strings.
3643
3644 * threads.c (gc_section_count): Removed, thread-sleeping can not
3645 be nested.
3646 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3647 admin mutex so that we can be put to sleep by other threads while
3648 blocking on that mutex. Lock all the heap mutex of all threads,
3649 including ourselves.
3650 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3651 call scm_i_enter_guile.
3652 (scm_thread_mark_stacks): Expect all threads to be suspended.
3653
3654 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3655 scm_gc_mallocated, for now.
3656 (scm_init_storage): Initialize it.
3657 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3658
3659 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3660 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3661 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3662 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3663
3664 * strop.c (scm_string_copy): Use scm_c_substring to get a
3665 copy-on-write string.
3666
3667 2004-08-18 Kevin Ryde <user42@zip.com.au>
3668
3669 * arbiters.c (FETCH_STORE): New macro.
3670 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3671 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3672 scm_try_arbiter and scm_release_arbiter.
3673 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3674 for speed on i386, otherwise using mutex.
3675
3676 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3677 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3678 exact and inexact is #f.)
3679
3680 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3681 to get thread safety of scm_ttyname.
3682
3683 * ports.c (ttyname): Remove prototype, unused.
3684
3685 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
3686 Reported by Michael Tuexen.
3687
3688 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3689
3690 * load.c (scm_init_load_path): Do not pass NULL to
3691 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3692 not set. Thanks to Bill Schottstaedt.
3693
3694 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3695
3696 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3697 locale strings instead of accessing their internals.
3698 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3699 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3700 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3701
3702 * simpos.c (scm_system): Convert SCM strings to locale strings
3703 instead of accessing their internals.
3704
3705 * script.c (scm_compile_shell_switches): Convert version to locale
3706 string before printing it.
3707
3708 * rdelim.c (scm_read_delimited_x): Avoid
3709 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3710 of scm_from_long for the returned number of read characters.
3711
3712 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3713 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3714
3715 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3716 Use them instead of SCM_SYSCALL when one or two strings need to be
3717 converted into locale strings.
3718 (my_rename): New, gathers platform dependent code for renaming.
3719 (scm_rename): Use it.
3720 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3721 strings instead of accessing their internals.
3722 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3723 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3724 SCM_STRING_LENGTH.
3725
3726 * extensions.c (load_extension): Convert lib and init to locale
3727 strings instead of accessing the internals directly.
3728 (scm_c_load_extension): Use scm_from_locale_string instead of
3729 scm_makfrom0str.
3730
3731 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3732 scm_fdes_to_port, but take mode bits directly instead of as a C
3733 string.
3734 (scm_i_fdes_to_port): Implement using above.
3735 (scm_open_file): Use scm_i_fdes_to_port together with
3736 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3737 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3738 with scm_i_mode_bits to avoid accessing internals of SCM string
3739 from C.
3740
3741 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3742 SCM string as argument.
3743
3744 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3745 bits directly instead of C string.
3746 (scm_void_port): Implement using above.
3747 (scm_sys_make_void_port): Use scm_i_void_port together with
3748 scm_i_mode_bits to avoid accessing internals of SCM string.
3749
3750 * strings.h, strings.c (scm_i_get_substring_spec): New.
3751
3752 * socket.c, rw.c, deprecated.h, validate.h
3753 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3754 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3755 scm_to_locale_string, etc.
3756 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3757 above, plus scm_i_get_substring_spec.
3758
3759 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3760 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3761 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3762 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3763 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3764 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3765 with more explicit scm_remember_upto_here_1, etc, or introduced
3766 them in the first place.
3767
3768 * posix.c (WITH_STRING): New helper macro. Use it where one
3769 locale string is needed for a short piece of code.
3770 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3771 when one locale string is needed.
3772 (scm_mkstemp): Convert tmpl to a locale string.
3773 (scm_putenv): Rewritten to use only C strings.
3774 (scm_setlocale, scm_crpt): Convert argument strings to locale
3775 strings.
3776
3777 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3778
3779 * load.c (scm_primitive_load_path): Do not check for absolute
3780 filenames when scm_sys_search_load_path returns false, which will
3781 return absolute filenames unchanged.
3782
3783 2004-08-11 Marius Vollmer <mvo@zagadka.de>
3784
3785 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3786 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3787 of an alist. Thanks to Matthias Koeppe!
3788
3789 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3790
3791 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3792 Moved from string.h to deprecated.h.
3793
3794 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3795
3796 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
3797 SCM_I_MAKE_STRING_TAG, changed all uses.
3798 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3799 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3800 respectively. For a short time, the old names are still there as
3801 aliases. Not all uses have been changed yet, but the ones in
3802 strings.c have.
3803 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3804 SCM_T_BITS_MAX.
3805 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3806 scm_take_locale_string, scm_take_locale_stringn,
3807 scm_to_locale_string, scm_to_locale_stringn,
3808 scm_to_locale_stringbuf): New.
3809 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3810 deprecated.[hc]. Implemented in terms of the new functions above.
3811 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3812 scm_makfrom0str): Reimplemented in terms of the new functions from
3813 above. They will be discouraged shortly.
3814 (scm_substring): Do not use scm_mem2string.
3815 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3816 to replace similar code from posix.c, simpos.c, and dynl.c.
3817 (scm_string_append): Use memcpy instead of explicit loop. Do not
3818 use register keyword. Use plain 'char' instead of 'unsigned
3819 char'.
3820
3821 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3822 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3823
3824 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3825 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3826 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3827 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3828
3829 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3830 string. This avoids a conversion round-trip.
3831
3832 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3833 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3834 SCM_I_STRING_LENGTH, respectively.
3835 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3836
3837 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3838 of a string, call scm_display on the string itself.
3839
3840 * dynwind.c, dynwind.h (scm_frame_free): New.
3841
3842 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3843 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3844 Replaced uses of SCM_STRING_CHARS with proper uses of
3845 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3846 Replaced scm_mem2string with scm_from_locale_string.
3847
3848 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3849 Removed, replaced all uses with scm_i_allocate_string_pointers.
3850
3851 * load.h, load.c (scm_internal_parse_path): Removed.
3852 (scm_parse_path): Use scm_string_split to do the work.
3853 (scm_init_load_path): Use scm_parse_path instead of
3854 scm_internal_parse_path.
3855 (scm_search_path): Rewritten string handling part of the code in
3856 terms of scm_to_locale_stringbuf and so that it is thread safe.
3857
3858 * error.c (scm_error_scm): Throw directly instead of calling
3859 scm_error, this avoids the back and forth conversion of SUBR and
3860 MESSAGE and also plugs a memory leak.
3861 (scm_error): Call scm_error_scm.
3862
3863 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3864 (display_header): Print FNAME when it is true, not
3865 merely when it is a string.
3866
3867 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3868 unceremoniously. They were unused by Guile itself, and external
3869 use should stop immediately.
3870
3871
3872 2004-08-10 Marius Vollmer <mvo@zagadka.de>
3873
3874 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3875 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3876 deprecated versions installed in deprecated.h and deprecated.c.
3877 Changed all uses.
3878
3879 2004-08-06 Rob Browning <rlb@defaultvalue.org>
3880
3881 * net_db.c (scm_resolv_error): don't cause an exception while
3882 trying to throw an exception -- call scm_misc_error with correct
3883 arguments. The previous arguments needed a format escape that
3884 wasn't in any of the format strings.
3885
3886 2004-08-06 Kevin Ryde <user42@zip.com.au>
3887
3888 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3889 so as not to depend on signedness of plain char. For byvect range
3890 check, throw out-of-range rather than wrong-type-arg.
3891
3892 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3893 signed byte range checks by using scm_to_schar and scm_from_schar,
3894 don't want to depend on signedness of C char.
3895
3896 2004-08-05 Kevin Ryde <user42@zip.com.au>
3897
3898 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3899 SCM_DEFER_INTS.
3900 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3901 guaranteed if multiple threads compete to unlock.
3902 Update docstrings per doc/ref/api-scheduling.texi.
3903
3904 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3905 stat on the filename, to be certain a file rename can't mean we get
3906 info on one filesystem object but open another. This fstat usage is
3907 similar to Emacs copy-file.
3908
3909 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3910
3911 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3912 SIGINT and SIGQUIT, since those values are ints.
3913
3914 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3915
3916 * num2integral.i.c, num2float.i.c: Removed.
3917 * Makefile.am (noinst_HEADERS): Updated.
3918
3919 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3920 scm_i_make_ratio and made static, replaced uses with scm_divide.
3921 (scm_complex_p): New, export as "complex?" to Scheme.
3922 (scm_number_p): Export as "number?" to Scheme.
3923 (scm_is_complex, scm_is_number): New.
3924 (scm_c_make_rectangular, scm_c_make_polar): New.
3925 (scm_make_rectangular, scm_make_polar): Use above.
3926 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3927 New.
3928 (scm_make_complex): Discouraged by moving to discouraged.h and
3929 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3930
3931 * discouraged.h, discouraged.c, numbers.c, numbers.h
3932 (scm_is_rational): New.
3933 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3934 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3935 Removed prototypes.
3936 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3937 Discouraged by moving to discouraged.h and discouraged.c.
3938 Replaced all uses with scm_from_double.
3939 (scm_num2float, scm_num2double): Discouraged by moving prototype
3940 to discouraged.h and rewriting in terms of scm_to_double.
3941 Replaced all uses with scm_to_double.
3942 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3943 explicit code.
3944 (scm_from_double): Do not implement in terms of scm_make_real, use
3945 explicit code.
3946
3947 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3948
3949 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3950
3951 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3952 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3953
3954 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3955 Renamed to SCM_I_* in order to avoid collisions with the versions
3956 defined in deprecated.h.
3957
3958 * discouraged.h, discouraged.c: New files.
3959
3960 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
3961 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
3962 deprecated to being discouraged by moving to discouraged.h.
3963
3964 * numbers.h, numbers.c, discouraged.h, discouraged.c
3965 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
3966 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
3967 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
3968 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
3969 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
3970 scm_num2ulong_long): Discouraged by moving to discouraged.h and
3971 discouraged.c and reimplementing in terms of scm_from_* and
3972 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
3973 functions.
3974
3975 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
3976 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
3977 scm_i_size2big, scm_i_ptrdiff2big): Removed.
3978 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
3979 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
3980 explicit code.
3981
3982 2004-08-02 Kevin Ryde <user42@zip.com.au>
3983
3984 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
3985 and current usage and migration.
3986
3987 2004-07-31 Kevin Ryde <user42@zip.com.au>
3988
3989 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
3990 it's not thread safe.
3991 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
3992 advantage of this.
3993 * fports.c (scm_open_file): Use scm_strerror likewise.
3994 * filesys.c (scm_stat, scm_lstat): Ditto.
3995
3996 * filesys.c (scm_copy_file): Avoid fd leak when destination file
3997 cannot be opened.
3998
3999 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4000 update, for thread safety.
4001 (gensym_counter): Move into scm_gensym which is its only user.
4002 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4003
4004 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4005
4006 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4007 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4008 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4009 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4010 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4011 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4012 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4013 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4014 defined in terms of scm_to_signed_integer, etc, but in terms of
4015 scm_to_int8, etc.
4016
4017 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4018
4019 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4020 no longer used.
4021
4022 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4023 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4024
4025 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4026 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4027 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4028 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4029 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4030 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4031 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4032
4033 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4034 the functions below.
4035
4036 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4037 conv-uinteger.i.c.
4038
4039 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4040 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4041 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4042 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4043 scm_from_uint64): Turned from macros into proper functions.
4044 (scm_to_signed_integer, scm_to_unsigned_integer,
4045 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4046 conv-integer.i.c and conv-uinteger.i.c, as well.
4047
4048 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4049 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4050 the limits. Those are always defined.
4051
4052 2004-07-29 Kevin Ryde <user42@zip.com.au>
4053
4054 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4055
4056 2004-07-28 Kevin Ryde <user42@zip.com.au>
4057
4058 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4059 safety.
4060
4061 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4062 consistency with other vector types and to get arg and func name into
4063 error message.
4064
4065 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4066
4067 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4068 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4069 scm_from_bool, respectively.
4070 (SCM_NINUMP): Added.
4071
4072 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4073 deprecated.h. Replaced all uses with scm_is_eq.
4074
4075 2004-07-24 Kevin Ryde <user42@zip.com.au>
4076
4077 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4078 * posix.c (scm_crypt): Use it to protect static data in crypt().
4079
4080 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4081
4082 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
4083 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
4084 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4085 versions to deprecated.h and deprecated.c. Changed all uses to
4086 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4087 scm_from_*, as appropriate.
4088
4089 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4090 the unexisting scm_cross_dynwind_binding_scope for inums on the
4091 windlist.
4092
4093 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4094
4095 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
4096 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
4097 byte-wise address to a SCM integer. Changed all uses.
4098 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4099 scm_to_ipv6 and added type and range checking, for converting from
4100 an IPv& byte-wise address to a SCM integer. Changed all uses.
4101 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4102 is now done by scm_to_ipv6.
4103
4104 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4105 not accept inexact integers.
4106
4107 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4108 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4109 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4110 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4111 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4112 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4113 fixnum/bignum distinction visible. Changed all uses to
4114 scm_to_size_t or similar.
4115
4116 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4117
4118 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4119
4120 2004-07-10 Kevin Ryde <user42@zip.com.au>
4121
4122 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4123 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4124 such a size causes divide-by-zeros in scm_hasher.
4125
4126 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4127 leak.
4128
4129 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4130
4131 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4132 Rewritten using the same logic as scm_to_signed_integer and
4133 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4134 use CHAR_BIT instead of hardcoding 8.
4135 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4136 SCM_I_LLONG_MIN etc. instead.
4137
4138 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4139 SCM_I_MAKINUM and changed all uses.
4140 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4141
4142 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4143 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
4144 them by assuming twos-complement.
4145
4146 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4147
4148 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4149 configure now produces.
4150 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4151 definitions, giving the limits of the integer types defined by
4152 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4153 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4154
4155 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4156 SHORT_MIN.
4157 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4158 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4159 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4160 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4161 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4162 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4163 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4164 scm_from_uintmax): New.
4165
4166 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4167
4168 * tags.h (scm_is_eq): New.
4169
4170 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4171 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4172 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4173 scm_from_bool, and scm_is_bool, respectively.
4174
4175 * boolean.h (scm_is_bool): Fix bug in prototype.
4176 (scm_from_bool): The argument is "x" not "f", stupid.
4177
4178 * boolean.c (scm_is_bool): Fix typo.
4179
4180 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4181 scm_is_unsigned_integer, scm_to_signed_integer,
4182 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4183 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4184 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4185 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4186 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4187 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4188 New.
4189
4190 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4191
4192 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4193 scm_to_bool): New.
4194
4195 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4196
4197 * backtrace.c (display_expression, display_frame): Call
4198 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4199 single memoized expression.
4200
4201 * debug.c (memoized_print): Don't try to unmemoize the memoized
4202 object, since we can't know whether it holds a single expression
4203 or a body.
4204
4205 (scm_mem_to_proc): Removed check for lambda expression, since it
4206 was moot anyway. Whoever uses these functions for debugging
4207 purposes should know what they do: Creating invalid memoized code
4208 will cause crashes, independent of whether this check is present
4209 or not.
4210
4211 (scm_proc_to_mem): Take the closure's code as it is and don't
4212 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4213 memoized code should not be modified.
4214
4215 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4216 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4217 available as a guile internal function instead. However,
4218 scm_i_unmemoize_expr will only work on memoized objects that hold
4219 a single memoized expression. It won't work with bodies.
4220
4221 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4222 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4223 i. e. a list of expressions.
4224
4225 * eval.c (unmemoize_exprs): Drop internal body markers from the
4226 output during unmemoization.
4227
4228 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4229 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4230 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4231 as guile internal functions instead. scm_i_unmemoize_expr will
4232 only work on a single memoized expression, while
4233 scm_i_unmemocopy_body will only work on bodies.
4234
4235 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4236
4237 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4238
4239 (scm_cons_source, scm_primitive_eval): Prefer higher level
4240 predicate SCM_FALSEP over SCM_IMP.
4241
4242 2004-06-15 Rob Browning <rlb@defaultvalue.org>
4243
4244 * script.c (scm_shell_usage): minor phrasing change.
4245
4246 * gc_os_dep.c: update ifdefery for macosx.
4247 (scm_get_stack_base): separate result initialization from
4248 declaration to slience warnings with macosx and hp-ux using gcc
4249 3.3. Thanks to Andreas Vögele.
4250
4251 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4252
4253 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4254
4255 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4256
4257 * list.[ch] (scm_i_finite_list_copy): New internal function to
4258 copy lists that are known to be finite (though not necessarily
4259 proper).
4260
4261 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4262 a closure's argument list like an expression of a body.
4263
4264 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4265 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4266 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4267 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4268 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4269 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4270 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4271 unmemoize_builtin_macro): New static functions and symbols.
4272
4273 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4274 now has a slightly different meaning: The memoized form that is
4275 receives as its argument is now interpreted as a sequence of
4276 expressions from a body.
4277
4278 (unmemocar, scm_unmemocar): Since the whole functionality of
4279 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4280 has its old content back and is deprecated, while unmemocar has
4281 been removed.
4282
4283 (SCM_BIT7): Removed.
4284
4285 (CEVAL): For unmemoizing a single expression, call
4286 unmemoize_expression instead of scm_unmemocopy, which now expects
4287 a sequence of body expressions. Eliminated unnecessary empty
4288 environment frame when executing let* forms. Eliminated
4289 unmemoization step from evaluator.
4290
4291 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4292
4293 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4294 macroexp and made static. Added new version of scm_macroexp that
4295 emits a deprecation warning and then calls macroexp.
4296 (scm_m_undefine): Issue deprecation warning.
4297
4298 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4299
4300 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4301 Modified to make set! work on symbols that represent syntactic
4302 keywords.
4303
4304 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4305
4306 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4307 compound expression as lvalue errors.
4308
4309 2004-05-24 Marius Vollmer <mvo@zagadka.de>
4310
4311 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4312 WINDER_DATA to a SCM.
4313
4314 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4315
4316 * goops.c (compute_getters_n_setters, create_standard_classes,
4317 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4318 lambda expression rather than creating them with scm_closure.
4319
4320 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4321
4322 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4323 misplaced syntactic keywords. This will not work unless guile's
4324 defmacro feature is deprecated.
4325
4326 (scm_m_case): Fixed a bug that caused the list of labels to grow
4327 with every case form.
4328
4329 2004-05-19 Kevin Ryde <user42@zip.com.au>
4330
4331 * numbers.c (scm_round_number): For inum and big, just return x. For
4332 real, use scm_round for 2^54-1 etc problems covered there.
4333
4334 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4335 doesn't provide trunc. This was for when `truncate' was done as a
4336 scm_tc7_dsubr, no longer required.
4337
4338 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4339 to stack marking call, two parameters and no cast on t->base.
4340
4341 2004-05-18 Marius Vollmer <mvo@zagadka.de>
4342
4343 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4344 processed hashtables back into the weak_hashtables list. Thanks
4345 to Bill Schottstaedt!
4346
4347 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4348
4349 * eval.c (unmemoize_quote): New static function.
4350
4351 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4352 representation of 'quote' and '@slot-ref' to an improper list.
4353 This reduces execution time, the number of cells used to hold the
4354 memoized code, and thus also reduces garbage collection time.
4355
4356 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4357
4358 (SCM_CEVAL): Changed macro handling to also work with macros that
4359 return improper lists. Added an assertion, that the code returned
4360 by a macro transformer will not lead to cycles in the memoized
4361 code.
4362
4363 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4364
4365 No functional change, just rearrangements of functions within the
4366 file.
4367
4368 * eval.c (scm_ilookup, scm_unbound_variable_key,
4369 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4370 the definitions used for execution, since that's where they will
4371 belong to later.
4372
4373 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4374
4375 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4376 throughout guile, has not been part of an official release yet,
4377 and the concept of sloppy predicates has never been a good idea.
4378
4379 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4380 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4381 Simplified.
4382
4383 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4384
4385 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4386 to make explicit what happens.
4387
4388 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4389
4390 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4391 explicit what happens.
4392
4393 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4394 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4395
4396 2004-05-11 Marius Vollmer <mvo@zagadka.de>
4397
4398 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4399 is indeed a procedure when it isn't a number.
4400
4401 2004-05-10 Marius Vollmer <mvo@zagadka.de>
4402
4403 Convert floating point numbers into strings with an arbitrary
4404 radix. Thanks to Richard Todd!
4405
4406 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4407 fit.
4408 (fx): Removed.
4409 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4410 number_chars): New, to support variable radices.
4411 (idbl2str): Use above instead of the old base-10 only tables.
4412 (iflo2str): Pass on new RADIX argument to idbl2str.
4413 (scm_number_to_string): Pass radix to iflo2str.
4414 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4415 iflo2str.
4416 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4417 possible radices.
4418
4419 2004-05-10 Kevin Ryde <user42@zip.com.au>
4420
4421 * numbers.c (scm_logbit_p): Correction to test above the end of an
4422 inum. Reported by Jan Konecny.
4423
4424 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4425
4426 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4427 scm_t_bits. Updated all users.
4428 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4429 duplicating the code.
4430 (SCM_CELL_OBJECT_LOC): New.
4431 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4432 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4433
4434 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4435 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4436 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4437 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4438 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4439 SCM_SMOB_OBJECT_3_LOC): New.
4440 * smob.c (scm_i_set_smob_flags): New function.
4441
4442 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4443 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4444 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4445 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4446 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4447 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4448
4449 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4450 taking the address of SCM_CELL_WORD_1, the latter being no longer
4451 an lvalue.
4452
4453 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4454 of casting SCM_CELL_WORD_LOC.
4455
4456 2004-05-02 Kevin Ryde <user42@zip.com.au>
4457
4458 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
4459 --disable-deprecated. Reported by Andreas Vögele.
4460
4461 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
4462 particular on HP-UX). Reported by Andreas Vögele.
4463
4464 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4465 code has support for. Fixes building with AIX cc, which is ansi but
4466 doesn't define __STDC__. Reported by Keith Crane.
4467 (var_start): Remove macro, this variation no longer required.
4468 (scm_list_n): Use va_start directly.
4469
4470 2004-05-01 Kevin Ryde <user42@zip.com.au>
4471
4472 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
4473 is now gone. Reported by Andreas Vögele.
4474
4475 2004-04-28 Kevin Ryde <user42@zip.com.au>
4476
4477 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4478 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4479 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
4480 subscript. Reported by Andreas Vögele.
4481 Also cast through unsigned char to avoid passing negatives to those
4482 macros if input contains 8-bit values.
4483
4484 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4485 corrections to range check for signed numbers. Remove
4486 scm_remember_upto_here_1(num) from these checks, since num is used
4487 subsequently anyway.
4488
4489 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4490 avoid warning from gcc 3.4. Reported by Hyperdivision.
4491
4492 * numbers.c (scm_bit_extract): Use min instead of MIN.
4493 (MIN): Remove, this conflicts with similar macro defined by limits.h
4494 on HP-UX. Reported by Andreas Vögele.
4495
4496 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
4497 particular on HP-UX). Reported by Andreas Vögele.
4498
4499 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
4500 Reported by Andreas Vögele.
4501
4502 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4503 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
4504 by Andreas Vögele.
4505
4506 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4507
4508 * eval.c (s_macro_keyword): New static identifier.
4509
4510 (scm_m_define): Change order to first create binding and
4511 evaluating the expression afterwards.
4512
4513 (scm_m_set_x): Memoize complete set! expression. Only leave
4514 symbols if no binding exists at memoization time. Throw error if
4515 assigning to a syntactic keyword.
4516
4517 (lazy_memoize_variable): New function.
4518
4519 (CEVAL): When execution set!, perform lazy memoization if
4520 unmemoized symbol is detected.
4521
4522 * modules.c (module_variable): Return variables with unbound
4523 value.
4524
4525 * tags.h: Fix comment.
4526
4527 2004-04-25 Kevin Ryde <user42@zip.com.au>
4528
4529 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4530 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4531 in 8-bit locales, and ensures consistency with char-upper-case? and
4532 char-lower-case? which already use ctype.h.
4533 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4534 Remove.
4535 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4536
4537 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4538 call. Reported by Hyperdivision.
4539
4540 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4541 Reported by Hyperdivision.
4542
4543 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4544 Hyperdivision.
4545
4546 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4547
4548 Hide the implementation of ilocs and isyms in eval.c.
4549
4550 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4551 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4552 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4553 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4554 eval.h to eval.c.
4555
4556 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4557 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4558 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4559 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4560 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4561 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4562 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4563 renamed to ISYMNUM.
4564
4565 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4566 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4567 Extracted printing of ilocs and isyms to guile internal functions
4568 scm_i_print_iloc, scm_i_print_isym of eval.c.
4569
4570 2004-04-22 Kevin Ryde <user42@zip.com.au>
4571
4572 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4573
4574 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4575 rounding in x+0.5 when x is a big value already an integer. In
4576 certain hardware rounding cases x+0.5 can give an adjacent integer,
4577 leading to that as the result, when we really just wanted x itself.
4578
4579 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4580
4581 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4582
4583 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4584 added const qualifiers, cast intentionally unused expressions to
4585 void for emphasis, improved comment.
4586
4587 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4588
4589 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4590 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4591 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4592 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4593 Defined the tc8-tag for flags to be 0x04, which will mean that
4594 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4595 to the reduced number of bits and the simpler bit pattern for
4596 SCM_BOOL_F, certain machines may be able to use more efficient
4597 processor instructions to deal with SCM_BOOL_F.
4598
4599 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4600 never been defined in a released version, thus no need to
4601 deprecate them.
4602
4603 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4604 instead of tc9 tags.
4605
4606 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4607 of tc9 tags.
4608
4609 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4610 could have used this definition.
4611
4612 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4613 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4614 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4615 as isyms, as special isyms don't exist any more.
4616
4617 2004-04-18 Kevin Ryde <user42@zip.com.au>
4618
4619 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4620 safety.
4621
4622 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4623 explicit swapping code.
4624
4625 2004-04-15 Kevin Ryde <user42@zip.com.au>
4626
4627 * cpp_sig_symbols.in: Add SIGSYS.
4628
4629 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4630 recursion.
4631
4632 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4633 frac/big and frac/frac, use scm_less_p for exact comparison.
4634
4635 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4636 with big/inum.
4637
4638 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4639
4640 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4641
4642 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4643
4644 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4645 scm_c_{up,down}case.
4646 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4647 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4648
4649 2004-04-06 Kevin Ryde <user42@zip.com.au>
4650
4651 * numbers.c (scm_ash): Remove stray "}" in docstring.
4652
4653 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4654 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4655 calling mpz_cmp_ui in most cases.
4656
4657 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4658 for big == abs(most-negative-fixnum) special case.
4659 (abs_most_negative_fixnum): Remove, no longer used.
4660
4661 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4662 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4663 calling (sigaction NSIG).
4664
4665 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4666 and fork error cases to do this.
4667
4668 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4669
4670 * eval.c (CEVAL): Don't distinguish between short and long
4671 instructions when dispatching - just always dispatch on the
4672 instruction code, which is common for short and long instructions.
4673 Further, removed unnecessary goto statements and added comment.
4674
4675 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4676
4677 * eval.c (scm_unmemocopy): Don't distinguish between short and
4678 long instructions when dispatching - just always dispatch on the
4679 instruction code, which is common for short and long instructions.
4680 Further, removed unnecessary goto statements, fixed indentation
4681 and replaced SCM_IMP predicates by SCM_NULLP.
4682
4683 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4684
4685 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4686 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4687 'checkmacro'.
4688
4689 2004-03-31 Kevin Ryde <user42@zip.com.au>
4690
4691 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4692
4693 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4694
4695 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4696 SCM_DEBUGGINGP:
4697
4698 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4699 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4700 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4701 single interface that also matches the naming conventions.
4702 Probably scm_debug_mode_p should be part of the private interface
4703 anyway.
4704
4705 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4706 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4707 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4708 to scm_debug_mode_p.
4709
4710
4711 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4712
4713 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4714 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4715 from debug.h to eval.h.
4716
4717 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4718 more, just leave it with setting scm_debug_mode_p, which is
4719 equivalent for practical purposes.
4720
4721 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4722 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4723
4724 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4725
4726 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4727 static and renamed it to ceval throughout. Provide a new exported
4728 but deprecated function scm_ceval as a wrapper for backwards
4729 compatibility. The same is done for the deval/scm_deval pair of
4730 functions.
4731
4732 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4733 throughout. Defined CEVAL to ceval or deval, based on compilation
4734 phase.
4735
4736 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4737 to ceval and deval instead of calling *scm_ceval_ptr.
4738
4739 * eval.c (dispatching_eval): New deprecated static function.
4740
4741 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4742 to emulate its old behaviour as closely as possible.
4743
4744
4745 Change the evaluator such that only expressions for which pair? is
4746 true are passed to CEVAL, and such that all other expressions are
4747 evaluated outside of CEVAL:
4748
4749 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4750 expression that is assumed to be memoized already. All but
4751 expressions of the form '(<form> <form> ...)' are evaluated inline
4752 without calling an evaluator.
4753
4754 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4755 expressions of the form '(<form> <form> ...)' inline without
4756 calling an evaluator.
4757
4758 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4759 the special case of unmemoized symbols passed on the top level.
4760
4761 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4762 is known that the expression passed to CEVAL is of the form
4763 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4764 now it is known that the input expression of CEVAL is a pair.
4765
4766 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4767
4768 * eval.c (is_self_quoting_p): New static function.
4769
4770 (scm_m_quote): Use is_self_quoting_p.
4771
4772 (copy_tree): Corrected typo in comment.
4773
4774 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4775
4776 * eval.c (s_scm_copy_tree): idem.
4777
4778 * list.c (s_scm_filter): remove "pointer" from doc string.
4779
4780 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4781
4782 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4783
4784 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4785 (display_frame): idem.
4786 (display_backtrace_file_and_line): idem.
4787
4788 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4789 arguments.
4790
4791 2004-03-26 Kevin Ryde <user42@zip.com.au>
4792
4793 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4794
4795 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4796 big==0 since that never occurs.
4797
4798 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4799 scm_modular_expt, matching scheme level name `modulo-expt'.
4800
4801 * numbers.c (scm_modular_expt): Return a negative remainder for a
4802 negative divisor, the same as `modulo' does.
4803
4804 2004-03-26 Eric Hanchrow <offby1@blarg.net>
4805
4806 * numbers.c, numbers.h (scm_modular_expt): New function.
4807
4808 2004-03-25 Kevin Ryde <user42@zip.com.au>
4809
4810 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4811 return inexact as required by r5rs.
4812
4813 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4814
4815 * eval.c: Separated some definitions relevant for execution from
4816 the memoization part of the file.
4817
4818 (copy_tree): New static function
4819
4820 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4821 structures are detected now and will lead to an exception instead
4822 of forcing guile to run in an endless loop, using up all the
4823 system's memory. Second, arrays in the cdr of an improper list
4824 are now copied. See the new test cases in eval.test.
4825
4826 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4827
4828 * posix.c (scm_gethostname): Make sure len is initialised before
4829 it is used. Restructured to (hopefully) represent possible
4830 configurations more clearly in the code. Added unwind handler.
4831
4832 2004-03-23 Kevin Ryde <user42@zip.com.au>
4833
4834 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4835 MAXHOSTNAMELEN when available.
4836
4837 2004-03-21 Marius Vollmer <mvo@zagadka.de>
4838
4839 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4840 terminator. Rewritten the logic as a state machine, I must have
4841 been doing too much VHDL lately...
4842
4843 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4844 themselves. Thanks to Han-Wen Nienhuys!
4845
4846 * list.c: Changed docstrings so that they no longer talk about
4847 returning 'pointers' to something.
4848
4849 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4850
4851 * gc.c: remove set_debug_cell_accesses! when
4852 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4853 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4854 debugging conditionally.
4855
4856 2004-03-21 Kevin Ryde <user42@zip.com.au>
4857
4858 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4859
4860 2004-03-20 Kevin Ryde <user42@zip.com.au>
4861
4862 * posix.c (scm_gethostname): Preserve errno across free() call.
4863
4864 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4865
4866 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4867 free cells.
4868
4869 2004-03-14 Kevin Ryde <user42@zip.com.au>
4870
4871 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4872 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4873
4874 2004-03-07 Kevin Ryde <user42@zip.com.au>
4875
4876 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4877 than "GMT" always.
4878 (filltime): Make zname parameter "const".
4879
4880 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4881
4882 * threads.c, threads.h (scm_c_scm2thread): New function.
4883
4884 2004-02-29 Kevin Ryde <user42@zip.com.au>
4885
4886 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4887 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4888 particular don't assume "defined (__alpha__) && ! defined (linux)"
4889 means OSF. Remove "SCO" code, which was not really SCO specific and
4890 which John W. Eaton advises should be long past being needed.
4891
4892 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4893 error throw.
4894
4895 2004-02-24 Kevin Ryde <user42@zip.com.au>
4896
4897 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4898
4899 2004-02-22 Kevin Ryde <user42@zip.com.au>
4900
4901 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4902 complex, same as for two args. (Handle only inum, big, real, frac).
4903
4904 2004-02-21 Kevin Ryde <user42@zip.com.au>
4905
4906 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4907 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
4908 Reported by Andreas Voegele.
4909
4910 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4911
4912 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4913 validation.
4914
4915 * read.c (scm_lreadparen): Removed.
4916 (scm_lreadparen1): Renamed scm_i_lreadparen.
4917
4918 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4919
4920 * list.c (scm_list_n): validate non-immediate arguments;
4921 this will catch forgotten a SCM_UNDEFINED.
4922
4923 2004-02-18 Marius Vollmer <mvo@zagadka.de>
4924
4925 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4926 Thanks to Bill Schottstaedt!
4927
4928 * socket.h (scm_gethost): Removed prototype it is already in
4929 "net_db.h". Thanks to Bill Schottstaedt!
4930
4931 2004-02-18 Kevin Ryde <user42@zip.com.au>
4932
4933 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4934 order parameter to mpz_import, in fact with just one word there's no
4935 order to worry about at all.
4936
4937 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4938 and frac==complex, make an exact comparison rather than converting
4939 with fraction2double.
4940
4941 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4942 shared library, since environ is not directly available there.
4943
4944 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4945 standard.
4946
4947 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4948 errno EINVAL in case localtime and gmtime don't set it.
4949 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4950 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4951
4952 2004-02-16 Kevin Ryde <kevin@swox.se>
4953
4954 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4955 which were permitted in the past for these.
4956
4957 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
4958 previous change to numbers.c.
4959
4960 * script.c (scm_shell_usage): Print bug-guile email address, as per
4961 GNU standard. Reported by Han-Wen Nienhuys.
4962
4963 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4964
4965 * unif.c (scm_make_uve): Removed local variable and simplified
4966 code in order to avoid compiler used uninitialized warnings.
4967
4968 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
4969 scm_hash_map.
4970 (scm_hash_fold): Use scm_call_3 directly in the call to
4971 scm_internal_hash_fold instead of going via fold_proc (which is
4972 now removed).
4973 (scm_hash_for_each): Use a trampoline +
4974 scm_internal_hash_for_each_handle.
4975 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
4976 functions.
4977
4978 2004-02-12 Kevin Ryde <user42@zip.com.au>
4979
4980 * ports.c (scm_port_line): In docstring, note first line is 0.
4981 (scm_set_port_line_x): In docstring, note first line is 0.
4982 (scm_port_column): In docstring, there's no default to current input
4983 port, and remove shared port-line @defun.
4984 (scm_set_port_column_x): In docstring, there's no default to current
4985 input port, note first column is 0, remove shared set-port-line!
4986 @defun.
4987
4988 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
4989 convert args the same way that array-set! does.
4990
4991 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
4992 for dvect.
4993 (scm_array_p): Add missing "break"s in switch, fix llvect test look
4994 for "l" not "s", fix dvect to be false for singp(prot) since such a
4995 value is for fvect.
4996 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
4997 (exactly_one_third): New variable.
4998 (scm_init_unif): Initialize it.
4999
5000 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5001
5002 * read.c (scm_read_opts): Change `escaped-parens' to
5003 `elisp-strings'.
5004
5005 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5006
5007 * read.c (scm_read_opts): New opts `elisp-vectors' and
5008 `escaped-parens'.
5009 (s_vector): New.
5010 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5011 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5012 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5013 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5014 `escaped-parens' option set.
5015 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5016 in tokens.
5017 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5018 (scm_lreadparen1): New.
5019
5020 * read.h: Remove conditionally compiled last arg to
5021 scm_lreadparen.
5022 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5023
5024 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5025
5026 * eval.c (m_expand_body): remove stray variable new_body.
5027
5028 2004-01-22 Marius Vollmer <mvo@zagadka.de>
5029
5030 * eval.c (m_expand_body): Rewrite the expression in place (by
5031 overwriting FORMS) also when a letrec is constructed, not only
5032 when no definitions are found. Do not return rewritten expression
5033 to emphasize the in-place rewriting. Changed all users.
5034
5035 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5036
5037 * gc.c: add protected_object_count, a number that is dumped from
5038 gc_stats()
5039
5040 2004-01-11 Marius Vollmer <mvo@zagadka.de>
5041
5042 * dynwind.h, dynwind.c (scm_frame_unwind,
5043 scm_frame_unwind_handler): Renamed and changed all uses.
5044 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5045
5046 2004-01-11 Kevin Ryde <user42@zip.com.au>
5047
5048 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5049 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5050 changes made to scheme-compound.texi.
5051
5052 2004-01-10 Marius Vollmer <mvo@zagadka.de>
5053
5054 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5055 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5056
5057 * guile-snarf.in: Use mkdir to create a unique temporary directory
5058 that we can safely use. Thanks to Stefan Nordhausen!
5059
5060 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5061
5062 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5063 argument since it is always zero now. Changed all callers.
5064 Removed code for handling fluids.
5065
5066 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5067 the wind chain explicitely. Use scm_c_with_fluid for the common
5068 case of only one fluid.
5069 (scm_with_fluid): New.
5070 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5071
5072 * fluids.h, fluids.c (scm_frame_fluid): New.
5073 (scm_with_fluid): New.
5074 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
5075
5076 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5077 do the unwinding directly. It is simple enough.
5078
5079 * dynwind.h, dynwind.c: Did the following renamings:
5080 scm_begin_frame -> scm_frame_begin,
5081 scm_end_frame -> scm_frame_end,
5082 scm_on_unwind -> scm_frame_unwind,
5083 scm_on_rewind -> scm_frame_rewind,
5084 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5085 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5086 Changed all uses.
5087
5088 * aync.h, async.c: Did the follwing renamings:
5089 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5090 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5091 Changed all uses.
5092
5093 * ports.h, ports.c: Did the follwing renamings:
5094 scm_with_current_input_port -> scm_frame_current_input_port,
5095 scm_with_current_output_port -> scm_frame_current_output_port,
5096 scm_with_current_error_port -> scm_frame_current_error_port.
5097 Changed all uses.
5098
5099 2004-01-07 Kevin Ryde <user42@zip.com.au>
5100
5101 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5102 Reported by Richard Todd.
5103
5104 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5105 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5106
5107 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5108 traversing the args list, fixes segv if an improper list is given.
5109 Reported by Rouben Rostamian.
5110
5111 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5112
5113 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5114 swap_data on stack, use a 'malloc obj'.
5115
5116 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5117 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5118 scm_i_... since they are internal. Changed all uses.
5119
5120 * dynwind.c (frame_print): Removed, use the default printer.
5121 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5122 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5123 to protect SCM values.
5124
5125 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5126 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5127 Changed all uses.
5128 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5129
5130 2004-01-05 Marius Vollmer <mvo@zagadka.de>
5131
5132 * ports.h, ports.c (scm_with_current_input_port,
5133 scm_with_current_output_port, scm_with_current_error_port): New.
5134
5135 * async.h, async.c (scm_with_blocked_asyncs,
5136 scm_with_unblocked_asyncs): New.
5137
5138 2004-01-03 Marius Vollmer <mvo@zagadka.de>
5139
5140 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5141 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5142 New.
5143 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5144 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5145 function when the outermost wind point has been reached. The
5146 latter is used to copy a continuation stack at the right time.
5147 scm_dowinds remains available.
5148 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5149 tc16_guard, guards_print): Removed.
5150 (scm_internal_dynamic_wind): Reimplemented using frames.
5151
5152 * continuations.c (copy_stack): New, do only the stack copying
5153 part of copy_stack_and_call.
5154 (copy_stack_and_call): Copy the stack after unwinding and before
5155 rewinding.
5156 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5157 copy_stack_and_call.
5158
5159 2004-01-04 Kevin Ryde <user42@zip.com.au>
5160
5161 * numbers.c (scm_less_p): Don't convert frac to float for compares,
5162 can give bad results due to rounding.
5163
5164 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5165 setzone/restorezone protection for DOS.
5166
5167 2003-12-26 Marius Vollmer <mvo@zagadka.de>
5168
5169 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5170 and scm_t_uintmax to be defined in scmconfig.h
5171
5172 2003-12-03 Kevin Ryde <user42@zip.com.au>
5173
5174 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5175
5176 * numbers.c (scm_make_ratio): Check for numerator equal to
5177 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5178 giving integer -1.
5179
5180 * numbers.c (scm_real_part): Return fraction unchanged rather than
5181 converting to flonum.
5182
5183 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5184
5185 * modules.c (module_variable): Fixed (and thus simplified) the
5186 definition of SCM_BOUND_THING_P to reflect the fact that since
5187 after the 1.4 series of guile, obarrays only hold variable
5188 objects.
5189
5190 2003-11-30 Marius Vollmer <mvo@zagadka.de>
5191
5192 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5193
5194 From Paul Jarc:
5195
5196 * read.c (scm_lreadr): Signal an error for invalid escape
5197 sequences in strings. Code cleanups too.
5198
5199 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5200 writing control characters in strings.
5201
5202 2003-11-21 Marius Vollmer <mvo@zagadka.de>
5203
5204 * ports.c (scm_drain_input): Bug fix: only access the port after
5205 checking that it indeed is one.
5206
5207 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5208
5209 * eval.c (s_bad_define): New static identifier.
5210
5211 (m_body): Fixed comment.
5212
5213 (scm_m_define): Don't generate memoized code for definitions that
5214 are not on the top level. As a consequence, no memoized code at
5215 all is generated for definitions any more: Top level definitions
5216 are executed immediately during memoization and internal
5217 definitions are handled separately in m_expand_body.
5218
5219 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5220 definitions. Consequently, there is no unmemoizing code any more
5221 that might modify the environment. Thus, the old scm_unmemocopy
5222 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5223
5224 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5225 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5226 over SCM_NIMP in places, where the argument is known to be part of
5227 a proper list.
5228
5229 2003-11-21 Kevin Ryde <user42@zip.com.au>
5230
5231 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5232 for bignums.
5233
5234 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5235 to share some shifting.
5236
5237 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5238 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5239 since gc does this.
5240
5241 2003-11-19 Marius Vollmer <mvo@zagadka.de>
5242
5243 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5244 structure. Previously, not all cases with a negative denominator
5245 were covered.
5246
5247 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5248 scm_divide2real when forming the fractional part. This allows
5249 "#e1.2" to yield 6/5.
5250
5251 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5252 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5253 fractions were equal to each other regardless of value. Ooops.
5254
5255 * numbers.c (scm_rationalize): Return an inexact result when given
5256 inexact arguments.
5257
5258 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5259 non-numbers.
5260
5261 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5262
5263 Support for exact fractions from Bill Schottstaedt! Thanks!
5264
5265 * print.c (scm_iprin1): Handle fractions.
5266
5267 * objects.h (scm_class_fraction): New.
5268 * objects.c (scm_class_fraction): New.
5269 (scm_class_of): Handle fractions.
5270
5271 * hash.c (scm_hasher): Handle fractions.
5272
5273 * numbers.c: New code for handling fraction all over the place.
5274 (scm_odd_p, scm_even_p): Handle inexact integers.
5275 (scm_rational_p): New function, same as scm_real_p.
5276 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5277 New exact functions that replace the inexact 'dsubr'
5278 implementations.
5279 (scm_numerator, scm_denominator): New.
5280
5281 * numbers.h (SCM_NUMP): Recognize fractions.
5282 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5283 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5284 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5285 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5286 SCM_FRACTION_REDUCED): New.
5287 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5288 New prototypes.
5289 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5290 scm_rational_p): New prototypes.
5291 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5292 scm_i_print_fraction): New prototypes.
5293
5294 * goops.c (create_standard_classes): Create "<fraction>" class.
5295
5296 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5297
5298 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5299 case in the switch, but do nothing for now.
5300
5301 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5302 to doubles when calling 'dsubr' functions.
5303
5304 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5305
5306 2003-11-18 Rob Browning <rlb@defaultvalue.org>
5307
5308 * gen-scmconfig.c (main): remove public definition of
5309 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5310 direct typedef of long_long and ulong_long inside deprecated block
5311 when appropriate.
5312
5313 * deprecated.h: move long_long and ulong_long definitions to
5314 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5315 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5316
5317 2003-11-17 Marius Vollmer <mvo@zagadka.de>
5318
5319 * hash.c (scm_string_hash): New hashing algorithm that takes the
5320 complete string into account.
5321
5322 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5323 is a list. This allows (@ ...) to work with set!.
5324 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5325 SCM_ASSYNT.
5326
5327 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5328 the "-e" option instead of scm_str2symbol. This allows things
5329 like (@ ...) to be specified for the entry point.
5330
5331 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5332
5333 * eval.c (scm_m_letstar): Create memoized code in place to
5334 minimize consing.
5335
5336 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5337
5338 * eval.c (s_splicing): Commented and reformulated.
5339
5340 (lookup_global_symbol, lookup_symbol): New static functions.
5341
5342 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5343
5344 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5345 creating a temporary pair for scm_lookupcar.
5346
5347 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5348 created deprecated wrapper function scm_unmemocar.
5349
5350 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5351 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5352 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5353 undefineds, sym_three_question_marks): Moved around without
5354 modifications.
5355
5356 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5357
5358 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5359
5360 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5361 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5362 No further modifications.
5363
5364 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5365
5366 * eval.c (s_mixed_body_forms): New static identifier.
5367
5368 (canonicalize_define, scm_m_define): The check for a bad
5369 expression is performed in canonicalize_define now.
5370
5371 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5372 static helper functions for m_expand_body.
5373
5374 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5375 expand user defined macros. Fixed handling of the definition/
5376 expression boundary. Fixed handling of definitions grouped with
5377 'begin. Use canonicalize_define to expand definitions.
5378
5379 2003-11-13 Marius Vollmer <mvo@zagadka.de>
5380
5381 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5382 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5383
5384 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5385 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5386 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5387 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5388 New macros from Paul Jarc. Thanks!
5389
5390 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5391 return NULL when the machine type is unknown. Previously,
5392 gc_os_dep.c would refuse to compile.
5393
5394 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5395
5396 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5397 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5398 scm_m_body to m_body.
5399
5400 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5401
5402 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5403 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5404 scm_m_expand_body to m_expand_body and made it static. Added
5405 deprecated wrapper scm_m_expand_body.
5406
5407 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5408 of scm_m_expand_body.
5409
5410 2003-11-09 Kevin Ryde <user42@zip.com.au>
5411
5412 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5413 argument. Reported by Mike Gran.
5414
5415 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5416
5417 * eval.c (s_missing_body_expression): New static identifier.
5418
5419 (s_body): Removed.
5420
5421 (scm_m_expand_body): Fixed core dump when passing a body with
5422 defines, but without expressions (see additions to syntax.test).
5423 Use ASSERT_SYNTAX to signal syntax errors.
5424
5425 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5426
5427 * eval.c (canonicalize_define): New static helper function.
5428
5429 (memoize_define, canonicalize_define): Extract handling of
5430 function currying to canonicalize_define.
5431
5432 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5433
5434 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5435 Make sure that error checking in debug mode is not worse than in
5436 standard mode.
5437
5438 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5439
5440 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5441 handled in scm_m_body any more, but rather in scm_m_lambda.
5442
5443 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5444 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5445 calling functions of scm_m_body.
5446
5447 (scm_m_lambda): Avoid unnecessary consing when creating the
5448 memoized code.
5449
5450 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5451
5452 * eval.c (s_expression): Added comment.
5453
5454 (s_empty_combination, error_unbound_variable): New static
5455 identifiers.
5456
5457 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5458 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5459 signal syntax errors.
5460
5461 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5462 scheme objects.
5463
5464 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5465
5466 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5467 Grouped together with unmemocopy, without modifications.
5468
5469 (build_binding_list, unmemocopy): Renamed names of list arguments
5470 and variables to reflect the actual order of the list elements.
5471
5472 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5473
5474 * eval.c (s_defun): New static identifier.
5475
5476 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5477 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5478 when creating the memoized code.
5479
5480 2003-10-19 Kevin Ryde <user42@zip.com.au>
5481
5482 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5483
5484 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5485 in accordance with R5RS, which just mpz_get_d doesn't really give.
5486
5487 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5488
5489 * eval.c (s_bad_slot_number): New static identifier.
5490
5491 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5492 signal syntax errors. Avoid unnecessary consing when creating the
5493 memoized code.
5494
5495 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5496
5497 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5498 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5499 errors. Avoid unnecessary consing when creating the memoized
5500 code.
5501
5502 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5503 standard case. Make sure line and file information are copied to
5504 every created expression.
5505
5506 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5507
5508 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5509 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5510 when creating the memoized code.
5511
5512 (scm_m_atbind): Reversed the order, in which the init expressions
5513 are stored and executed. The order of execution is now equal to
5514 the order in which the initializers of the let-forms are executed.
5515 Use check_bindings and transform_bindings.
5516
5517 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5518 !SCM_NULLP. Added some comments.
5519
5520 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5521
5522 * eval.c: Sorted include files alphabetically.
5523
5524 (scm_m_begin): Added comment.
5525
5526 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5527 unnecessary consing when creating the memoized code.
5528
5529 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5530 syntax errors. Be more specific about the kind of error that was
5531 detected.
5532
5533 (scm_m_quote, unmemocopy): As an optimization, vector constants
5534 are now inserted unquoted into the memoized code. During
5535 unmemoization the quotes are added again to provide syntactically
5536 correct code.
5537
5538 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5539
5540 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5541 scm_m_expand_body, check_bindings): Extracted syntax checking of
5542 bindings to new static function check_bindings.
5543
5544 (scm_m_let, memoize_named_let): Extracted handling of named let to
5545 new static function memoize_named_let.
5546
5547 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5548 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5549 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5550 unnecessary consing when creating the memoized code.
5551
5552 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5553
5554 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5555 static identifiers.
5556
5557 (s_clauses, s_formals, s_duplicate_formals): Removed.
5558
5559 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5560 specific about the kind of error that was detected. Prepare for
5561 easier integration of changes for separated memoization.
5562
5563 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5564
5565 * eval.c (s_duplicate_binding): New static identifier.
5566
5567 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5568
5569 (scm_m_define): Added comment about how we check for duplicate
5570 formals.
5571
5572 (scm_m_do): Added check for duplicate bindings.
5573
5574 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5575 unnecessary consing when creating the memoized code.
5576
5577 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5578 scm_c_improper_memq to c_improper_memq, since it is not exported.
5579
5580 (transform_bindings): Call scm_c_memq rather than
5581 scm_c_improper_memq.
5582
5583 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5584
5585 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5586
5587 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5588 static identifiers.
5589
5590 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5591 specific about the kind of error that was detected. Avoid use of
5592 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5593 code, this way also making sure that file name, line number
5594 information etc. remain available.
5595
5596 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5597
5598 * eval.c (memoize_as_thunk_prototype): New static function.
5599
5600 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5601 Avoid unnecessary consing when creating the memoized code.
5602
5603 2003-10-12 Kevin Ryde <user42@zip.com.au>
5604
5605 * list.c (scm_append): Track argument number and use in error.
5606
5607 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5608
5609 * eval.c (s_missing_expression, s_bad_variable): New static
5610 identifiers.
5611
5612 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5613 R5RS terminology for the naming of variables. Be more specific
5614 about the kind of error that was detected. Make sure file name,
5615 line number etc. are added to all freshly created expressions.
5616 Avoid unnecessary consing when creating the memoized code.
5617
5618 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5619
5620 * eval.c (s_extra_expression, s_misplaced_else_clause,
5621 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5622
5623 (s_extra_case_clause): Removed.
5624
5625 (scm_m_case, scm_m_cond): If a clause appears after an else
5626 clause, report a misplaced else clause.
5627
5628 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5629 specific about the kind of error that was detected. Handle bound
5630 'else and '=>. Avoid unnecessary consing when creating the
5631 memoized code.
5632
5633 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5634 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5635 syntactic keyword '=>.
5636
5637 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5638
5639 * eval.c (scm_m_case): Allow empty lists of case labels.
5640
5641 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5642
5643 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5644
5645 * print.c (scm_isymnames): Add names for the new memoizer codes.
5646
5647 * eval.c (s_missing_clauses, s_bad_case_clause,
5648 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5649 literal_p): New static identifiers.
5650
5651 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5652 specific about the kind of error that was detected. Check for
5653 duplicate case labels. Handle bound 'else. Avoid unnecessary
5654 consing when creating the memoized code.
5655
5656 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5657 the syntactic keyword 'else.
5658
5659 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5660
5661 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5662 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5663
5664 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5665 unnecessary consing when creating the memoized code.
5666
5667 2003-10-09 Kevin Ryde <user42@zip.com.au>
5668
5669 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5670 cast gives for values bigger than a long, or for nan or inf.
5671
5672 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5673
5674 * smob.h (scm_make_smob_type): Made the declaration match the
5675 definition.
5676
5677 2003-10-07 Marius Vollmer <mvo@zagadka.de>
5678
5679 * goops.c, objects.h, smob.c, smob.h: Make type names char
5680 const * instead of char *. Thanks to Paul Jarc!
5681
5682 2003-10-02 Kevin Ryde <user42@zip.com.au>
5683
5684 * strports.c (scm_call_with_output_string): scm_get_output_string
5685 rather than scm_strport_to_string, so as to guard against the port
5686 having been closed by the called procedure. Reported by Nic Ferrier.
5687
5688 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5689
5690 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5691
5692 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5693 tags.h to deprecated.h.
5694
5695 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5696
5697 This set of patches introduces a new tc7 code scm_tc7_number for
5698 numbers. Bignums, reals and complex numbers are turned from smobs
5699 into subtypes of scm_tc7_number.
5700
5701 * tags.h (scm_tc7_number): New.
5702
5703 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5704 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5705 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5706 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5707 (scm_class_of), print.c (scm_iprin1), smob.c
5708 (scm_smob_prehistory): Don't handle bignums, reals and complex
5709 numbers as subtypes of scm_tc7_smob any more.
5710
5711 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5712 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5713
5714 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5715
5716 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5717 sizeof (scm_t_complex) to determine the memory size of the
5718 malloc'd area for complex numbers.
5719
5720 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5721
5722 * numbers.c (scm_bigequal): Fixed.
5723
5724 2003-09-16 Marius Vollmer <mvo@zagadka.de>
5725
5726 * stime.c (scm_current_time): 'time' does not set errno so don't
5727 use SCM_SYSERROR for reporting errors.
5728
5729 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5730
5731 This set of patches eliminates the dependency between the
5732 implementation of evaluator specific memoization codes and special
5733 constants like #f, '() etc. ('flags'), which are not evaluator
5734 specific. The goal is to remove definitions of evaluator
5735 memoization codes completely from the public interface. This will
5736 make it possible to experiment more freely with optimizations of
5737 guile's internal representation of memoized code.
5738
5739 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5740
5741 * print.c (iflagnames): New array, holding the printed names of
5742 guile's special constants ('flags').
5743
5744 (scm_isymnames): Now holds only the printed names of the
5745 memoization codes.
5746
5747 (scm_iprin1): Separate the handling of memoization codes and
5748 guile's special constants.
5749
5750 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5751 SCM_IFLAGNUM): new
5752
5753 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5754 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5755 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5756 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5757 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5758 values.
5759
5760 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5761
5762 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5763 tc9 macros and scm_tc9_flag.
5764
5765 2003-09-15 Marius Vollmer <mvo@zagadka.de>
5766
5767 * posix.c (scm_setgroups): Check that the gid list is not too
5768 long. Thanks to Paul Jarc!
5769
5770 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5771
5772 * tags.h: Reduced the number of short instructions from 14 to 13.
5773 The typecode of the former 14th short instruction is now used to
5774 represent long instructions. Changed some comments to reflect
5775 this fact.
5776
5777 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5778 previously used by SCM_IM_DEFINE.
5779
5780 (SCM_IM_DEFINE): Turned into a long instruction.
5781
5782 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5783 instruction.
5784
5785 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5786 code that is separate from all instructions, one level of dispatch
5787 for long instructions can be eliminated.
5788
5789 * print.c (scm_isymnames): Removed some commented code.
5790
5791 2003-09-12 Marius Vollmer <mvo@zagadka.de>
5792
5793 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5794 compiler on IA64.
5795
5796 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5797
5798 * modules.c (scm_module_reverse_lookup): Check that the obarray
5799 really is a hashtable and do nothing if not.
5800
5801 * inline.h: Use "extern inline" only with GCC. Use "static
5802 inline" else.
5803
5804 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5805
5806 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5807 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5808
5809 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5810 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5811 deprecated.h.
5812
5813 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5814
5815 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5816 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5817
5818 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5819 0.0==some_expression to some_expression==0.0. The latter is
5820 better readable. The former is preferred by some people, since it
5821 leads to a compiler error when confusing == with =. However, when
5822 using gcc, a warning will be issued if in an if-statement an
5823 assigment appears. Since many Guile developers are using gcc,
5824 such errors will not remain unnoticed anyway. We can therefore
5825 focus on better readability.
5826
5827 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5828
5829 * tags.h: Added description of Guile's type system. Removed some
5830 old and misleading comments.
5831
5832 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5833
5834 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5835 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5836
5837 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5838
5839 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5840
5841 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5842 respective SLOPPY macro.
5843
5844 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5845
5846 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5847 type string, not SCM_TYP7S.
5848
5849 2003-09-03 Kevin Ryde <user42@zip.com.au>
5850
5851 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5852 2s-complement.
5853
5854 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5855 current timezone requiring SCM_DEFER_INTS.
5856
5857 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5858
5859 * script.c (scm_compile_shell_switches): Make -s switch optional
5860 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5861 VanDevender for the patch!)
5862
5863 2003-08-30 Kevin Ryde <user42@zip.com.au>
5864
5865 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5866 and to have non-integer types rejected as per other logical funcs.
5867
5868 2003-08-28 Kevin Ryde <user42@zip.com.au>
5869
5870 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5871
5872 2003-08-23 Kevin Ryde <user42@zip.com.au>
5873
5874 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5875 thread safe, and could take a long time too.
5876
5877 2003-08-22 Kevin Ryde <user42@zip.com.au>
5878
5879 * numbers.c (scm_difference): Correction to bignum - negative inum.
5880
5881 2003-08-14 Kevin Ryde <user42@zip.com.au>
5882
5883 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5884 [__GNUC__]: Use volatile asm macros rather than a function call.
5885 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5886 macros while defining functions.
5887
5888 * simpos.c (getenv): Use <stdlib.h> for prototype.
5889 (scm_system): In docstring, refer to status:exit-val rather than
5890 "functions above".
5891
5892 2003-08-09 Kevin Ryde <user42@zip.com.au>
5893
5894 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5895 list set by source-properties! rather than an SRCPROPS object,
5896
5897 2003-07-29 Kevin Ryde <user42@zip.com.au>
5898
5899 * properties.c (scm_primitive_property_ref): In docstring, note
5900 parameters to not-found-proc, use hyphens rather than underscores for
5901 that parameter name.
5902 (scm_primitive_property_set_x): In docstring, VAL is the value
5903 parameter not CODE.
5904
5905 2003-07-27 Marius Vollmer <mvo@zagadka.de>
5906
5907 * print.c (scm_print_symbol_name): handle more weird characters by
5908 escaping the symbol name properly. Thanks to Paul Jarc!
5909
5910 * posix.h (scm_setgroups): New prototype.
5911 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5912 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5913 Don't use SCM_WRITABLE_VELTS.
5914
5915 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5916 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5917 Matthias Koeppe!
5918
5919 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5920 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5921 compiles when SCM_C_INLINE is undefined.
5922
5923 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5924
5925 * __scm.h: Reformulated the architecture and compiler properties
5926 in terms of properties of scm_t_bits and SCM variables rather than
5927 in terms of c standard types. This is since it is not known which
5928 of the standard types scm_t_bits and SCM variables will be defined
5929 to.
5930
5931 2003-07-24 Kevin Ryde <user42@zip.com.au>
5932
5933 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5934 and real.
5935
5936 2003-07-18 Kevin Ryde <user42@zip.com.au>
5937
5938 * numbers.c (scm_product): In complex * bignum, correction to
5939 REAL/IMAG fetch, x is the complex, not y.
5940
5941 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5942
5943 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5944 scm_inf_p test as Scheme values.
5945 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5946 and a positive inum.
5947 Use GNU indentation style.
5948
5949 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5950
5951 * values.c (scm_values): Build lists of length 1 by using
5952 scm_list_1 instead of using scm_cons.
5953
5954 2003-07-10 Kevin Ryde <user42@zip.com.au>
5955
5956 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5957 * list.c (scm_list_n): Ditto.
5958
5959 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
5960
5961 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
5962
5963 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
5964 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
5965 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
5966 the other using intptr_t.
5967
5968 2003-07-08 Kevin Ryde <user42@zip.com.au>
5969
5970 * numbers.c (scm_make_polar): Use sincos, when available.
5971 (scm_magnitude): Use hypot.
5972
5973 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
5974 @footnote since it doesn't go through to guile-procedures.txt.
5975
5976 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
5977 outside @var to quieten makeinfo, and use @code.
5978
5979 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5980
5981 * gc-malloc.c (decrease_mtrigger): new function
5982 (increase_mtrigger): new function, separate debug registering and
5983 mtrigger administration.
5984 (scm_gc_realloc): bugfix: do mtrigger administration before the
5985 actual realloc, for the realloc might invalidate a GC-d segment of
5986 memory. Thanks to Sam Hocevar for pointing this out.
5987 (scm_gc_realloc): use scm_malloc_reregister instead of
5988 unregistering and registering in sequence.
5989
5990 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5991
5992 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
5993
5994 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5995
5996 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
5997 clauses.
5998
5999 2003-06-29 Marius Vollmer <mvo@zagadka.de>
6000
6001 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6002 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6003 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6004 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6005 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6006 the release_1_6 branch.
6007
6008 2003-06-25 Stefan Jahn <stefan@lkcc.org>
6009
6010 * continuations.c: Redeclaration of getcontext() via the
6011 __asm__ ("getcontext") directive.
6012
6013 * continuations.h: Include <ucontext.h> instead of
6014 <sys/ucontext.h>.
6015
6016 2003-06-21 Kevin Ryde <user42@zip.com.au>
6017
6018 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6019 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6020 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6021 available.
6022 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6023 (isfinite): Remove, conflicts with C99 isfinite().
6024
6025 2003-06-19 Marius Vollmer <mvo@zagadka.de>
6026
6027 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6028 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6029 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6030 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6031 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6032 the release_1_6 branch.
6033
6034 2003-06-14 Stefan Jahn <stefan@lkcc.org>
6035
6036 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6037 to be functions instead of macros.
6038
6039 * threads.c: Conditionalized inclusion of <sys/time.h> and
6040 <unistd.h>.
6041 (scm_getspecific, scm_setspecific): Made these two function
6042 real part of the API.
6043
6044 * posix.c (s_scm_putenv): Added some code to make a
6045 (putenv "FOO="), i.e. setting an empty string, work also on
6046 Win32 systems. Thanks to Kevin Ryde for the proposal.
6047
6048 2003-06-12 Kevin Ryde <user42@zip.com.au>
6049
6050 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6051 freebsd to comment about need to use unsetenv.
6052
6053 2003-06-02 Marius Vollmer <mvo@zagadka.de>
6054
6055 * ports.c (scm_peek_char): Safe the column of the port around the
6056 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6057
6058 2003-06-07 Kevin Ryde <user42@zip.com.au>
6059
6060 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6061 and friends required by scm_t_bits setups.
6062
6063 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6064
6065 * tags.h (scm_tc2_int): Added.
6066
6067 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6068 scm_tc2_int.
6069
6070 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6071 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6072
6073 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6074
6075 * eval.c: Partially undid my patch from 2003-05-31. This patch
6076 caused the segfault referenced in the previous changelog entry.
6077
6078 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6079
6080 * tags.h: Fixed comment about the immediate type code layout.
6081
6082 * eval.c: Fixed handling of non-special instructions. Without
6083 this patch, guile will segfault on (#\0) and similar instructions.
6084
6085 2003-06-05 Kevin Ryde <user42@zip.com.au>
6086
6087 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6088 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6089
6090 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6091 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6092
6093 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6094
6095 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6096 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6097 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6098 generalized it to apply not only to C level functions but also to
6099 scheme level functions.
6100
6101 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6102 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6103 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6104 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6105 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6106 respectively.
6107
6108 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6109 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6110 eval.h into eval.c and a copy is placed into deprecated.h.
6111
6112 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6113 into eval.c. This definition was not part of the API in any
6114 officially released version of guile and thus does not need to go
6115 through a phase of deprecation.
6116
6117 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6118
6119 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6120 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6121 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
6122 definitions are make static and renamed from scm_s_xxx to s_xxx.
6123 In deprecated.c the original definitions are copied.
6124
6125 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6126 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
6127 eval.h into eval.c and a copy (slightly modified to work in user
6128 code) is placed into deprecated.h.
6129
6130 * eval.c: Use the local static s_xxx definitions instead of the
6131 scm_s_xxx definitions throughout.
6132
6133 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6134
6135 This set of patches separates the representation of the cxr family
6136 of functions (car, cdr etc.) from the dsubr family of functions
6137 (i. e. functions that take a double precision floating point
6138 argument). Further, the algorithm for handling the cxr function
6139 is improved.
6140
6141 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6142 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6143 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6144 cosh, tanh), objects.c (scm_class_of), procprop.c
6145 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6146 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6147 typecode for the dsubr family of functions.
6148
6149 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6150 ramap_dsubr.
6151
6152 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6153 (scm_init_pairs): Make use of the (now usable) second cell element
6154 of a scm_tc7_cxr function to implement the cxr family of functions
6155 more efficiently.
6156
6157 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6158
6159 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6160 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6161 end of an if-else-if-sequence of checks.
6162
6163 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6164
6165 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6166 execution. Generalize apply_closure to apply_proc and use that
6167 for call-with-values.
6168
6169 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6170
6171 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6172 a non closure.
6173
6174 2003-05-30 Stefan Jahn <stefan@lkcc.org>
6175
6176 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6177 appropriately for mingw32 hosts.
6178
6179 * numbers.h: Defining copysign(), isnan() and finite() to
6180 be prefixed by a single '_' for mingw32 hosts.
6181
6182 2003-05-30 Kevin Ryde <user42@zip.com.au>
6183
6184 * numbers.c (z_negative_one): New variable.
6185 (scm_init_numbers): Initialize it.
6186 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6187
6188 2003-05-29 Stefan Jahn <stefan@lkcc.org>
6189
6190 * win32-dirent.c: Use malloc() instead of scm_malloc().
6191
6192 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6193 warning.
6194
6195 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6196 mingw32 build.
6197
6198 * modules.c (s_scm_module_import_interface): Renamed local
6199 variable interface to _interface. Seems like 'interface'
6200 is a special compiler directive for the mingw32 compiler.
6201
6202 * mkstemp.c: Provide prototype to avoid compiler warning.
6203
6204 * load.c (s_scm_search_path): Fixed absolute and relative
6205 path detections for native Windows platforms.
6206
6207 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6208 to build on mingw32).
6209
6210 * gc-freelist.c ("s_scm_map_free_list",
6211 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6212
6213 * fports.c (fport_fill_input): Disable use of
6214 fport_wait_for_input() on Win32 platforms.
6215
6216 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6217
6218 * Makefile.am: Modified some rules for cross compiling.
6219
6220 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6221
6222 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6223 proper function object and the correct number of arguments are now
6224 performed in the application part of SCM_CEVAL.
6225
6226 (scm_badformalsp): Removed.
6227
6228 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6229
6230 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6231
6232 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6233
6234 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6235 always being false by inserting preprocessor conditional. (Thanks
6236 to Bruce Korb.)
6237
6238 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6239 (void *) in order to avoid an aliasing warning; thanks to Bruce
6240 Korb.)
6241
6242 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6243
6244 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6245 SCM_STACK_PTR.
6246
6247 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6248 thread->base --> t->base.
6249
6250 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6251
6252 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6253
6254 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6255 scm_variable_set_name_hint, scm_builtin_variable,
6256 scm_internal_with_fluids, scm_make_gsubr,
6257 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6258 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6259 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
6260 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6261 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6262 scm_make_subr_with_generic, scm_make_subr_opt,
6263 scm_call_catching_errors, scm_make_smob_type_mfpe,
6264 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6265 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6266 branch. Some have been slightly rewritten.
6267 (scm_i_object_chars, scm_i_object_length): New, to support
6268 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6269
6270 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6271
6272 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6273 names and inits in the memoized code of do.
6274
6275 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6276
6277 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6278 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6279 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6280 a compilation error if error-on-warning is enabled).
6281
6282 2003-05-17 Marius Vollmer <mvo@zagadka.de>
6283
6284 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6285 removes preprocessor directives from the snarfage that might
6286 otherwise confuse us. These directives appear when compiling with
6287 "-g3", for example.
6288
6289 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6290
6291 * ChangeLog: add my surname
6292
6293 * srcprop.c (scm_finish_srcprop): use
6294 scm_gc_register_collectable_memory()
6295 (scm_make_srcprops): idem.
6296
6297 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6298
6299 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6300 wrap-around for scm_mtrigger
6301 (scm_gc_register_collectable_memory): abort on overflowing
6302 scm_mallocated().
6303
6304 2003-05-13 Kevin Ryde <user42@zip.com.au>
6305
6306 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6307 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6308
6309 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6310
6311 * backtrace.c (scm_display_error_message): Introduced fancy
6312 printing with max level 7 and length 10. (Purpose: avoid printing
6313 gigantic objects in error messages.)
6314
6315 * print.c, print.h (scm_i_port_with_print_state): New function.
6316
6317 * print.c (scm_iprin1, scm_printer_apply,
6318 scm_port_with_print_state): Use scm_i_port_with_print_state.
6319 (scm_simple_format): Modified not to destroy print states.
6320 (print_state_mutex): New mutex.
6321 (scm_make_print_state, scm_free_print_state, scm_prin1):
6322 Lock/unlock print_state_mutex.
6323
6324 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6325 Use current names in definitions.
6326
6327 2003-05-10 Kevin Ryde <user42@zip.com.au>
6328
6329 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6330
6331 * numbers.c (scm_integer_length): On negative bignums, adjust
6332 mpz_sizeinbase to account for it looking at absolute value where we
6333 want ones-complement.
6334
6335 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6336 since we're only using the ulong return value, and x might not fit.
6337
6338 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6339
6340 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6341 read. This will allow to make the definition in read.c static.
6342
6343 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6344
6345 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6346 from evalext to eval. This will allow to make some of the
6347 definitions in eval.c static.
6348
6349 2003-05-06 Kevin Ryde <user42@zip.com.au>
6350
6351 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6352 (scm_logcount): Use mpz_com, not mpz_neg.
6353
6354 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6355
6356 The purpose of this patch is to make guile's internal memoizers
6357 distinguishable from memoizing macros created on the scheme level
6358 or from user provided primitive memoizing macros. The reason is,
6359 that the internal memoizers are the only ones that are allowed to
6360 transform their scheme input into memoizer byte code, while all
6361 other memoizing macros may only transform scheme code into new
6362 scheme code.
6363
6364 To achieve this, a new macro type 'builtin-macro!' is introduced.
6365 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6366 this will change when the memoizer and executor are separated.
6367
6368 * macros.[ch] (scm_i_makbimacro): New.
6369
6370 * macros.h (SCM_BUILTIN_MACRO_P): New.
6371
6372 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6373
6374 * eval.c, goops.c: All of guile's primitive memoizing macros are
6375 primitive builtin-macros now.
6376
6377 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6378 builtin-macros are handled equally to memoizing macros.
6379
6380 2003-05-04 Marius Vollmer <mvo@zagadka.de>
6381
6382 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6383 work around a bug in GCC 2.95.2 but is now a bug in itself.
6384
6385 2003-05-02 Marius Vollmer <mvo@zagadka.de>
6386
6387 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6388 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6389 scm_tcs_symbols): New.
6390
6391 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6392
6393 * deprecated.h, deprecated.c (scm_protect_object,
6394 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6395 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6396 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6397 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6398 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6399 scm_ptob_descriptor, scm_port_rw_active,
6400 scm_close_all_ports_except): New.
6401
6402 * ports.c (scm_c_port_for_each): New function, mostly copied from
6403 scm_port_for_each.
6404 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6405 * ports.h (scm_c_port_for_each): New prototype.
6406
6407 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6408
6409 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6410 macro was introduced in anticipation of GOOPS method compilation
6411 code.)
6412
6413 * goops.c: Removed binding of @dispatch.
6414
6415 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6416
6417 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6418 instructions that bind the macros on the scheme level back to
6419 goops.c in order to make sure again that the bindings go into the
6420 (oop goops) module and are not visible from the outside.
6421
6422 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6423
6424 * eval.c: Non functional change: Separated R5RS and non-R5RS
6425 macros into different sections of the file and ordered the
6426 memoizers alphabetically.
6427
6428 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6429
6430 * eval.c (scm_ilookup): Rewritten to improve readability.
6431
6432 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6433
6434 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6435 Partially reverted patch from 2003-04-23 in oder to find a better
6436 compromise between readability and debuggability.
6437
6438 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6439
6440 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6441 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6442 definitions of the special goops memoizers from goops.[ch] to
6443 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6444 throughout guile.
6445
6446 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6447
6448 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6449
6450 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6451
6452 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6453
6454 * ioext.c (scm_fdes_to_ports): Ditto.
6455
6456 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6457 lock/unlock scm_i_port_table_mutex.
6458
6459 * strports.c (scm_mkstrport): Ditto.
6460
6461 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6462
6463 * fports.c (scm_fdes_to_port): Ditto.
6464
6465 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6466
6467 This set of patches contains no functional changes, only debatable
6468 minor stylistic ones. Still, in order to prepare a patch between
6469 my local copy and the CVS version, I decided to submit the changes
6470 below. Then, the patch will hopefully only contain relevant
6471 modifications :-)
6472
6473 * eval.c (iqq): Added const specifier.
6474
6475 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6476 Use NULL instead of 0 to indicate that a pointer is returned.
6477 Removed some misleading 'fall through' comments.
6478
6479 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6480 Split up long expressions into smaller ones to be more debugging
6481 friendly.
6482
6483 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6484
6485 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6486 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6487 rather than casting to SCM.
6488
6489 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6490
6491 * sort.c, pairs.h: Removed unnecessary includes.
6492
6493 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6494
6495 * sort.c: Replaced hand-made trampline code by the new official
6496 mechanism from eval.c. This fixes a segfault in the new test file
6497 sort.test.
6498
6499 (quicksort, compare_function, scm_restricted_vector_sort_x,
6500 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6501 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6502 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6503 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6504 eval.c.
6505
6506 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6507 cmp_fun_t): Removed.
6508
6509 (compare_function): Added.
6510
6511 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6512 arithmetics with index arithmetics. Changed quicksort to work on
6513 an array of SCM values instead of an array of characters. Avoid
6514 bytewise copying of SCM elements. Avoid allocating memory on the
6515 stack with alloca. Fixed some comments.
6516
6517 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6518
6519 * eval.c (EXTEND_ENV): Eliminated.
6520
6521 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6522 EXTEND_ENV.
6523
6524 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6525
6526 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6527
6528 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6529 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6530
6531 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6532 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6533 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6534 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6535 functions such that they check if the object is a non-immediate.
6536 Further, renamed identifiers to use the scm_dbg_ prefix and made
6537 their inclusion into the lib dependent of the
6538 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6539
6540 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6541
6542 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6543 debug option.
6544
6545 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6546
6547 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
6548 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6549 any calls to SCM_NCONSP any more.
6550
6551 * unif.c (l2ra): Eliminate redundant check.
6552
6553 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6554
6555 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6556 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6557 SCM_NNULLP. Now, guile itself does not include any calls to
6558 SCM_NNULLP any more.
6559
6560 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6561
6562 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6563 scm_copy_tree): Place assignment expressions which are part of
6564 other expressions into an expression of their own.
6565
6566 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6567
6568 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6569 compare SCM values with !=.
6570
6571 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6572
6573 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6574 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6575 and definition of the memoizer for the generalized set! macro from
6576 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6577 define the macro object.
6578
6579 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6580 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6581 eval.c, it is made static and renamed to s_set_x.
6582
6583 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6584 over SCM_N<foo>.
6585
6586 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6587
6588 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6589 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6590 to undefineds and registered the object as a permanent object.
6591
6592 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6593 static in eval.c, renamed it to f_apply and registered the object
6594 as a permanent object.
6595
6596 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6597
6598 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
6599 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6600
6601 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6602
6603 * numbers.c (scm_logtest): Fixed argument bug in the call to
6604 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6605
6606 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6607
6608 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6609 type errors that showed up when compiling with SCM_DEBUG defined.
6610
6611 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6612
6613 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6614 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6615 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6616 fix compile errors with --disable-deprecated.
6617
6618 2003-04-17 Rob Browning <rlb@defaultvalue.org>
6619
6620 * numbers.c (scm_integer_expt): fix case where we were declaring
6621 vars in the middle of a statement block. Thanks to Thamer
6622 Al-Harbash.
6623
6624 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6625
6626 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6627 change.
6628
6629 * eq.c (scm_eqv_p): Turned into a primitive generic.
6630
6631 2003-04-16 Rob Browning <rlb@defaultvalue.org>
6632
6633 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6634 Thanks to Boyd Gerber.
6635 Added check for __arm__ in addition to arm for LINUX and copied
6636 __s390__ defines from upstream libgc. Thanks to James Treacy for
6637 reporting the problems.
6638
6639 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6640
6641 * socket.c: use SCM_CHAR_BIT.
6642
6643 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6644
6645 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6646
6647 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6648
6649 * feature.c (scm_init_feature): Always add threads feature.
6650
6651 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6652
6653 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6654 scm_at_assert_bound_ref. (We don't want the unbound check. See
6655 oop/goops/active-slot.scm.)
6656
6657 2003-04-14 Rob Browning <rlb@defaultvalue.org>
6658
6659 * tags.h: scm_t_intptr should have been intptr_t.
6660
6661 2003-04-13 Rob Browning <rlb@defaultvalue.org>
6662
6663 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6664 test. Instead use
6665 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6666 as gc_os_dep.c suggests is appropriate.
6667
6668 * goops.c (prep_hashsets): make static to match prototype.
6669 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6670 Chin.
6671
6672 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6673 Albert Chin.
6674
6675 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6676 Klausner.
6677
6678 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6679
6680 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6681 indicated through extra fields in getters-n-setters.
6682 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6683 (Thanks to Andy Wingo.)
6684
6685 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6686
6687 * gc-segment.c: add comment
6688
6689 2003-04-07 Rob Browning <rlb@defaultvalue.org>
6690
6691 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6692 clash.
6693
6694 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6695 and add regression test to standalone/.
6696
6697 2003-04-06 Rob Browning <rlb@defaultvalue.org>
6698
6699 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6700 Thanks to Dale P. Smith.
6701
6702 * random.c: #include gmp.h.
6703 (scm_c_random_bignum): normalize result on return.
6704
6705 * init.c: #include gmp.h.
6706
6707 * numbers.h: remove the gmp.h #include (not needed now).
6708
6709 * posix.h: change occurences of "id" to something else so we don't
6710 cause trouble when included via objective-c (can't hurt, might
6711 help). Still have usage in debug.h, though.
6712
6713 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6714
6715 * random.c (scm_c_random_bignum): Don't generate a random number
6716 equal to m (the second argument of scm_c_random_bignum); only
6717 generate numbers in the range 0 <= r < m.
6718 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6719 scm_var_random_state.
6720
6721 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6722 clause.
6723
6724 2003-04-05 Rob Browning <rlb@defaultvalue.org>
6725
6726 * modules.c (scm_module_import_interface): move declaration of
6727 uses before any code.
6728
6729 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6730
6731 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6732 not top_srcdir.
6733
6734 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6735 processing it in order to avoid an infinite loop.
6736
6737 * print.c (scm_prin1): Remember old state of pstate->writingp.
6738
6739 2003-04-05 Marius Vollmer <mvo@zagadka.de>
6740
6741 * Changed license terms to the plain LGPL thru-out.
6742
6743 2003-04-04 Rob Browning <rlb@defaultvalue.org>
6744
6745 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6746 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6747 rewrite to handle GMP bignums.
6748
6749
6750 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6751
6752 * ports.c (scm_getc): minor tweak.
6753
6754 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6755 rewrite to handle GMP bignums.
6756
6757 * numbers.c: rewrite *many* functions to handle GMP bignums.
6758
6759 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6760 handle GMP bignums.
6761
6762 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6763
6764 * init.c (check_config): remove SCM_BIGDIG conditionals.
6765 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6766
6767 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6768
6769 * eval.c: remove SCM_BIGDIG conditionals.
6770
6771 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6772
6773 2003-03-31 Rob Browning <rlb@defaultvalue.org>
6774
6775 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6776 to Kevin Ryde.)
6777
6778 2003-03-27 Rob Browning <rlb@defaultvalue.org>
6779
6780 * threads.h: fix various preprocessor usages of new public
6781 symbols to expect 0 or 1 values rather than 1 or undefined.
6782 i.e. change #ifdef to #if, etc.
6783
6784 * threads.c: fix various preprocessor usages of new public
6785 symbols to expect 0 or 1 values rather than 1 or undefined.
6786 i.e. change #ifdef to #if, etc.
6787
6788 * tags.h: fix various preprocessor usages of new public
6789 symbols to expect 0 or 1 values rather than 1 or undefined.
6790 i.e. change #ifdef to #if, etc.
6791
6792 * stacks.c: fix various preprocessor usages of new public
6793 symbols to expect 0 or 1 values rather than 1 or undefined.
6794 i.e. change #ifdef to #if, etc.
6795
6796 * stackchk.h: fix various preprocessor usages of new public
6797 symbols to expect 0 or 1 values rather than 1 or undefined.
6798 i.e. change #ifdef to #if, etc.
6799
6800 * stackchk.c: fix various preprocessor usages of new public
6801 symbols to expect 0 or 1 values rather than 1 or undefined.
6802 i.e. change #ifdef to #if, etc.
6803
6804 * sort.c: fix various preprocessor usages of new public
6805 symbols to expect 0 or 1 values rather than 1 or undefined.
6806 i.e. change #ifdef to #if, etc.
6807
6808 * read.c: fix various preprocessor usages of new public
6809 symbols to expect 0 or 1 values rather than 1 or undefined.
6810 i.e. change #ifdef to #if, etc.
6811
6812 * random.c: fix various preprocessor usages of new public
6813 symbols to expect 0 or 1 values rather than 1 or undefined.
6814 i.e. change #ifdef to #if, etc.
6815
6816 * print.c: fix various preprocessor usages of new public
6817 symbols to expect 0 or 1 values rather than 1 or undefined.
6818 i.e. change #ifdef to #if, etc.
6819
6820 * objects.c: fix various preprocessor usages of new public
6821 symbols to expect 0 or 1 values rather than 1 or undefined.
6822 i.e. change #ifdef to #if, etc.
6823
6824 * numbers.h: fix various preprocessor usages of new public
6825 symbols to expect 0 or 1 values rather than 1 or undefined.
6826 i.e. change #ifdef to #if, etc.
6827
6828 * null-threads.c: fix various preprocessor usages of new public
6829 symbols to expect 0 or 1 values rather than 1 or undefined.
6830 i.e. change #ifdef to #if, etc.
6831
6832 * lang.c: fix various preprocessor usages of new public
6833 symbols to expect 0 or 1 values rather than 1 or undefined.
6834 i.e. change #ifdef to #if, etc.
6835
6836 * lang.h: fix various preprocessor usages of new public
6837 symbols to expect 0 or 1 values rather than 1 or undefined.
6838 i.e. change #ifdef to #if, etc.
6839
6840 * iselect.h: fix various preprocessor usages of new public
6841 symbols to expect 0 or 1 values rather than 1 or undefined.
6842 i.e. change #ifdef to #if, etc.
6843
6844 * init.c: fix various preprocessor usages of new public
6845 symbols to expect 0 or 1 values rather than 1 or undefined.
6846 i.e. change #ifdef to #if, etc.
6847
6848 * gh_data.c: fix various preprocessor usages of new public
6849 symbols to expect 0 or 1 values rather than 1 or undefined.
6850 i.e. change #ifdef to #if, etc.
6851
6852 * gh.h: fix various preprocessor usages of new public
6853 symbols to expect 0 or 1 values rather than 1 or undefined.
6854 i.e. change #ifdef to #if, etc.
6855
6856 * gen-scmconfig.c: change most new public symbols to be defined to
6857 0 or 1 rather than being either 1 or undefined.
6858
6859 * gc_os_dep.c: fix various preprocessor usages of new public
6860 symbols to expect 0 or 1 values rather than 1 or undefined.
6861 i.e. change #ifdef to #if, etc.
6862 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6863
6864 * gc.h: fix various preprocessor usages of new public
6865 symbols to expect 0 or 1 values rather than 1 or undefined.
6866 i.e. change #ifdef to #if, etc.
6867
6868 * gc-card.c: fix various preprocessor usages of new public
6869 symbols to expect 0 or 1 values rather than 1 or undefined.
6870 i.e. change #ifdef to #if, etc.
6871
6872 * gc-mark.c: fix various preprocessor usages of new public
6873 symbols to expect 0 or 1 values rather than 1 or undefined.
6874 i.e. change #ifdef to #if, etc.
6875
6876 * feature.c: fix various preprocessor usages of new public
6877 symbols to expect 0 or 1 values rather than 1 or undefined.
6878 i.e. change #ifdef to #if, etc.
6879
6880 * evalext.c: fix various preprocessor usages of new public
6881 symbols to expect 0 or 1 values rather than 1 or undefined.
6882 i.e. change #ifdef to #if, etc.
6883
6884 * eval.h: fix various preprocessor usages of new public
6885 symbols to expect 0 or 1 values rather than 1 or undefined.
6886 i.e. change #ifdef to #if, etc.
6887
6888 * eval.c: fix various preprocessor usages of new public
6889 symbols to expect 0 or 1 values rather than 1 or undefined.
6890 i.e. change #ifdef to #if, etc.
6891
6892 * eq.c: fix various preprocessor usages of new public
6893 symbols to expect 0 or 1 values rather than 1 or undefined.
6894 i.e. change #ifdef to #if, etc.
6895
6896 * coop.c: fix various preprocessor usages of new public
6897 symbols to expect 0 or 1 values rather than 1 or undefined.
6898 i.e. change #ifdef to #if, etc.
6899
6900 * coop-threads.c: fix various preprocessor usages of new public
6901 symbols to expect 0 or 1 values rather than 1 or undefined.
6902 i.e. change #ifdef to #if, etc.
6903
6904 * coop-pthreads.c: fix various preprocessor usages of new public
6905 symbols to expect 0 or 1 values rather than 1 or undefined.
6906 i.e. change #ifdef to #if, etc.
6907
6908 * coop-defs.h: fix various preprocessor usages of new public
6909 symbols to expect 0 or 1 values rather than 1 or undefined.
6910 i.e. change #ifdef to #if, etc.
6911
6912 * convert.i.c: fix various preprocessor usages of new public
6913 symbols to expect 0 or 1 values rather than 1 or undefined.
6914 i.e. change #ifdef to #if, etc.
6915
6916 * continuations.c: fix various preprocessor usages of new public
6917 symbols to expect 0 or 1 values rather than 1 or undefined.
6918 i.e. change #ifdef to #if, etc.
6919
6920 * _scm.h: fix various preprocessor usages of new public symbols to
6921 expect 0 or 1 values rather than 1 or undefined. i.e. change
6922 #ifdef to #if, etc.
6923
6924 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6925
6926 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6927
6928 * deprecated.c, deprecated.h: New files, to collect deprecated
6929 things in one place.
6930 * Makefile.am: Added them in all the right places.
6931
6932 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6933 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6934 builds work.
6935 (DOT_X_FILES): Removed "iselect.x".
6936 (DOT_DOC_FILES): Removed "iselect.doc".
6937
6938 2003-03-25 Rob Browning <rlb@defaultvalue.org>
6939
6940 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6941 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6942
6943 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6944
6945 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6946
6947 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6948 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6949
6950 * threads.h: replace usage of struct timespect with
6951 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6952 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6953 favor of scm_t_timespec from scmconfig.h.
6954
6955 * threads.c: move libguile/_scm.h include to the top so we pick up
6956 any critical defines like _GNU_SOURCE early. Replace usage of
6957 struct timespect with scm_t_timespec. Replace usage of
6958 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
6959 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
6960
6961 * threads-plugin.h: replace usage of struct timespect with
6962 scm_t_timespec.
6963
6964 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
6965 usage of struct timespect with scm_t_timespec.
6966
6967 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
6968 HAVE_INTTYPES_H handling to scmconfig.h. #include
6969 "libguile/__scm.h". Rework handling for scm_t_bits,
6970 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
6971 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
6972 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
6973 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
6974 SCM_HAVE_ARRAYS.
6975
6976 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
6977
6978 * struct.c: #include <config.h> if HAVE_CONFIG_H.
6979
6980 * strports.c: #include <config.h> if HAVE_CONFIG_H.
6981
6982 * strop.c: #include <config.h> if HAVE_CONFIG_H.
6983
6984 * stime.h: move handling of time related headers to scmconfig.h.
6985
6986 * stime.c: #include <config.h> if HAVE_CONFIG_H.
6987
6988 * stacks.c: replace usage of STACK_GROWS_UP with
6989 SCM_STACK_GROWS_UP.
6990
6991 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6992 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6993
6994 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6995 of uint32 and HAVE_UINT_32 with scm_t_int32.
6996
6997 * smob.c: #include <config.h> if HAVE_CONFIG_H.
6998
6999 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7000
7001 * script.c: #include <config.h> if HAVE_CONFIG_H.
7002
7003 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7004
7005 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7006
7007 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7008
7009 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7010
7011 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7012
7013 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7014
7015 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7016 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7017 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7018 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7019
7020 * ramap.c: replace usage of HAVE_LONG_LONGS with
7021 "SCM_SIZEOF_LONG_LONG != 0".
7022
7023 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7024 "libguile/scmconfig.h".
7025
7026 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7027
7028 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7029 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7030
7031 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7032
7033 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7034
7035 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7036
7037 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7038 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7039 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7040 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7041 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7042 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7043 "SCM_SIZEOF_LONG_LONG != 0".
7044
7045 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7046 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7047 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7048 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7049
7050 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7051
7052 * null-threads.h: replace usage of struct timespect with
7053 scm_t_timespec.
7054
7055 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7056
7057 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7058 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7059 scm_t_uint64 and rename usages.
7060
7061 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7062
7063 * load.c: #include <config.h> if HAVE_CONFIG_H.
7064
7065 * iselect.h: move handling of time related headers to scmconfig.h.
7066 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7067 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7068 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7069
7070 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7071 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7072 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7073
7074 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7075
7076 * inline.h: #include "libguile/__scm.h" at the top. Change code
7077 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7078 what to do instead of creating a new public #define. Rename usage
7079 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7080 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7081 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7082
7083 * inline.c: rearrange handling -- now we just #define
7084 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7085 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7086 appropriate, and we use that in inline.h along with the above
7087 define to determine how to respond.
7088
7089 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7090 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7091
7092 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7093
7094 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7095 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7096
7097 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7098
7099 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7100
7101 * gen-scmconfig.c: new file -- see comments in file for details.
7102
7103 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7104
7105 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7106 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7107
7108 * gc.h: replace usage of SIZEOF_LONG with
7109 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7110 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7111 since we handle that in scmconfig.h now.
7112
7113 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7114
7115 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7116 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7117 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7118
7119 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7120
7121 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7122 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7123
7124 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7125
7126 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7127
7128 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7129 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7130
7131 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7132
7133 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7134 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7135
7136 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7137 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7138 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7139 with "SCM_SIZEOF_LONG_LONG != 0".
7140
7141 * error.c: #include <config.h> if HAVE_CONFIG_H.
7142
7143 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7144 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7145 with "SCM_SIZEOF_LONG_LONG != 0".
7146
7147 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7148
7149 * coop.c: replace usage of struct timespect with scm_t_timespec.
7150 #include <config.h> if HAVE_CONFIG_H.
7151
7152 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7153 usage of struct timespect with scm_t_timespec. Replace usage of
7154 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7155
7156 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7157 usage of struct timespect with scm_t_timespec. Replace usage of
7158 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7159
7160 * coop-defs.h: move handling of time related headers to
7161 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7162 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7163 timespect with scm_t_timespec.
7164
7165 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7166
7167 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7168
7169 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7170 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7171
7172 * continuations.c: move libguile/_scm.h include to the top so we
7173 pick up any critical defines like _GNU_SOURCE early.
7174
7175 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7176
7177 * async.c: #include <config.h> if HAVE_CONFIG_H.
7178
7179 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7180
7181 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7182 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7183
7184 * __scm.h: move libguile/scmconfig.h include up to the top, so
7185 we're sure to pick up any critical defines like _GNU_SOURCE early.
7186 #include <limits.h> removed in favor of scmconfig.h inclusion when
7187 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7188 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7189 scmconfig.h inclusion when appropriate. Various Win32 related
7190 definitions removed in favor of scmconfig.h inclusion when
7191 appropriate.
7192 (HAVE_UINTPTR_T): definition removed (see NEWS).
7193 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7194 (HAVE_LONG_LONGS): definition removed (see NEWS).
7195 (HAVE_LONG_LONG): definition removed (see NEWS).
7196 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7197
7198 * Makefile.am: scmconfig.h is now generated by building and
7199 running gen-scmconfig.h and capturing its output. gen-scmconfig
7200 uses config.h and the configure.in generated gen-scmconfig.h to
7201 decide what to output. See gen-scmconfig.c for details.
7202 (noinst_PROGRAMS): add gen-scmconfig.
7203 (gen_scmconfig_SOURCES): new variable.
7204 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7205 cross-compiling right.
7206 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7207 (BUILT_SOURCES): add scmconfig.h.
7208
7209 2003-03-19 Marius Vollmer <mvo@zagadka.de>
7210
7211 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7212 Adrian Bunk. Thanks!
7213
7214 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7215
7216 * goops.c (make_class_from_template): New fourth arg:
7217 applicablep.
7218 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7219 cpls.
7220
7221 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7222
7223 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7224 second arg: applicablep.
7225 (scm_i_inherit_applicable): New function.
7226
7227 * goops.c, goops.h (scm_class_applicable,
7228 scm_class_extended_accessor): New classes.
7229
7230 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7231
7232 * procs.c (scm_procedure_documentation): Removed redundant
7233 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7234 predicates.
7235
7236 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7237
7238 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7239
7240 * modules.c (scm_module_import_interface): New function.
7241
7242 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7243 scm_class_accessor.
7244 (scm_class_accessor): New class.
7245
7246 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7247
7248 * goops.c (scm_primitive_generic_generic): Enable primitive
7249 generic if not enabled.
7250 (scm_sys_goops_loaded): Setup unextended primitive generics.
7251
7252 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7253
7254 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7255 snarf macros.
7256
7257 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7258 testing example. All uses of SCM_GPROC should be converted.)
7259
7260 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7261 scm_assoc.
7262
7263 * eq.c (scm_equal_p): Turned into a primitive generic.
7264
7265 2003-02-27 Rob Browning <rlb@defaultvalue.org>
7266
7267 * Makefile.am (scmconfig.h): new target -- generate file from
7268 ../config.h.
7269 (modinclude_HEADERS): remove version.h.
7270 (nodist_modinclude_HEADERS): add version.h.
7271
7272 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7273
7274 This fixes a serious GC bug, introduced during the latest
7275 reorganization of the GC, which disabled freeing of structs and
7276 GOOPS objects:
7277
7278 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7279 SCM_EOL.
7280 (scm_struct_prehistory): Move scm_free_structs to
7281 scm_before_mark_c_hook.
7282
7283 * gc-card.c (sweep_card): Check that we haven't swept structs on
7284 this card before. That can happen if scm_i_sweep_all_segments has
7285 been called from some other place than scm_igc.
7286
7287 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7288
7289 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7290 (since hash tables now adapt their size).
7291
7292 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7293 (current number of prehistory bindings; hashtable code will select
7294 a prime which is greater than this value).
7295
7296 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7297 (current number of initial symbols).
7298
7299 * properties.c (scm_init_properties): Don't specify size of
7300 scm_properties_whash.
7301
7302 * objprop.c (scm_init_objprop): Don't specify size of
7303 scm_object_whash.
7304
7305 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7306
7307 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7308
7309 The following changes introduce the use of resizable hash tables
7310 throughout Guile. It also renames the old *-hash-table* functions
7311 to *-alist-vector* and places them, together with the rest of the
7312 weak vector support, in the module (ice-9 weak-vector). We should
7313 probably introduce a new, better, API for weak references, for
7314 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7315 look like and are used like ordinary pairs.)
7316
7317 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7318 leaf_environment_fold, obarray_remove_all): Use hashtable
7319 accessors.
7320
7321 * gc.c (scm_init_storage): Moved hook initialization to
7322 scm_storage_prehistory.
7323 (scm_storage_prehistory): New function.
7324 (scm_igc): Added commentary about placement of
7325 scm_after_sweep_c_hook.
7326
7327 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7328 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7329 SCM_WVECT_WEAK_VALUE_P.
7330
7331 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7332 functions.
7333 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7334 Removed.
7335 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7336 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7337
7338 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7339 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7340
7341 * modules.c (module-reverse-lookup): Use hashtable accessors.
7342
7343 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7344
7345 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7346 scm_make_weak_value_alist_vector,
7347 scm_make_doubly_weak_alist_vector): New functions.
7348
7349 * weaks.c (scm_init_weaks_builtins): New function.
7350
7351 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7352 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7353 SCM_WVECT_NOSCAN_P): New macros.
7354
7355 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7356 and SCM_WVECT_WEAK_VALUE_P.
7357
7358 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7359 allocate_weak_vector and exported.
7360
7361 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7362
7363 * hashtab.c: Undid thread safety. (We decided that it's better to
7364 let the user explicitly protect the tables (or not) according what
7365 is suitable for the application.)
7366
7367 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7368
7369 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7370 thread safe and handle resizing tables.
7371 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7372 SCM_DEFER/ALLOW_INTS.
7373
7374 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7375
7376 * hashtab.c (scm_vector_to_hash_table,
7377 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7378 functions.
7379 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7380 safe and handle resizing tables.
7381
7382 * weaks.c (scm_make_weak_key_hash_table,
7383 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7384 Size argument made optional. Return resizable table if not
7385 specified.
7386
7387 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7388
7389 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7390 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7391
7392 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7393
7394 * debug.c (scm_procedure_source): Handle all objects for which
7395 procedure? is #t. (Thanks to Bill Schottstaedt.)
7396
7397 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7398
7399 * futures.c (mark_futures): Don't need to mark data of recycled
7400 futures.
7401 (scan_futures, cleanup_undead): Be smarter about marking
7402 futures---avoid unnecessary passes through future lists.
7403
7404 * futures.h, futures.c: New files; Introduced recycling of
7405 futures. For fine-grained threading this lifts performance to
7406 another level. We can now use parallelization in inner loops of
7407 Guile programs without impossible overhead.
7408
7409 * threads.h, threads.c: Moved futures to their own file.
7410
7411 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7412 (DOT_X_FILES): Added futures.x.
7413 (DOT_DOC_FILES): Added futures.doc.
7414 (modinclude_HEADERS): Added futures.h.
7415
7416 * threads.c, threads.h (scm_i_create_thread): Renamed from
7417 create_thread and made global.
7418
7419 * futures.c (scm_make_future): New procedure.
7420
7421 * eval.c: #include "libguile/futures.h".
7422
7423 * init.c: #include "futures.h"
7424 (scm_init_guile_1): Call scm_init_futures.
7425
7426 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7427
7428 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7429
7430 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7431 functions.
7432
7433 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7434
7435 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7436
7437 * threads.c (create_thread): Don't unwind dynwind chain of parent
7438 thread before creation. Just start the new thread with an empty
7439 dynwind chain.
7440
7441 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7442
7443 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7444
7445 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7446
7447 * threads.c (scm_timed_wait_condition_variable): Support timed
7448 waiting also for simple condition variables.
7449
7450 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7451 of calling the procedure change-object-class.
7452
7453 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7454
7455 * ramap.c (scm_ramapc): Typo in error message.
7456
7457 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7458
7459 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7460 slots with instance allocation.
7461
7462 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7463 class.
7464 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7465
7466 * goops.c (scm_generic_function_methods): Support extended
7467 generic functions.
7468
7469 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7470
7471 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
7472 Thanks to Neil for pointing this out!
7473
7474 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7475
7476 * lang.h: Remove declarations matching definitions removed from
7477 lang.c (just below).
7478
7479 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7480
7481 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7482 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7483 and already commented out.
7484
7485 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7486 scm_lreadparen): Support reading vectors with Elisp syntax if
7487 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7488 is not currently defined, and there isn't even a configure switch
7489 to enable it yet.)
7490
7491 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7492
7493 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7494 builds work.
7495 (EXTRA_DIST): Added version.h.in.
7496
7497 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7498
7499 This change makes it possible for one thread to do lazy sweeping
7500 while other threads are running. Now only the mark phase need to
7501 have all threads asleep. We should look further into this issue.
7502 Presently, I've put the locking of scm_i_sweep_mutex at
7503 "conservative" places due to my current lack of knowledge about
7504 the garbage collector. Please feel free to restrict these regions
7505 further to allow for maximal parallelism!
7506
7507 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7508
7509 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7510 scm_gc_register_collectable_memory): Substitute locking of
7511 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7512 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7513 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7514 the single-thread section (which now only contains the mark
7515 phase).
7516 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7517 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7518
7519 * threads.c (gc_section_mutex): Removed.
7520
7521 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7522
7523 * threads.c (create_thread): Clear parent field in root state in
7524 order not to unnecessarily remember dead threads.
7525
7526 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7527 (scm_trampoline_1, scm_trampoline_2): Use them.
7528
7529 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7530
7531 Partial introduction of real plugin interface.
7532
7533 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7534 (EXTRA_DIST): Added threads-plugin.c.
7535
7536 * threads-plugin.h, threads-plugin.c: New files.
7537
7538 * threads.h: #include "libguile/threads-plugin.h".
7539
7540 * threads.c: #include "libguile/threads-plugin.c".
7541
7542 * pthread-threads.c: Temporarily remove debugging functions.
7543
7544 * threads.c, threads.h (scm_yield): Added back.
7545
7546 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7547
7548 * threads.c (really_launch): Detach before unlocking
7549 thread_admin_mutex in order not to risk being joined.
7550 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7551 thread_admin_mutex locked during GC.
7552
7553 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7554 functions.
7555
7556 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7557
7558 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7559 support for debugging mutex operations.
7560
7561 * threads.c (scm_thread): Removed filed joining_threads.
7562 (thread_print): Print thread number as well as address of thread
7563 structure.
7564 (scm_join_thread): Bugfix.
7565 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7566 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7567 scm_broadcast_condition_variable): Use the low-level API.
7568 (scm_all_threads): Return copy of thread list (to prevent
7569 unintended destruction).
7570 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
7571
7572 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7573 pthread "native" recursive mutex support.
7574
7575 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7576
7577 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7578 Simply lock a thread C API recursive mutex.
7579 (SCM_NONREC_CRITICAL_SECTION_START,
7580 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7581 SCM_REC_CRITICAL_SECTION_END): Removed.
7582
7583 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7584 direct calls to scm_rec_mutex_lock / unlock around the three calls
7585 to scm_m_expand_body.
7586
7587 * eval.c, eval.h (promise_free): New function.
7588 (scm_force): Rewritten; Now thread-safe; Removed
7589 SCM_DEFER/ALLOW_INTS.
7590
7591 * pthread-threads.h: Added partially implemented plugin interface
7592 for recursive mutexes. These are, for now, only intended to be
7593 used internally within the Guile implementation.
7594
7595 * pthread-threads.c: New file.
7596
7597 * threads.c: Conditionally #include "pthread-threads.c".
7598
7599 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7600 thread-safe;
7601
7602 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7603 SCM_GLOBAL_REC_MUTEX): New macros.
7604
7605 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7606 macros---use mutexes instead.
7607
7608 * tags.h (SCM_IM_FUTURE): New tag.
7609
7610 * eval.c (scm_m_future): New primitive macro.
7611 (SCM_CEVAL): Support futures.
7612 (unmemocopy): Support unmemoization of futures.
7613
7614 * print.c (scm_isymnames): Name of future isym.
7615
7616 * version.c: Unmade some changes to my private copy that got
7617 committed by mistake.
7618
7619 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7620
7621 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7622 2002-12-10.
7623
7624 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7625
7626 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7627 logical place.
7628
7629 * threads.c (create_thread): Remember root object until the handle
7630 of the new thread is on all_threads list.
7631
7632 * root.c (scm_make_root): Moved copying of fluids until after
7633 creation of root handle so that the fluids are GC protected. Also
7634 removed the critical section.
7635
7636 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7637
7638 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7639
7640 * gc-malloc.c (malloc_mutex): New mutex.
7641 (scm_gc_malloc_prehistory): Initialize it.
7642 (scm_realloc): Serialize call to realloc
7643 (scm_calloc): Same for calloc.
7644 Thanks to Wolfgang Jaehrling!
7645 (Now we have to make sure all calls to malloc/realloc are made
7646 through scm_malloc.)
7647
7648 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7649
7650 * threads.c (really_launch): Release heap (to prevent deadlock).
7651 (create_thread): Release heap before locking thread admin mutex.
7652
7653 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7654
7655 * threads.c (scm_i_thread_invalidate_freelists): New
7656 function.
7657
7658 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7659
7660 * modules.c (scm_export): Inserted a return statement.
7661
7662 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7663
7664 * modules.c (scm_export): new function
7665
7666 * gc-card.c: add a note about malloc()/free() overhead.
7667
7668 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7669
7670 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7671 in srcdir.
7672
7673 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7674
7675 These changes remove scm_ints_disabled (which hasn't has any
7676 effect in Guile for quite some time).
7677
7678 * async.c, error.h (scm_ints_disabled): Removed.
7679
7680 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7681 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7682 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7683 (old_ints): Removed.
7684
7685 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7686 critical section.
7687 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7688 SCM_ALLOW_INTS.
7689
7690 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7691
7692 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7693 Removed accidental #if 0 around these functions.
7694
7695 These changes are the start of support for preemptive
7696 multithreading. Marius and I have agreed that I commit this code
7697 into the repository although it isn't thoroughly tested and surely
7698 introduces many bugs. The bugs should only be exposed when using
7699 threads, though. Signalling and error handling for threads is
7700 very likely broken. Work on making the implementation cleaner and
7701 more efficient is needed.
7702
7703 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7704 (SCM_NONREC_CRITICAL_SECTION_START,
7705 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7706 SCM_REC_CRITICAL_SECTION_END): New macros.
7707 (SCM_CRITICAL_SECTION_START/END): Defined here.
7708
7709 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7710 the three calls to scm_m_expand_body.
7711
7712 * gc.h: #include "libguile/pthread-threads.h";
7713 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7714
7715 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7716 scm_t_key;
7717
7718 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7719 access.
7720
7721 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7722
7723 * gc-freelist.c, threads.c (really_launch): Use
7724 SCM_FREELIST_CREATE.
7725
7726 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7727
7728 * gc.c (scm_i_expensive_validation_check, scm_gc,
7729 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7730 heap administration so that those pieces of code are executed
7731 single-threaded. We might consider rewriting these code sections
7732 in terms of a "call_gc_code_singly_threaded" construct instead of
7733 calling the pair of scm_i_thread_put_to_sleep () and
7734 scm_i_thread_wake_up (). Also, we would want to have as many of
7735 these sections eleminated.
7736
7737 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7738
7739 * inline.h: #include "libguile/threads.h"
7740
7741 * pthread-threads.h: Macros now conform more closely to the
7742 pthreads interface. Some of them now take a second argument.
7743
7744 * threads.c, threads.h: Many changes.
7745
7746 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7747
7748 * Makefile.am (version.h): Changed $^ --> $< in rule for
7749 version.h.
7750
7751 2002-12-08 Rob Browning <rlb@defaultvalue.org>
7752
7753 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7754 (SCM_MINOR_VERSION): use @--@ substitution now.
7755 (SCM_MICRO_VERSION): use @--@ substitution now.
7756 (scm_effective_version): new function prototype.
7757
7758 * version.c (scm_effective_version): new function, also add
7759 effective-version.
7760
7761 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7762 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7763 SCM_LIBRARY_DIR.
7764 (version.h): generate this here rather than configure.in. This
7765 approach tracks source edits better (i.e. more immediately).
7766 Might be worth considering for other .in files too.
7767
7768 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7769
7770 Reorganized thread package selection. A thread package now only
7771 implements a small set of pthread like functions and Guile
7772 implements the rest on top of that. Guile's implementation is
7773 what the "coop-pthreads" package has been previously. Support for
7774 "coop" threads has been removed until I get time to add it again.
7775
7776 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7777 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7778 null-threads.c, coop-pthreads.c.
7779 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7780 pthread-threads.h.
7781
7782 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7783
7784 * threads.h: Do not include "libguile/coop-defs.h". Include
7785 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7786 (previously deprecated) C level thread API prototypes. They are
7787 now in the thread package specific headers, "null-threads.h" and
7788 "pthread-threads.h".
7789 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7790 New.
7791 (scm_threads_init): Removed.
7792 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7793 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7794 SCM_I_THREAD_SWITCH_COUNT): Define here.
7795 (scm_single_thread_p): Removed.
7796 (scm_call_with_new_thread): Take two args directly instead of list
7797 of two args.
7798 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7799 SCM_SET_THREAD_LOCAL_DATA): Define here.
7800
7801 * threads.c: Merged with "coop-pthreads.c".
7802
7803 * null-threads.h: Implement pthread-like API as a set of macros.
7804
7805 * pthread-threads.h: New, implement pthread-like API by deferring
7806 to pthread itself.
7807
7808 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7809 has been lost in the reorganization.
7810
7811 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7812
7813 The following change makes it possible to move procedure
7814 application dispatch outside inner loops. The motivation was
7815 clean implementation of efficient replacements of R5RS primitives
7816 in SRFI-1.
7817
7818 The semantics is clear: scm_trampoline_N returns an optimized
7819 version of scm_call_N (or NULL if the procedure isn't applicable
7820 on N args).
7821
7822 Applying the optimization to map and for-each increases efficiency
7823 noticeably. For example, (map abs ls) is 8 times faster than
7824 before.
7825
7826 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7827
7828 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7829
7830 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7831 (map, for-each): Handle also application on two args as a special
7832 case; Use trampolines.
7833
7834 Other changes:
7835
7836 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7837 (subr2oless): Removed.
7838 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7839 vector GC protected.
7840
7841 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7842 scm_out_of_range.
7843
7844 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7845
7846 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7847
7848 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7849
7850 * debug.c (scm_make_iloc): Added missing "return".
7851
7852 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7853
7854 * strports.c (scm_eval_string_in_module): Validate second arg to
7855 be a module. Thanks to Arno Peters!
7856
7857 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7858
7859 * .cvsignore: remove goops.c
7860
7861 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7862
7863 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7864 module_variable, scm_module_lookup_closure,
7865 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7866 scm_system_module_env_p): Don't compare SCM values with C
7867 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7868 over SCM_NFALSEP.
7869
7870 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7871
7872 * eval.h (SCM_MAKE_ILOC): New macro.
7873
7874 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7875 the iloc bitpattern here.
7876
7877 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7878
7879 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7880 part of the API, otherwise it's difficult to write Guile
7881 extensions using non-blocking I/O => moved #include
7882 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7883
7884 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7885 s_unlock_mutex.
7886
7887 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7888
7889 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7890 are defined in configure.in.
7891
7892 * threads.c: Removed SCM_API from function definitions. SCM_API
7893 is only for declarations.
7894
7895 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7896
7897 * coop-pthreads.h: Added support for thread specific data to the
7898 generic C API for the coop-pthreads case.
7899
7900 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7901 change.
7902 (scm_cond_broadcast): Added missing function.
7903
7904 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7905
7906 * coop.c (coop_next_runnable_thread): Removed, wich should have
7907 happened when GUILE_ISELECT was hard-wired.
7908
7909 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7910
7911 * Makefile.am (libguile_la_SOURCES): Added threads.c
7912 (DOT_DOC_FILES): Added threads.doc.
7913 (DOT_X_FILES): Added threads.x.
7914 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7915 (noinst_HEADERS): Added coop-pthreads.c.
7916 (modinclude_HEADERS): Added coop-pthreads.h.
7917
7918 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7919 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7920
7921 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7922 Thanks to Bill Schottstaedt!
7923
7924 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7925
7926 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7927 SCM_COPT_THREADS is defined.
7928 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7929 is defined.
7930
7931 * coop-pthreads.c: Some harmless renamings of internal stuff.
7932 (create_thread): New, generalized version of
7933 scm_call_with_new_thread.
7934 (scm_call_with_new_thread): Use it.
7935 (scm_spawn_thread): New, use create_thread.
7936
7937 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7938
7939 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7940 start testing it now.
7941
7942 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7943 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7944 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7945 is defined.
7946
7947 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7948
7949 * scmsigs.c (signal_cell_handlers, install_handler_data,
7950 scm_delq_spine_x, really_install_handler, install_handler): New
7951 scheme for triggering signal handlers, to simplify take_signal.
7952 (take_signal): Simplified, to avoid race conditions.
7953 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7954 hasn't exited yet.
7955
7956 * async.c (scm_async_click): Reset pending_asyncs, handle
7957 signal_asyncs. Don't set cdr of a non-signal async to #f.
7958 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
7959 always. Set pending_asyncs.
7960 (scm_system_async_mark_for_thread): Check that thread has not
7961 exited.
7962 (scm_unmask_signals, decrease_block): Call scm_async_click after
7963 block_asyncs becomes zero.
7964
7965 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
7966 active_asyncs.
7967
7968 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
7969 fields.
7970 * root.c (root_mark): Mark them.
7971 (make_root): Initialize them.
7972
7973 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
7974 USE_COOP_THREADS.
7975 (scm_internal_select): Define one version for USE_COOP_THREADS and
7976 one for USE_NULL_THREADS.
7977 (scm_init_iselect): Likewise.
7978
7979 * inline.h (scm_cell, scm_double_cell): Also allow
7980 USE_COPT_THREADS to not protect the slot initializers.
7981
7982 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
7983 because threads need to be initialized before the stack, but
7984 gsubrs such as scm_timed_condition_variable_wait can only be
7985 created later.
7986
7987 * threads.h: Include "coop-pthreads.h" when requested.
7988 (scm_threads_make_mutex, scm_threads_lock_mutex,
7989 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
7990 not implemented anyway.
7991 (scm_init_thread_procs, scm_try_mutex,
7992 scm_timed_condition_variable_wait,
7993 scm_broadcast_condition_variable, scm_c_thread_exited_p,
7994 scm_thread_exited_p): New prototypes.
7995 (struct timespec): Define if not already defined.
7996 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7997 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7998 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7999 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8000 deprecated.
8001
8002 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8003 requested.
8004 (scm_thread_exited_p): New.
8005 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8006 registered procedures.
8007 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8008 Use the latter as the procedure for "wait-condition-variable",
8009 thus offering a optional timeout parameter to Scheme.
8010 (scm_wait_condition_variable): Implement in terms of
8011 scm_timed_wait_condition_variable.
8012 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8013 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8014 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8015 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8016 scm_make_mutex, etc, and deprecate.
8017 (scm_init_threads): Do not create smobs, leave this to
8018 scm_threads_init. Do not include "threads.x" file.
8019 (scm_init_thread_procs): New, include "threads.x" here.
8020
8021 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8022 scm_null_mutex_lock, scm_null_mutex_unlock,
8023 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8024 scm_null_condvar_wait, scm_null_condvar_signal,
8025 scm_null_condvar_destroy): Removed.
8026 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8027 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8028 scm_cond_destory): Do not define, they are now deprecated and
8029 handled by threads.{h,c}.
8030
8031 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8032 (scm_threads_init): Create smobs here, using the appropriate
8033 sizes.
8034 (block): Removed, now unused.
8035 (scm_c_thread_exited_p): New.
8036 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8037 scm_null_mutex_destroy, scm_null_condvar_init,
8038 scm_null_condvar_wait, scm_null_condvar_signal,
8039 scm_null_condvar_destroy): Removed and updated users to do their
8040 task directly.
8041 (scm_try_mutex, timeval_subtract,
8042 scm_timed_wait_condition_variable,
8043 scm_broadcast_condition_variable): New.
8044 (scm_wait_condition_variable): Removed.
8045
8046 * coop-defs.h (coop_m): Added 'level' field.
8047 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8048 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8049 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8050 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8051 define.
8052 (coop_condition_variable_broadcast): New.
8053
8054 * coop-threads.c (scm_threads_init): Create smobs here, using the
8055 appropriate sizes.
8056 (scm_c_thread_exited_p, scm_try_mutex,
8057 scm_timed_wait_condition_variable,
8058 scm_broadcast_condition_variable): New.
8059 (scm_wait_condition_variable): Removed.
8060
8061 * coop.c (coop_new_mutex_init): Initialize level.
8062 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8063 level.
8064 (coop_condition_variable_signal): Renamed to
8065 coop_condition_variable_broadcast and reimplemented in terms of
8066 that. Thus...
8067 (coop_condition_variable_broadcast): New.
8068
8069 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8070
8071 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8072
8073 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8074
8075 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8076 of system headers.
8077
8078 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8079 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
8080 give better error messages. Thanks to Bill Schottstaedt!
8081
8082 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8083
8084 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8085 scm_definedp to scm_defined_p and deprecated scm_definedp.
8086
8087 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8088
8089 * async.h, async.c (scm_system_async): Fixed deprecation to work
8090 correctly when deprecated features are excluded.
8091
8092 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8093
8094 * async.c (scm_system_async_mark_for_thread): Validate thread
8095 argument.
8096
8097 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8098
8099 * feature.c (scm_init_feature): Don't add 'threads' for
8100 USE_NULL_THREADS.
8101
8102 * inline.h (scm_cell, scm_double_cell): Also allow
8103 USE_NULL_THREADS to not protect the slot initializers.
8104
8105 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8106 "USE_THREAD".
8107
8108 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8109 (modinclude_HEADERS): Added null-threads.h.
8110
8111 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8112 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8113 (scm_init_threads): Use generic type names scm_t_mutex and
8114 scm_t_cond instead of coop_m and coop_c.
8115
8116 * null-threads.c, null-threads.h: New files.
8117
8118 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8119
8120 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8121 This is to support makes that know about "$<" only in pattern
8122 rules, like Sun's make.
8123
8124 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8125
8126 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8127 substitution. Thanks to David Allouche!
8128
8129 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8130
8131 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8132 !SCM_ENABLE_DEPRECATED.
8133
8134 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8135
8136 * async.c (scm_system_async_mark_for_thread): Only call
8137 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8138 otherwise.
8139
8140 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8141 USE_THREADS is defined. Use scm_root otherwise.
8142 (scm_sigaction_for_thread): Ignore THREAD argument when
8143 USE_THREADS is not defined. Also, move THREAD argument defaulting
8144 out of HAVE_SIGACTION section, which was a bug.
8145
8146 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8147
8148 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8149 signal_handlers, not the closure that is used as the async.
8150 The closure is stored in signal_handler_cells, as previously.
8151
8152 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8153
8154 * root.h (scm_root_state): Added 'block_async' slot.
8155 (scm_active_asyncs): Removed abbrev.
8156 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8157
8158 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8159 abbrev.
8160
8161 * async.h (scm_call_with_blocked_asyncs,
8162 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8163 scm_c_call_with_unblocked_asyncs): New prototypes.
8164 (scm_mask_signals, scm_unmask_signals): Deprecated.
8165 (scm_mask_ints): Turned into a macro.
8166 * async.c (scm_mask_ints): Removed.
8167 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8168 this should not be necessary.
8169 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8170 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8171 deprecation warning and check for errornous use. Set block_asyncs
8172 instead of scm_mask_ints.
8173 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8174 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8175 scm_c_call_with_unblocked_asyncs): New.
8176
8177 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8178 Asyncs are enabled by default.
8179
8180 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8181
8182 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8183 6th element: an input waiting thunk.
8184 (sf_input_waiting): New.
8185
8186 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8187
8188 * root.c (root_mark): Mark active_asyncs slot.
8189
8190 * async.c (scm_async_click): Set the cdr of a executed handler
8191 cell to SCM_BOOL_F, not SCM_EOL.
8192 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8193 and only if the handler procedure is not already present.
8194 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8195 with SCM_BOOL_F.
8196 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8197
8198 2002-10-04 Rob Browning <rlb@defaultvalue.org>
8199
8200 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8201
8202 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8203 scm_lt_dlopenext, and scm_lt_dlerror.
8204 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8205 and scm_lt_dlerror.
8206 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8207 and scm_lt_dlerror.
8208 (sysdep_dynl_init): switch to scm_lt_dlinit();
8209
8210 * Makefile.am (libguile_la_LIBADD): switch to use
8211 libguile-ltdl.la.
8212
8213 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
8214
8215 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8216
8217 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8218 * scmsigs.c (got_signal): Removed.
8219 (signal_handler_cells, signal_handler_threads): New.
8220 (take_signal): Queue the cell of the signal for the specified
8221 thread. Reset the signal handler on systems that don't have
8222 sigaction.
8223 (sys_deliver_signals): Removed.
8224 (close_1): New.
8225 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8226 extended to also set the thread of a signal and allocate a cell
8227 for it. Keep the Scheme name "sigaction". Check that signum is
8228 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8229 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8230 (scm_init_scmsigs): Allocate signal_handler_cells and
8231 signal_handler_threads vectors.
8232
8233 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8234 that system asnycs and user asyncs are separated. Reimplemented
8235 system asyncs to work per-thread.
8236
8237 * gc.c (scm_init_gc): Do not use scm_system_async.
8238
8239 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8240 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8241 Removed prototypes.
8242 (scm_i_queue_async_cell): New.
8243
8244 * __scm.h (scm_asyncs_pending_p): Removed.
8245 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8246 scm_asyncs_pending_p.
8247
8248 * async.h (scm_system_async_mark_for_thread): New prototype.
8249
8250 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8251
8252 * root.h (scm_root_state): Added new "active_asyncs" slot.
8253 * root.c (scm_make_root): Initialize it to SCM_EOL.
8254
8255 * coop-defs.h (coop_t): Added new "handle" slot.
8256 * coop-threads.c (all_threads, scm_current_thread,
8257 scm_all_threads, scm_i_thread_root): New.
8258 (scm_threads_init): Add main thread to all_threads.
8259 (scheme_launch_thread): Remove thread from all_threads when it
8260 terminates.
8261 (scm_call_with_new_thread): Initialize handle slot of coop_t
8262 structure and add new thread to all_threads.
8263 (scm_spawn_thread): Likewise.
8264
8265 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8266 * threads.c (scm_current_thread, scm_all_threads): Register as
8267 primitives.
8268
8269 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8270
8271 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8272
8273 * script.c (scm_compile_shell_switches): Fix bad spelling of
8274 `explicitly' in comment.
8275
8276 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8277
8278 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8279 Refer to provided? in doc string rather than deprecated feature?.
8280
8281 2002-09-24 Gary Houston <ghouston@arglist.com>
8282
8283 * inline.h (scm_double_cell): prevent reordering of statements
8284 with any following code (for GCC 3 strict-aliasing).
8285 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8286 the earlier version of the reordering prevention.
8287
8288 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8289
8290 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8291
8292 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8293
8294 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8295 protection.
8296
8297 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8298
8299 * inline.h: include stdio.h
8300
8301 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8302
8303 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8304
8305 * gc-segment.c (scm_i_make_initial_segment): check user settings
8306 for sanity.
8307
8308 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8309 sanity.
8310
8311 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8312
8313 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8314
8315 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
8316 these won't ever wrap around with high memory usage. Thanks to
8317 Sven Hartrumpf for finding this.
8318
8319 * gc-freelist.c: include <stdio.h>
8320
8321 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8322
8323 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8324
8325 * vectors.h (SCM_VECTOR_REF): New.
8326
8327 * snarf.h (SCM_DEFINE_PUBLIC): New.
8328
8329 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8330
8331 * socket.c (scm_addr_vector): Added size of address to arguments.
8332 Use it to avoid accessing a non-existent path in a sockaddr_un.
8333 Changed all callers.
8334
8335 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8336
8337 * gc.h: remove DOUBLECELL card flags.
8338
8339 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8340 scm_realloc().
8341
8342 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8343 init loop; handle this from scm_init_card_freelist()
8344
8345 * gc-card.c (scm_init_card_freelist): init bit vector here.
8346
8347 * numbers.c (scm_make_real): prevent reordering of statements
8348 num2float.i.c (FLOAT2NUM): idem
8349
8350 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8351
8352 * eval.h: prepend libguile/ to include path
8353
8354 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8355
8356 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
8357 years. Thanks to Martin Grabmüller!
8358
8359 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8360
8361 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8362 unsigned numbers for computing minimum heap increment. This
8363 prevents weird results when a a negative minimum increment is
8364 computed.
8365
8366 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8367
8368 * gc_os_dep.c: When we have __libc_stack_end, use that directly
8369 instead of the old tricks.
8370
8371 * guile-snarf.in: Do not expect the input file to be the first
8372 argument after the optional "-o" option, just pass everything to
8373 the pre-processor without extracting the input file name.
8374
8375 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8376
8377 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8378 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8379
8380 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8381
8382 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8383 Bill Schottstaedt for the bug report
8384
8385 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8386
8387 * print.c (scm_iprin1): Print primitives generics always as
8388 "primitive-generic" even when they have no primitive methods yet.
8389
8390 2002-08-17 Gary Houston <ghouston@arglist.com>
8391
8392 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8393 call.
8394
8395 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8396
8397 * ports.c (scm_add_to_port_table): small bugfix.
8398
8399 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8400 malloc.
8401
8402 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8403 only use SCM_MIN_HEAP_SEG_SIZE.
8404
8405 * ports.c (scm_add_to_port_table): add backwards compatibility
8406 function
8407
8408 * ports.h: use scm_i_ prefix for port table and port table size.
8409
8410 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8411
8412 * vports.c (scm_make_soft_port): Initialize pt variable.
8413
8414 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8415
8416 * strports.h (scm_c_eval_string_in_module,
8417 scm_eval_string_in_module): New prototypes.
8418 * strports.c (scm_eval_string_in_module): New, but use
8419 "eval-string" as the Scheme name and make second parameter
8420 optional.
8421 (scm_eval_string): Implement using scm_eval_string_in_module.
8422 (scm_c_eval_string_in_module): New.
8423 Thanks to Ralf Mattes for the suggestion!
8424
8425 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8426
8427 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8428 message and abort.
8429
8430 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8431
8432 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8433 stead of scm_t_port*. The function now takes a tag argument.
8434
8435 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8436
8437 * gc.h: add scm_debug_cells_gc_interval to public interface
8438
8439 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8440
8441 * gc.c (scm_i_expensive_validation_check): separate expensive
8442 validation checks from cheap ones.
8443
8444 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8445
8446 * read.c (scm_input_error): new function: give meaningful error
8447 messages, and throw read-error
8448
8449 * gc-malloc.c (scm_calloc): add scm_calloc.
8450
8451 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8452
8453 * tags.h: remove GC bits documentation from the tags table.
8454
8455 * read.c (INPUT_ERROR): Prepare for file:line:column error
8456 messages for errors in scm_lreadr() and friends.
8457
8458 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8459
8460 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8461 implementation).
8462 (scm_gc_calloc): new function
8463
8464 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8465
8466 * ports.c (scm_new_port_table_entry): init port entry to 0
8467 completely.
8468
8469 * ports.c (scm_new_port_table_entry): change function from
8470 scm_add_to_port_table. This prevents cells with null-pointers from
8471 being exposed to GC.
8472
8473 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
8474 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
8475
8476 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
8477 to gc-stats.
8478
8479 * numbers.c (big2str): return "0" for 0 iso. ""
8480
8481 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8482 private-gc.h: new file
8483
8484 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8485 sweeping. More documentation in workbook/newgc.text
8486
8487 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8488
8489 * random.c (rstate_free): Return zero.
8490
8491 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8492
8493 * environments.c (remove_key_from_alist): Removed.
8494
8495 (obarray_remove): Simplified.
8496
8497 2002-07-24 Stefan Jahn <stefan@lkcc.org>
8498
8499 * continuations.h: ia64: Include <signal.h> before
8500 <sys/ucontext.h>.
8501
8502 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8503
8504 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8505
8506 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8507
8508 * goops.c (scm_compute_applicable_methods): use
8509 scm_remember_upto_here_1 iso scm_remember_upto_here
8510
8511 * macros.c: include deprecation.h
8512
8513 * vectors.c (scm_vector_move_right_x): remove side effect in
8514 macro arg.
8515 (scm_vector_move_left_x): idem.
8516
8517 * net_db.c, posix.c, socket.c: variable naming: change ans to
8518 result.
8519
8520 * sort.c (scm_merge_vector_x): accept vector as argument
8521 iso. SCM*. This is needed for full GC correctness.
8522
8523 * gc.h: undo previous undocumented changes related to #ifdef
8524 GENGC.
8525
8526 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8527
8528 * *.c: add space after commas everywhere.
8529
8530 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8531 Document cases where SCM_WRITABLE_VELTS() is used.
8532
8533 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8534 SCM_VELTS() return a const pointer
8535 (SCM_VECTOR_SET): add macro.
8536
8537 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8538
8539 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8540 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8541 Deprecated the special kind of built-in dynamic syntax transformer
8542 that was inaccurately named "macro". Note: The built-in syntax
8543 transformers that are named "mmacro" or "memoizing-macro" still
8544 exist, and it is these which come much closer to what one would
8545 call a macro.
8546
8547 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8548
8549 * eval.c (unmemocopy): Fix for
8550 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8551 with internal definitions and local-eval).
8552
8553 2002-07-12 Gary Houston <ghouston@arglist.com>
8554
8555 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8556 defined. They don't do anything useful, especially since the
8557 only case where DYNAMIC_LINKING is undefined seems to be
8558 when --with-modules=no is given to configure, which is basically
8559 requesting that the "dynamic linking module" be omitted.
8560
8561 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8562 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8563
8564 * extensions.c (load_extension): check DYNAMIC_LINKING for
8565 scm_dynamic_call.
8566 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8567 scm_init_dynamic_linking.
8568
8569 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8570
8571 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8572 check for Cygwin when including <winsock2.h>, this is already
8573 check for by configure. Thus, revert change from 2002-07-07.
8574
8575 2002-07-10 Gary Houston <ghouston@arglist.com>
8576
8577 * eq.c: include <string.h>
8578 * dynl.c: docstring editing.
8579
8580 2002-07-09 Gary Houston <ghouston@arglist.com>
8581
8582 * dynl.c (scm_dynamic_call): docstring editing.
8583
8584 2002-07-08 Rob Browning <rlb@defaultvalue.org>
8585
8586 * gc_os_dep.c: HURD fixes.
8587
8588 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8589
8590 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8591
8592 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8593 this should be compiled for BUILD host.
8594 Override default rule for
8595 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8596 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8597 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8598
8599 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8600 <winsock2.h> on Cygwin even when we have it.
8601
8602 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8603
8604 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8605 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8606 the code. Full number of arguments checking of closures is
8607 mandatory now. However, the option to disable the checking has
8608 most probably not been used anyway.
8609
8610 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8611
8612 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8613 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8614 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8615 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8616 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8617 (scm_source_properties, scm_set_source_properties_x,
8618 scm_source_property): Removed compile time option SCM_RECKLESS to
8619 clean up the code. Full number of arguments checking of closures
8620 is mandatory now. However, the option to disable the checking has
8621 most probably not been used anyway.
8622
8623 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8624 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8625
8626 2002-06-30 Gary Houston <ghouston@arglist.com>
8627
8628 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8629 do anything useful. Added a comment about need for a mutex if
8630 pre-emptive threading is supported.
8631
8632 * posix.c (scm_convert_exec_args), dynl.c
8633 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8634 allocate_string_pointers. 2) simplified: don't reallocate the
8635 strings, just make an array of pointers 3) avoid memory leaks on
8636 error 4) let the procedure report errors in its own name.
8637 Consequences: 1) the procedures now assume that SCM strings are
8638 nul-terminated, which should always be the case. 2) Since strings
8639 are not reallocated, it's now possible for strings passed to
8640 dynamic-args-call to be mutated.
8641
8642 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8643
8644 * __scm.h, eval.c, eval.h: Removed compile time option
8645 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8646 variable positions during memoization is mandatory. However, the
8647 option to disable the caching has most probably not been used
8648 anyway.
8649
8650 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8651
8652 * print.c (scm_simple_format): Print missing part of format before
8653 ~% control. Thanks to Daniel Skarda!
8654
8655 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8656
8657 * mkstemp.c: Added exception notice to license statement.
8658
8659 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8660
8661 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8662 it is represented as a floating point value so that we can change
8663 its sign.
8664
8665 From John W. Eaton <jwe@bevo.che.wisc.edu>
8666
8667 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8668
8669 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8670
8671 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
8672 in addition to `i386'. Thanks to Dale P. Smith.
8673
8674 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8675
8676 * eq.c (real_eqv): New.
8677 (scm_eqv_p): Use it when comparing reals and complexes.
8678
8679 * numbers.c: Include <string.h>, for strncmp.
8680 (mem2complex): Do not create negative NaNs.
8681 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8682 NaN.
8683 (scm_inexact_to_exact): Signal error when converting a NaN.
8684
8685 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8686
8687 * posix.c (scm_putenv): Handle removing variables explicitely by
8688 calling unsetenv.
8689
8690 From John W. Eaton.
8691
8692 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8693 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8694 and scm_nan.
8695 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8696 [SCO && ! HAVE_ISINF] (isinf): New function.
8697 (xisinf, xisnan): New functions.
8698 (IS_INF): Delete.
8699 (isfinite): Define in terms of xisinf.
8700 (scm_inf_p, scm_nan_p): New functions.
8701 (guile_Inf, guile_NaN): New file-scope vars.
8702 (guile_ieee_init): New function.
8703 (scm_inf, scm_nan): New functions.
8704 (idbl2str): Handle Inf and NaN. Remove funny label and
8705 corresponding gotos.
8706 (ALLOW_DIVIDE_BY_ZERO): New macro.
8707 (scm_divide): Allow division by zero to occur if
8708 ALLOW_DIVIDE_BY_ZERO is defined.
8709 Handle bignums and ints as special cases.
8710
8711 Additional stuff by me:
8712
8713 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8714 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8715 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8716 NaN. They will provide their own sign.
8717 (scm_divide): Only allow divides by inexact zeros. Dividing by
8718 exact zeros still signals an errors.
8719
8720 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8721
8722 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
8723 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
8724 (scm_slot_exists_p): Rename from scm_slots_exists_p.
8725 Thanks to Andreas Rottmann.
8726
8727 2002-04-20 Gary Houston <ghouston@arglist.com>
8728
8729 * removal of unused fields in root state (thanks to Christopher
8730 Cramer for pointing out the disuse.)
8731 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
8732 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
8733
8734 * root.c (root_mark): don't mark them.
8735 (scm_make_root): don't set them to #f.
8736 * init.c (scm_init_standard_ports): don't initialise with the
8737 default ports.
8738
8739 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8740
8741 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8742 cpp_sig_symbols.c.
8743
8744 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8745
8746 * guile-snarf.in: Do not clean input file. This would write to
8747 the $(srcdir) during a VPATH build, which is not allowed. It also
8748 isn't needed since it only works when an output filename has been
8749 specified and in that case we don't need to clean the input file
8750 because the output file will already exist.
8751
8752 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8753
8754 * guile-snarf: Install the trap for removing $cleanfile only when
8755 the value of $cleanfile is actually known.
8756
8757 2002-04-10 Rob Browning <rlb@defaultvalue.org>
8758
8759 * .cvsignore: add versiondat.h and *.c.clean.c.
8760
8761 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8762
8763 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8764 function, replaces macro SRCBRKP.
8765
8766 (SRCBRKP): Deprecated.
8767
8768 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8769 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8770 temporary variable.
8771
8772 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8773
8774 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8775 CHECK_EXIT and removed all references to them.
8776
8777 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8778
8779 * debug.h (scm_ready_p, debug_print): Removed declarations.
8780
8781 * eval.c (EVALCELLCAR): Removed.
8782
8783 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8784 operation from condition.
8785
8786 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8787
8788 * guile-snarf.in: When the output filename is "-", write to
8789 stdout. When no "-o" option is given, use "-" as the output
8790 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8791 output file on error when the output file name is not "-". Define
8792 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8793
8794 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8795
8796 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8797
8798 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8799 and the corresponding goto statements. Removed redundant code.
8800
8801 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8802
8803 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8804 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8805 Re-enabled handing of rpsubrs and asubrs.
8806
8807 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8808
8809 * eval.c (SIDEVAL): Removed.
8810
8811 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8812 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8813 argument checking order for set! to locals, variables and symbols.
8814 Improvements to control structure. Removed some uses of arg1 and
8815 arg2 as temporary variables.
8816
8817 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8818
8819 * guile-snarf.in: Remove "--compat=1.4" support.
8820 Add "-d" and "-D" support.
8821
8822 (deprecated_list): New var.
8823 (compat_mode_clean_xxx): Delete.
8824 (grep_deprecated): New func.
8825 ("main"): If "-d" or "-D", call `grep_deprecated'.
8826
8827 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8828
8829 * hooks.h: Change scm_t_c_hookype_t everywhere to
8830 scm_t_c_hook_type.
8831
8832 Docstring fixes:
8833
8834 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8835
8836 * ports.c (scm_sys_make_void_port): Use `@file'.
8837
8838 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8839 than `else'.
8840
8841 * macros.c (scm_makmacro): Don't say that the form replaces its
8842 source, because it doesn't.
8843 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8844
8845 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8846 scm_select, scm_basename), goops.c (scm_method_generic_function),
8847 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8848 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8849 spelling mistakes.
8850
8851 * debug.c (scm_debug_options), eval.c
8852 (scm_eval_options_interface), read.c (scm_read_options): Change
8853 incorrect @var in docstring to @code.
8854
8855 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8856
8857 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8858
8859 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8860 guile-snarf can remove trailing non-init code.
8861
8862 * guile-snarf.in (modern_snarf): Remove everything following and
8863 including "^:^" from the output.
8864
8865 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8866
8867 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8868
8869 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8870
8871 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8872
8873 * guile-snarf.in: Update copyright.
8874 Rewrite to internalize error handling.
8875 Add "--compat=1.4" handling.
8876 Add commentary.
8877
8878 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8879 (snarfcppopts): New var.
8880 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8881 (.c.doc): Use $(snarfcppopts).
8882
8883 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8884 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8885 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8886 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8887 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8888 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8889 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8890 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8891 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8892 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8893 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8894 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8895 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8896 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8897
8898 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8899
8900 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8901 The next step will be to remove the union 't' and simplify the
8902 code of SCM_CEVAL that way.
8903
8904 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8905
8906 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8907 rreadfds, rwritefds, rexceptfds): Made static.
8908
8909 * gc.c (terminating), fports.c (terminating): Renamed
8910 scm_i_terminating.
8911
8912 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8913
8914 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8915 potential overflow problems. Thanks to John W Eaton!
8916
8917 * strop.c (string_capitalize_x): Treat characters as unsigned so
8918 that 8-bit chars work. Thanks to David Pirotte!
8919
8920 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8921
8922 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8923 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8924 proc as temporary variables. Introduced temporary variables with
8925 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8926 by a more explicit predicate in some places.
8927
8928 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8929
8930 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8931 Added lots of comments regarding the implementation of #@dispatch.
8932 Changed intra-procedure communication to use t.arg1 instead of
8933 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8934 variables. Introduced temporary variables with hopefully
8935 descriptive names for clarification. Replaced SCM_N?IMP by a more
8936 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8937 of computing the expression explicitly. Eliminate now unused
8938 label nontoplevel_cdrxbegin.
8939
8940 * goops.h (SCM_INSTANCE_HASH): New macro.
8941
8942 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8943
8944 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8945
8946 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8947 "guile-snarf" moved back from `noinst_SCRIPTS'.
8948
8949 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8950
8951 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8952 exists when adding a source property other than those that are
8953 handled explicitly, add the new property to the SRCPROPS obj's
8954 plist.
8955
8956 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8957 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
8958
8959 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
8960 debug.status. It isn't needed, and it can overflow the bits
8961 reserved for it (which may lead to a segv or a GC abort).
8962
8963 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8964
8965 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
8966 side-effecting operations from conditions and macro calls.
8967 Replaced SCM_N?IMP by a more explicit predicate in some places.
8968 Minimized the scope of some variables.
8969
8970 2002-03-02 Stefan Jahn <stefan@lkcc.org>
8971
8972 * convert.i.c: Fixed int <-> long conversions which would have
8973 failed if their sizes were different.
8974
8975 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8976
8977 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
8978 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
8979 as temporary variables. Removed side-effecting operations from
8980 conditions and macro calls. Introduced temporary variables with
8981 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8982 by a more explicit predicate in some places. Removed code that
8983 was conditionally compiled if SICP was defined - which it never
8984 is.
8985
8986 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8987
8988 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
8989 Removed some uses of t.arg1 and proc as temporary variables.
8990 Removed side-effecting operations from conditions and macro calls.
8991 Introduced temporary variables with hopefully descriptive names
8992 for clarification. Replaced SCM_N?IMP by a more explicit
8993 predicate in some places.
8994
8995 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8996
8997 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
8998 explicit predicate in some places.
8999
9000 (CHECK_EQVISH): Removed.
9001
9002 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9003 variables. Removed side-effecting operations from conditions and
9004 macro calls. Introduced temporary variables for clarification.
9005 Sorted if-else-if check for the type of the last form in a list by
9006 frequency. Avoided some unnecessary tail-recursion calls.
9007
9008 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9009
9010 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9011 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9012 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9013 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9014 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9015 naming scheme for types.
9016
9017 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9018 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9019 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9020 (scm_make_environment), eval.c (scm_closure), fports.c
9021 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9022 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9023 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9024 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9025 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9026 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9027 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9028 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9029 scm_alloc_cell to scm_cell.
9030
9031 * environments.c (core_environments_observe), gc.c
9032 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9033 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9034 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9035 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9036 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9037 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9038 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9039 scm_double_cell.
9040
9041 2002-02-27 Stefan Jahn <stefan@lkcc.org>
9042
9043 * convert.i.c, convert.c: Better range checking.
9044
9045 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9046
9047 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
9048 Windows (MinGW).
9049
9050 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9051
9052 * Makefile.am: Update path to pre-inst-guile automake frag.
9053
9054 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9055
9056 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9057 features are excluded.
9058
9059 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9060
9061 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9062
9063 2002-02-25 Gary Houston <ghouston@arglist.com>
9064
9065 * convert.c: include <string.h> for convert_i.c.
9066
9067 2002-02-24 Rob Browning <rlb@defaultvalue.org>
9068
9069 * .cvsignore: add stamp-h1.
9070
9071 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9072
9073 * unif.c (scm_array_to_list): Correct name, which had been
9074 accidentally changed to scm_t_arrayo_list!
9075
9076 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9077
9078 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9079 underflowing scm_mallocated.
9080
9081 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9082
9083 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9084 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9085 Reimplemented using the new scm_gc_malloc, etc., functions and
9086 deprecated.
9087
9088 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9089
9090 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9091 to `noinst_PROGRAMS'.
9092 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9093 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9094
9095 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9096
9097 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9098 non-zero is returned from a port or smob free function.
9099 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9100 scm_gc_register_collectable_memory,
9101 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9102 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9103
9104 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9105 debug-malloc.c, dynl.c, environments.c, environments.h,
9106 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9107 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9108 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9109 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9110 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9111 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9112 appropriate. Return zero from smob and port free functions.
9113
9114 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9115
9116 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9117 messages while the GC is running.
9118 (scm_c_issue_deprecation_warning_fmt): New.
9119
9120 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9121 it is pointing to the putback buffer.
9122
9123 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9124
9125 * gsubr.c (create_gsubr): On "too many args" error,
9126 also display arg count and name. Thanks to Bill Schottstaedt.
9127
9128 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9129
9130 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9131
9132 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9133 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9134 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9135
9136 * guile-snarf-docs-texi.in: Bye bye.
9137
9138 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9139
9140 * symbols.c (scm_make_symbol): Fix typo in docstring.
9141
9142 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9143 scm_make_symbol): New prototypes.
9144
9145 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9146
9147 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9148 (SCM_SYMBOL_INTERNED_P): New.
9149 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9150 SCM_MAKINUM since hash values can well be bignums.
9151 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9152 This signals a interned symbol.
9153 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9154 scm_make_symbol): New.
9155
9156 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9157
9158 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9159
9160 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9161 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
9162 Thanks to Dave Love.
9163
9164 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9165
9166 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
9167 This might help to make unintended clashes less likely.
9168 (scm_string_to_symbol): Protect the string until the symbols is
9169 created.
9170
9171 2002-01-31 Stefan Jahn <stefan@lkcc.org>
9172
9173 * convert.c, convert.h, convert.i.c: New files containing C
9174 array to Scheme conversion helpers meant to be replacement
9175 functions for the deprecated gh interface.
9176
9177 * Makefile.am: Setup rules for new `convert.*' files.
9178
9179 2002-01-28 Stefan Jahn <stefan@lkcc.org>
9180
9181 * symbols.c (scm_c_symbol2str): New function, replacement for
9182 `gh_scm2newsymbol()'.
9183
9184 * strings.c (scm_c_substring2str): New function. Proper
9185 replacement for `gh_get_substr()'.
9186
9187 * socket.c: Include `stdint.h' if available for the `uint32_t'
9188 declaration.
9189
9190 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
9191 compiler warning).
9192
9193 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9194
9195 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
9196
9197 Other changes unrelated to Elisp...
9198
9199 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9200 "if".
9201 (comments): Fix a few typos.
9202 (scm_for_each): Add parentheses around oddly unparenthesized
9203 if/while conditions.
9204
9205 * read.c (scm_read_opts): Add full stop at end of doc for
9206 `keywords' option.
9207
9208 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9209 instead of gh_symbol2scm.
9210
9211 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9212 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9213
9214 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9215 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9216
9217 First batch of changes for Elisp support...
9218
9219 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9220 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9221 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9222
9223 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9224 conditionalize compilation and initialization of Elisp support
9225 function.
9226
9227 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9228 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9229 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9230 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9231 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9232 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9233 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
9234 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9235 options.c (change_option_setting, scm_options), posix.c
9236 (environ_list_to_c), print.c (scm_iprlist), throw.c
9237 (scm_exit_status), vectors.c (scm_vector), weaks.c
9238 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
9239
9240 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9241 just SCM_FALSEP.
9242
9243 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9244 of just SCM_BOOLP.
9245
9246 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9247 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9248 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9249 (scm_m_atfop): Support function aliasing. Support both function
9250 args, which need transformation, and macro args, which do not.
9251 Add explanatory comments.
9252 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9253 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9254 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9255 SCM_NULLP || SCM_NILP instead of checks against (removed)
9256 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9257 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9258
9259 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9260 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9261 these, but I don't want to remove them yet, just in case.
9262 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9263 Elisp nil value.
9264
9265 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9266 against (removed) scm_lisp_nil.
9267 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9268 (SCM_NULL_OR_NIL_P): New.
9269
9270 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9271 SCM_VALIDATE_NULL.
9272
9273 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9274 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9275 value).
9276
9277 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9278 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9279 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9280 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9281
9282 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9283 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9284 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9285 Numbering shifted down accordingly.
9286 (SCM_ELISP_NIL): New IFLAG.
9287
9288 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
9289
9290 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9291
9292 * eval.c: Removed outdated references to "everr". Improved some
9293 comments.
9294
9295 (scm_deval_args, deval_args): Renamed scm_deval_args to
9296 deval_args, since it is not part of the interface.
9297
9298 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9299 use references to debug.vect[0] before it exists. Add parentheses
9300 to switch statement.
9301
9302 * goops.h: Added local emacs variables.
9303
9304 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9305
9306 * eval.[ch] (scm_deval_args): Made static.
9307
9308 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9309 test.
9310
9311 * strings.c (scm_c_string2str): Clarified comment. Replaced
9312 THINKME by FIXME for uniformness. Removed question about whether
9313 arguments need to be protected from garbage collection: Arguments
9314 must be protected as any other variable.
9315
9316 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9317
9318 * procs.h (SCM_CLOSURE_BODY): New Macro.
9319
9320 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9321 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9322 get_slot_value, set_slot_value), procs.c
9323 (scm_procedure_documentation), sort.c (closureless), stacks.c
9324 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9325 SCM_CLOSURE_BODY.
9326
9327 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9328
9329 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9330
9331 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9332 use "cp" instead.
9333
9334 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9335
9336 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9337 everywhere.
9338
9339 * continuations.c (scm_make_continuation): Do not retain the
9340 throw_value when the continuation is invoked.
9341
9342 2001-12-08 Stefan Jahn <stefan@lkcc.org>
9343
9344 * strings.c (scm_c_string2str): New function. Converts a
9345 given Scheme string into a C string. Also put in two
9346 THINKME's regarding the malloc policy for the missing converter
9347 routines.
9348
9349 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9350
9351 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9352 gh_symbol2scm.
9353
9354 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9355
9356 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9357 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9358
9359 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9360 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9361 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9362 macros.
9363
9364 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9365
9366 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9367 SCM_GC_CELL_* macros when accessing free cells.
9368
9369 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9370
9371 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
9372 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
9373 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9374 * strings.h (SCM_MAKE_STRING_TAG): New.
9375 * procs.h (SCM_MAKE_CCLO_TAG): New.
9376 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9377
9378 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9379 !SCM_ENABLE_DEPRECATED.
9380
9381 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9382 New.
9383
9384 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9385 signal handlers are allowed to divert the flow of control. Call
9386 scm_system_async_mark_from_signal_handler instead of
9387 scm_system_async_mark.
9388
9389
9390 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9391 scm_alloc_double_cell in their place.
9392
9393 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9394 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9395 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9396 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9397 scm_deprecated_newcell and scm_deprecated_newcell2.
9398
9399 gc.c (scm_tc16_allocated): Only define when including deprecated
9400 features.
9401 (scm_debug_newcell, scm_debug_newcell2): Removed.
9402 (scm_init_storage): Do not initialize scm_tc16_allocated.
9403 (scm_init_gc): Do it here.
9404 (allocated_mark): New, from old code.
9405 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9406
9407 * inline.c, inline.h: New files.
9408 * Makefile.am: Added them in all the right places.
9409
9410 * _scm.h: Include "libguile/inline.h".
9411
9412 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9413 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9414 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9415 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9416 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9417 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9418 scm_alloc_double_cell, respectively.
9419
9420 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9421
9422 * modules.c (scm_c_use_module): Adapt to changes to
9423 `process-use-modules'.
9424
9425 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9426
9427 * numbers.c (scm_divide): Fix more division by zero errors.
9428
9429 2001-11-21 Gary Houston <ghouston@arglist.com>
9430
9431 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9432 obsolete. autogen.sh says:
9433 invalid unused variable name: `OMIT_DEPENDENCIES'
9434
9435 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9436
9437 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9438 reporting the bug.
9439
9440 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9441
9442 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9443 Thanks to Eric Gillespie, Jr!
9444
9445 2001-11-21 Stefan Jahn <stefan@lkcc.org>
9446
9447 * win32-socket.c (getservent, setservent, endservent,
9448 getprotoent, setprotoent, endprotoent): New functions.
9449 Appropriate replacements for M$-Windows.
9450
9451 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9452 these definitions for GUILE_DEBUG.
9453
9454 * net_db.c: Include "win32-socket.h" if compiling with a native
9455 M$-Windows compiler. Include some pieces of code (protoent and
9456 servent interface) protected by HAVE_* macros when using a
9457 native M$-Windows compiler.
9458
9459 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9460
9461 * modules.c (scm_c_export): Do nothing when the first argument is
9462 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9463
9464 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9465
9466 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9467 also include `buildstamp'.
9468
9469 2001-11-18 Rob Browning <rlb@defaultvalue.org>
9470
9471 * version.c
9472 (s_scm_major_version): use SCM_MAJOR_VERSION.
9473 (s_scm_minor_version): use SCM_MINOR_VERSION.
9474 (s_scm_micro_version): use SCM_MICRO_VERSION.
9475 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9476 SCM_MICRO_VERSION.
9477
9478 * version.h.in
9479 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9480 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9481 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9482
9483 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9484
9485 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9486 Rewrite docstrings without reference to substring-move-left/right,
9487 since the latter no longer exist.
9488
9489 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9490
9491 * eval.c: Removed bogus comment about acros.
9492
9493 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9494 Minimize scope of local variable. Eliminate dependency on
9495 macro DEBUG_EXTENSIONS.
9496
9497 (s_splicing): New error message string.
9498
9499 (scm_m_body): Issue 'bad body' message rather than 'missing
9500 expression' message.
9501
9502 (scm_m_quote): Eliminate unnecessary copying.
9503
9504 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9505 checking of the body to scm_m_body.
9506
9507 (scm_m_do): Move comment to function header. Rename arg1 to
9508 binding. Made the code a bit easier to read.
9509
9510 (evalcar): Removed.
9511
9512 (iqq): Added a comment. Changed the depth parameter to
9513 unsigned. Use size_t for vector lengths. Make sure vector object
9514 is gc protected as long as its contents are read. Add some syntax
9515 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9516 control structure a bit.
9517
9518 (scm_m_delay): Added comment about the implementation of
9519 scm_m_delay.
9520
9521 (scm_m_define): Add comment about guile's currying define
9522 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9523 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9524
9525 (scm_m_letrec1): Removed. Part of the functionality is taken
9526 over by the new function 'transform_bindings'.
9527
9528 (transform_bindings): New function. Takes over some of the
9529 functionality of removed function 'scm_m_letrec1', namely to split
9530 a list of bindings into a reversed list of variables and a list of
9531 initializers.
9532
9533 (scm_m_letrec): Call 'transform_bindings'.
9534
9535 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9536 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9537 test. Use 'transform_bindings'. Fixed scoping error with named
9538 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9539 Jerram for suggesting the fix). Cleaned up the control structure
9540 a bit.
9541
9542 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9543 unnecessary consing. Eliminated unnecessary
9544 SCM_DEFER/ALLOW_INTS.
9545
9546 (SCM_CEVAL): Un-obfuscated some loops.
9547
9548 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9549
9550 * gc.h (scm_unhash_name): Old declaration removed.
9551
9552 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9553 @code{primitive-eval}.
9554
9555 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9556 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9557 Change @deffnx lines in docstrings to say {Scheme Procedure}
9558 rather than primitive or procedure.
9559
9560 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9561 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9562 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9563 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9564 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9565 (scm_string_split, scm_string_ci_to_symbol), strings.c
9566 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9567 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9568 Docstring fixes and improvements reflecting edits that have been
9569 made in the reference manual source.
9570
9571 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9572 scm_object_property, scm_set_object_property_x): Remove invalid
9573 @deffnx lines for corresponding procedure property primitives.
9574
9575 These changes add a @deffnx C function declaration and function
9576 index entries for each Guile primitive to the copy of the doc
9577 snarf output that is used for reference manual synchronization.
9578 Online help is unchanged.
9579
9580 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9581 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9582 name to SCM_SNARF_DOCS.
9583
9584 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9585 snarf-check-and-output-texi.
9586
9587 * Makefile.am (guile-procedures.texi): New rule.
9588 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9589 Changed so that the last stage of doc snarfing is now performed
9590 twice, once to produce guile-procedures.txt for online help, and
9591 once to produce guile.texi for reference manual synchronization.
9592
9593 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9594
9595 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9596 safely usable as a single statement followed by a ';', for example
9597 in an if statement.
9598
9599 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9600
9601 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9602
9603 * random.c (scm_random_solid_sphere_x,
9604 scm_random_hollow_sphere_x): Correct "shere" typos.
9605
9606 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9607
9608 * version.c (scm_version): Update docstring to include
9609 `micro-version'.
9610
9611 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9612
9613 * modules.c (scm_c_export): Call va_end after collecting the
9614 symbols.
9615
9616 * strop.h, strop.c (scm_substring_move_left_x,
9617 scm_substring_move_right_x): Removed.
9618
9619 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9620 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9621 configure does.
9622
9623 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9624
9625 * numbers.c: Document macros to define when including
9626 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9627 now rely on SIZEOF_ macros that have been figured out at
9628 configure time.
9629
9630 * num2integral.i.c: Adapt to new interface.
9631 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9632 target type by casting it and checking whether it is still the
9633 same. Do not try to handle bignums for integral types that are
9634 smaller than fixnums. When handling bignums, collect the
9635 magnituse first into a unsigned type, and correctly check for
9636 overflow.
9637 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9638 only -MIN_VALUE can still be negative of all negative numbers (in
9639 twos-complement).
9640
9641 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
9642
9643 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9644 HAVE_LONG_LONG depending on whether their size is non-zero.
9645
9646 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9647
9648 * strop.c (scm_string_null_p): Docfix; nfc.
9649 Thanks to Scott Lenser.
9650
9651 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9652
9653 * extensions.c (scm_load_extension): Canonicalize docstring
9654 whitespace.
9655
9656 * unif.c (scm_uniform_array_write), ports.c
9657 (scm_current_output_port, scm_force_output), dynwind.c
9658 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9659 filesys.c (scm_open, scm_lstat), struct.c
9660 (scm_make_struct_layout), random.c (scm_random,
9661 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9662 (scm_i_index): Remove superfluous whitespace from end of docstring
9663 lines.
9664
9665 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9666 strings.c (scm_make_string), variable.c (scm_make_variable,
9667 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9668 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9669 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9670 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9671 newline at end of docstrings.
9672
9673 * modules.c (scm_set_current_module): Add missing newline to
9674 docstring.
9675
9676 2001-11-07 Stefan Jahn <stefan@lkcc.org>
9677
9678 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9679 and makes them available through Guile. That is because the
9680 Winsock-API does not store its errors in `errno' and thus cannot
9681 return error messages via `strerror (errno)'.
9682
9683 * socket.c (scm_init_socket): Initialize `win32-socket' part
9684 here under M$-Windows.
9685
9686 * numbers.h: Added missing declaration of
9687 `scm_sys_check_number_conversions()'.
9688
9689 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9690 and use in `(strerror)' and `(system-error)'.
9691
9692 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
9693 `win32-socket.[ch]' to extra source and header files.
9694
9695 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9696
9697 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9698 a call to turn-on-debugging when --debug has been given instead of
9699 turning it on directly. Also, handle new `--no-debug' option,
9700 which might suppress the call to turn-on-debugging.
9701
9702 2001-11-05 Stefan Jahn <stefan@lkcc.org>
9703
9704 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9705
9706 2001-11-04 Stefan Jahn <stefan@lkcc.org>
9707
9708 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
9709 here (was at guile_LDADD) which describes the dependency
9710 correctly and allows a clean build on Win32.
9711
9712 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
9713 into FOO.
9714
9715 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9716 import macros for external libraries (libcrypt, libqthreads,
9717 libreadline and libregex).
9718
9719 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9720
9721 * posix.c (flock): Added support for flock() in M$-Windows.
9722
9723 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9724 of __SCM_IMPORT__.
9725
9726 * fports.c (getflags): Differentiate reading and writing pipes
9727 descriptors.
9728
9729 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9730 M$-Windows.
9731
9732 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9733 conditionalized error code if `ETIMEDOUT' is not available.
9734 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9735 timeout'.
9736
9737 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9738 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9739 each inclusion of `num2integral.i.c'.
9740 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9741
9742 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9743
9744 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9745 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9746
9747 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9748
9749 * print.c (scm_iprin1): Mark print state as revealed when
9750 dispatching to generic write or display.
9751
9752 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9753
9754 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9755
9756 Support for native Win32. Thanks to Stefan Jahn!
9757
9758 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9759 and win32-dirent.h to extra source and header files. These
9760 include the uname() and the POSIX dirent interface implementation
9761 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9762 linkers which do not allow unresolved symbols inside shared
9763 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9764 dependency.
9765
9766 * __scm.h: Defined SCM_API. This macro gets prepended to all
9767 function and data definitions which should be exported or imported
9768 in the resulting dynamic link library in the Win32 port.
9769
9770 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
9771 chars.h, continuations.h, coop-defs.h, coop-threads.h,
9772 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9773 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9774 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9775 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9776 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
9777 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
9778 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9779 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9780 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9781 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9782 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9783 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9784 vports.h, weaks.h:
9785 Prefixed each each exported symbol with SCM_API.
9786
9787 * continuations.c: Added comment about the use of the extern
9788 declarations of {get,set}context() functions used in the ia64 port.
9789
9790 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9791 is meant to be a `unsigned long *'.
9792
9793 * filesys.c: Include `direct.h' if possible. Use local
9794 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9795 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9796 able to differentiate between sockets and other file descriptors.
9797 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9798 `scm_dirname()'.
9799
9800 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9801 statement block in `scm_fport_buffer_add()'.
9802 Some corrections in `getflags()'.
9803
9804 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9805
9806 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9807 build on Win32. Disable preloaded symbols on Win2 platforms.
9808
9809 * ioext.c, ports.c: Include `io.h' is possible.
9810
9811 * mkstemp.c: Include `process.h' is possible.
9812
9813 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9814 too.
9815 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9816
9817 * posix.c: Remove unnecessary dirent includes and defines. Include
9818 local `win32-uname.h' for MinGW. Extern declaration of
9819 `mkstemp()' for systems where it does not exists. Make
9820 `getlogin()' available on M$-Windows.
9821
9822 * scmsigs.c: Made `usleep()' avalable on MinGW.
9823
9824 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9825
9826 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9827
9828 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9829
9830 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9831
9832 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9833 Don't apply scm_uniform_vector_length on arrays.
9834
9835 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9836
9837 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9838 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9839 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9840 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9841 scm_list_<n> over scm_cons[2]?.
9842
9843 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9844 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9845 SCM_C[AD][AD]R instead of explicit form.
9846
9847 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9848 comparison parameters.
9849
9850 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9851 !SCM_NULLP instead of SCM_NIMP.
9852
9853 (scm_m_case): Don't copy the form. Renamed proc to clause and
9854 minimized its scope. Renamed x to clauses. Removed side
9855 effecting operation from macro call.
9856
9857 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9858 minimized its scope. Renamed x to clauses. Minimized the scope
9859 of variable 'len'. Make sure the else clause is treated specially
9860 even in case of '=>' occurences. Don't change the else to #t in
9861 order to be able to distinguish this case in the evaluator. Leave
9862 type checking of the recipient to the evaluator.
9863
9864 (scm_c_improper_memq): Made the comment somewhat clearer.
9865
9866 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9867 test for SCM_IM_LET at the place of the formal parameters.
9868 Simplified the formal parameter checking.
9869
9870 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9871 Renamed arg1 to binding and minimized its scope. Eliminated
9872 unnecessary consing.
9873
9874 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9875 variable 'len'.
9876
9877 (build_binding_list): New static function.
9878
9879 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9880 Further, split up the 'letrec' unmemoizing code to the
9881 corresponding parts for 'do', 'let' and 'letrec', adding comments
9882 to each form. Cleanup the handling of the do form (This removes
9883 some *real* code :-).
9884
9885 (SCM_CEVAL): Removed side effecting operation from macro call.
9886 Handle the 'else clause of the 'cond form specially - the symbol
9887 'else is not replaced with #t any more.
9888
9889 2001-10-14 Gary Houston <ghouston@arglist.com>
9890
9891 * version.c (scm_version): use sprintf instead of snprintf,
9892 for portability. thanks to Bill Schottstaedt.
9893
9894 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9895
9896 * read.c (scm_lreadr): When user-defined hash procedure returns
9897 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9898 an exception. (This prevents parsing of uniform vectors from
9899 interfering with parsing of numbers.)
9900
9901 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9902
9903 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9904 PTRDIFF_MIN. Thanks to Ken Raeburn.
9905
9906 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9907
9908 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9909
9910 * eval.c (scm_m_atbind): First try to find the variable without
9911 defining it locally; when it has not been found, define it
9912 locally.
9913
9914 * modules.c (module_variable): Pass over variables that exist but
9915 are unbound.
9916
9917 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9918
9919 * backtrace.c (display_backtrace_file_and_line): Only use
9920 scm_basename when POSIX support is compiled in. Thanks to Chris
9921 Cramer.
9922
9923 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9924
9925 * numbers.c (mem2uinteger): Return number read so far when coming
9926 across a hexdigit after having read a # or if not reading a hex
9927 value. This will enable the calling code to correctly handle
9928 forms like 1e2. (The background is, that the exponent markers d,
9929 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9930 providing this patch.
9931
9932 (mem2complex): Fix erroneous double-negation. Now, numbers like
9933 1-i will be read correctly.
9934
9935 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9936
9937 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9938
9939 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9940
9941 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9942
9943 * print.c (scm_print_state_vtable, print_state_pool):
9944 Initialize. These variables are now registered as gc roots.
9945
9946 (scm_current_pstate): Update documentation.
9947
9948 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9949 scm_prin1, scm_init_print): print_state_pool is registered as a
9950 gc root and thus does not need to be protected by a surrounding
9951 pair any more.
9952
9953 (make_print_state): The car of print_state_pool no longer holds
9954 the scm_print_state_vtable.
9955
9956 (scm_current_pstate, scm_make_print_state, print_circref,
9957 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
9958 SCM_N<foo>.
9959
9960 (scm_prin1): When building lists, prefer scm_list_<n> over
9961 scm_cons[2]?.
9962
9963 (scm_iprlist): Removed a redundant SCM_IMP test.
9964
9965 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
9966
9967 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9968
9969 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
9970
9971 (scm_memcons, scm_mem_to_proc): When building lists, prefer
9972 scm_list_<n> over scm_cons[2]?.
9973
9974 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
9975
9976 (scm_procedure_name): Use SCM_CADR instead of explicit form.
9977
9978 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
9979 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
9980 for some reason his patch didn't make it into the cvs.
9981
9982 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
9983
9984 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
9985 little bit - should even be somewhat more accurate now.
9986
9987 2001-10-08 Rob Browning <rlb@defaultvalue.org>
9988
9989 * gc.c: support ia64 register backing store.
9990 (SCM_MARK_BACKING_STORE): new macro.
9991
9992 * continuations.h: support ia64 register backing store.
9993 (struct scm_t_contregs): add ia64 register backing store.
9994
9995 * continuations.c: support ia64 register backing store.
9996 (continuation_mark): mark ia64 register backing store.
9997 (continuation_free): free ia64 register backing store.
9998 (scm_make_continuation): capture ia64 register backing store.
9999 (copy_stack_and_call): copy ia64 register backing store.
10000
10001 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10002
10003 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10004 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10005 instead of SCM_NIMP to test for that case.
10006
10007 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10008 scm_t_bits instead of long.
10009
10010 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10011
10012 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10013 SCM_T_SIGNED_BITS_MIN): New.
10014 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10015 Use them to make these macros computable by the preprocessor.
10016
10017 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10018 whether the integral type fits in a fixnum, not the compiler.
10019 This removes a spurious compiler warning. Also, honor the
10020 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10021 needed for `long long's.
10022
10023 * numbers.c: Define NO_PREPRO_MAGOC when including
10024 num2integral.c.i for `long long' and `signed long long'.
10025
10026 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10027
10028 These changes fixes a race condition in the Guile coop - pthread
10029 compatibility code.
10030
10031 * coop.c (mother_awake_p): New variable.
10032 (coop_create): Set mother_awake_p before creating or signalling
10033 mother; wait until mother is going to sleep before returning.
10034 (mother): Reset mother_awake_p before going to sleep.
10035
10036 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10037
10038 * options.c (protected_objects, scm_init_options): The content of
10039 protected_objects is now protected from garbage collection using
10040 scm_gc_register_root instead of scm_permanent_object.
10041
10042 (get_option_setting): New static function that computes an option
10043 setting as it was formerly done in the function scm_options.
10044
10045 (get_documented_option_setting): New static function that
10046 returns option documentation as it was formerly done in the
10047 function scm_options. Note that documentation C strings are no
10048 longer precomputed into SCM objects. Instead, they are converted
10049 into SCM strings every time get_documented_option_setting is
10050 called.
10051
10052 (change_option_setting): New static functions that modifies the
10053 option setting as it was formerly done in the function
10054 scm_options. The function is now exception safe, i. e. won't
10055 cause a memory leak when interrupted. Further, only non-immediate
10056 option values are added to the protection list.
10057
10058 (scm_options): This function now has only the purpose to dispatch
10059 to to get_option_setting, get_documented_option_setting or
10060 change_option_setting, depending on the arguments given to
10061 scm_options.
10062
10063 (scm_init_opts): Don't convert documentation C strings into SCM
10064 strings. Further, don't protect any object values: They _must_
10065 be immediate values, otherwise there is no guarantee that they
10066 have not been collected before anyway.
10067
10068 * options.[ch] (scm_t_option): Made type unsigned, name into a
10069 constant char* and val into a scm_t_bits type.
10070
10071 (scm_options, scm_init_opts): The number of options is guaranteed
10072 to be larger or equal to zero. Thus, the type is changed to
10073 unsigned.
10074
10075 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10076
10077 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10078 testing an unsigned value for being >= 0.
10079
10080 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10081
10082 * numbers.h: Removed old comment about using SCM_CAR to access
10083 non-pair cells.
10084
10085 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10086 the return value is signed. Thanks to Brian Crowder for the bug
10087 report.
10088
10089 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10090 values. With this patch, SCM_SRS can be safely used for other
10091 types than scm_t_signed_bits. However, it should still better be
10092 an internal macro and thus be renamed to SCM_I_SRS.
10093
10094 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10095
10096 2001-10-03 Gary Houston <ghouston@arglist.com>
10097
10098 * continuations.h, unif.h: in the descriptions of the bit patterns
10099 of the heap cells, make bit 0 the least significant.
10100
10101 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10102
10103 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10104 Thanks to Golubev I. N.
10105
10106 2001-09-25 Gary Houston <ghouston@arglist.com>
10107
10108 * ports.c (scm_drain_input): extended the docstring. thanks to
10109 Alex Schroeder and Thien-Thi Nguyen.
10110
10111 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10112
10113 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10114 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10115 macros. (The NUM names might soon change.)
10116
10117 * numbers.h: Added missing declarations.
10118
10119 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10120
10121 * Makefile.am: Distribute num2float.i.c.
10122
10123 * num2float.i.c: New file, multiply included by numbers.c, used
10124 to "templatize" the float <-> num conversion routines.
10125
10126 * numbers.c: New functions: scm_num2float, scm_float2num,
10127 scm_num2double, scm_double2num.
10128
10129 2001-09-21 Rob Browning <rlb@defaultvalue.org>
10130
10131 * .cvsignore: really add version.h
10132
10133 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10134 Otherwise it fails on the alpha. However, we might rather choose
10135 this size conditionally.
10136
10137 * numbers.c (scm_gcd): change "k" to a long from an int.
10138 Otherwise it fails on the alpha. However, we might rather choose
10139 this size conditionally.
10140
10141 * error.c (scm_wta): coerce char* to intptr_t before int
10142 assignment.
10143
10144 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10145 int.
10146
10147 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10148
10149 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10150
10151 * numbers.c (scm_integer_expt): Accept inexact integer in second
10152 argument. (Thanks to Bill Schottstaedt.)
10153
10154 2001-09-20 Rob Browning <rlb@defaultvalue.org>
10155
10156 * .cvsignore: add version.h
10157
10158 * versiondat.h.in: removed (obsolete).
10159
10160 * version.h.in: renamed from version.h.
10161 (SCM_GUILE_MAJOR_VERSION): new public macro.
10162 (SCM_GUILE_MINOR_VERSION): new public macro.
10163 (SCM_GUILE_MICRO_VERSION): new public macro.
10164
10165 * version.h: renamed to version.h.in.
10166
10167 * version.c
10168 (scm_major_version): support integer *_VERSION macros.
10169 (scm_minor_version): support integer *_VERSION macros.
10170 (scm_micro_version): support integer *_VERSION macros.
10171 (scm_version): support integer *_VERSION macros.
10172
10173 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10174
10175 * error.c, error.h: Made error keys globally accessible.
10176 Applications might want to test for these or use them in a direct
10177 call to scm_error.
10178
10179 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10180 routines are passed an inexact. This change in behavior is
10181 motivated by concordance with R5RS: It is more common that a
10182 primitive doesn't want to accept an inexact for an exact.
10183
10184 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10185
10186 The following patch partially undoes my patch from 2001-06-30,
10187 where I added the function scm_gc_mark_cell_conservatively. The
10188 function is buggy, since it breaks guile during conservative
10189 marking if a pointer on the stack points directly into the list of
10190 free cells on the heap: With conservative cell marking this will
10191 cause the whole free list to be scanned and marked - boom!
10192
10193 * gc.c (allocated_mark, MARK, heap_segment,
10194 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
10195 (scm_gc_mark_cell_conservatively): Remove function
10196 scm_gc_mark_cell_conservatively and update the corresponding
10197 comments and uses accordingly. Thanks to Christopher Cramer for
10198 the patch. (Minor corrections by me.)
10199
10200 2001-09-15 Gary Houston <ghouston@arglist.com>
10201
10202 * root.h (scm_root_state): removed the continuation_stack and
10203 continuation_stack_ptr members, which have no apparent purpose.
10204 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10205 removed.
10206
10207 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10208 (scm_igc): remove all references to contination_stack and
10209 continuation_stack_ptr, avoiding allocation of a vector and
10210 useless processing during gc.
10211
10212 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10213
10214 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10215
10216 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10217
10218 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10219
10220 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10221
10222 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10223 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10224
10225 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10226
10227 * guardians.c (mark_dependencies_in_tconc,
10228 whine_about_self_centered_zombies, scm_init_guardians): Register
10229 the static global variable `self_centered_zombies' via
10230 scm_gc_register_root, to make some cdr-ing unnecessary.
10231
10232 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10233
10234 * backtrace.c (display_backtrace_file,
10235 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10236 values, use SCM_FALSEP when comparing SCM values against #f.
10237 Thanks to Rob Browning for the bug report.
10238
10239 2001-09-12 Martin Baulig <martin@home-of-linux.org>
10240
10241 * strings.[ch] (scm_str2string): New function.
10242
10243 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10244
10245 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10246 when computing nm, even if it's negative.
10247 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10248 (scm_must_realloc): Likewise.
10249
10250 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10251
10252 * numbers.c (scm_sys_check_number_conversions): new function,
10253 defined if Guile is compiled in debugging mode. currently checks
10254 `scm_num2ulong', should check much much more.
10255
10256 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10257 unsigned, ensure that it's positive. thanks to Martin Baulig!
10258
10259 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10260
10261 * __scm.h: Added new section about compile time selectable
10262 features.
10263
10264 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10265 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10266 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10267 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10268 Removed.
10269
10270 * deprecation.c (scm_include_deprecated_features): Simplified.
10271
10272 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
10273 `SCM_IMP' instead of `!SCM_CELLP´.
10274
10275 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10276 Extract side-effecting operations from macros.
10277
10278 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10279 scm_top_level_lookup_closure_var and scm_system_transformer.
10280
10281 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10282
10283 (heap_segment): Use CELL_P instead of SCM_CELLP.
10284
10285 * init.c (start_stack): Don't initialize
10286 scm_top_level_lookup_closure_var and scm_system_transformer.
10287
10288 * modules.c (scm_set_current_module): Don't access
10289 scm_top_level_lookup_closure_var and scm_system_transformer.
10290
10291 (scm_sym2var): Don't call scm_variable_set_name_hint.
10292
10293 (scm_post_boot_init_modules): Removed deprecated initializations.
10294
10295 * print.c (scm_ipruk): Don't access cell contents of non cells.
10296
10297 * strings.c (scm_string_set_x): All strings are writable.
10298
10299 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10300 type. There is only one string type now.
10301
10302 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10303
10304 * tags.h: Remove comments about two different string types.
10305
10306 (SCM_CELLP, SCM_NCELLP): Deprecated.
10307
10308 * variable.c (make_variable): Remove code variant for vcells.
10309
10310 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10311 SCM_VARIABLE_LOC): Remove code variant for vcells.
10312
10313 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10314 SCM_ENABLE_DEPRECATED with the logic reversed.
10315
10316 * dynl.c (moddata, registered_mods), dynl.[ch]
10317 (scm_register_module_xxx, scm_registered_modules,
10318 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10319 (*top-level-lookup-closure*), eval.[ch]
10320 (scm_top_level_lookup_closure_var, scm_system_transformer,
10321 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10322 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10323 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10324 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10325 scm_unprotect_object), modules.c (root_module_lookup_closure,
10326 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10327 beautify_user_module_x_var, try_module_autoload_var,
10328 scm_module_full_name), modules.[ch] (scm_the_root_module,
10329 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
10330 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
10331 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10332 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10333 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10334 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10335 scm_make_shared_substring), tags.h (scm_tc7_substring,
10336 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10337 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10338 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10339 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10340 Removed.
10341
10342 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10343 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10344 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10345 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10346 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10347 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10348 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10349 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10350 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10351 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10352 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10353 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10354 (setzone, scm_strftime, scm_strptime), vports.c
10355 (scm_make_soft_port): Remove calls to
10356 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10357 gone, all strings are 0-terminated anyway.
10358
10359 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10360 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10361 double inclusion of the same headers to the SCM_<filename>_H
10362 format.
10363
10364 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10365 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10366 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10367 any more.
10368
10369 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10370 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10371 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10372 !SCM_<foo> over SCM_N<foo>.
10373
10374 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10375
10376 * Makefile.am: Remove references to symbols-deprecated.c.
10377
10378 * symbols.c (scm_init_symbols): Don't initialize deprecated
10379 symbol functions.
10380
10381 * symbols-deprecated.c: Removed.
10382
10383 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10384 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10385 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10386 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10387 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10388 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10389 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10390 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10391 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10392 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10393 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10394 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10395 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10396 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10397 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10398 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10399 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10400 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10401 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10402 scm_intern0, scm_sysintern, scm_sysintern0,
10403 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10404 scm_string_to_obarray_symbol, scm_intern_symbol,
10405 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10406 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10407 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10408 vectors.[ch] (scm_vector_set_length_x): Removed.
10409
10410 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10411 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10412 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10413 Renamed the macros that are defined to inhibit double inclusion of
10414 the same headers to the SCM_<filename>_H format.
10415
10416 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10417 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10418 SCM_N<foo>.
10419
10420 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10421
10422 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10423 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10424 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10425 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10426 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10427 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10428 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10429 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10430 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10431 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10432 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10433 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10434
10435 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10436 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10437 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10438 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10439 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10440 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10441 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10442 double inclusion of the same headers to the SCM_<filename>_H
10443 format.
10444
10445 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10446 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10447 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10448 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10449 !SCM_<foo> over SCM_N<foo>.
10450
10451 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10452
10453 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10454 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10455 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10456 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10457 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10458 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10459 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10460 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10461 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10462 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10463 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10464 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10465 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10466 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10467 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10468 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10469 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10470 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10471 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10472 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10473 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10474 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10475 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10476 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10477 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10478 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10479 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10480 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10481 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10482 the macros that are defined to inhibit double inclusion of the
10483 same headers to the SCM_<filename>_H format.
10484
10485 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10486
10487 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10488 "scm_t_portable" with "scm_port_table" which was an artifact from
10489 the great "scm_*_t -> scm_t_" renaming.
10490
10491 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10492
10493 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10494 used; nfc. Thanks to Bill Schottstaedt.
10495
10496 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10497 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10498 Thanks to Chris Cramer.
10499
10500 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10501
10502 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10503
10504 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10505 dynamic scope.
10506 * dynwind.h (scm_swap_bindings): Declare.
10507 * dynwind.c (scm_swap_bindings): Make non-static.
10508
10509 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10510
10511 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10512 doing exactly nothing about them). thanks Neil!
10513
10514 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10515
10516 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
10517
10518 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10519
10520 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10521 (proto) in the case when either `GUILE_DEBUG' or
10522 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10523
10524 (map_free_list): Fix typo: Ref `f' correctly.
10525
10526 Thanks to Chris Cramer.
10527
10528 2001-08-15 Rob Browning <rlb@defaultvalue.org>
10529
10530 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10531 variables.
10532 (libpath.h): change libguileversion to libguileinterface.
10533
10534 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10535
10536 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10537 ChangeLog-2000. Thanks to Daniel Skarda!
10538
10539 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10540
10541 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10542 do it from the Makefile.
10543
10544 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10545 are of a reasonable size.
10546
10547 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10548
10549 * stacks.c (scm_make_stack): Improve docstring by explaining use
10550 of cutting args.
10551
10552 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10553
10554 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10555 scm_char_whitespace_p, scm_char_upper_case_p,
10556 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10557 characters to fulfill isascii in addition to the primary
10558 predicate.
10559
10560 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10561
10562 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10563 scm_istr2flo, scm_istring2number): Removed.
10564
10565 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10566 SCM_SLOPPY_<foo>.
10567
10568 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10569 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10570 Added.
10571
10572 (scm_string_to_number): Use new number parser.
10573
10574 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10575 handles complex numbers.
10576
10577 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10578 SCM_<foo>_H.
10579
10580 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10581 SCM_N<pred>.
10582
10583 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10584
10585 (scm_i_mem2number): Added.
10586
10587 (scm_exact_to_inexact): Changed signature.
10588
10589 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10590 here instead of within scm_i_mem2number. Call scm_i_mem2number
10591 instead of scm_istr2int and scm_istring2number.
10592
10593 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10594
10595 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10596 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10597 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10598 !SCM_<pred> over SCM_N<pred>.
10599
10600 (scm_eval_body): Remove side effecting code from macro call.
10601
10602 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10603 SCM_NIMP test.
10604
10605 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10606
10607 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10608
10609 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10610
10611 Removed vcell slot from structs.
10612
10613 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10614 subsequent indices.
10615
10616 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10617 zero. Use scm_vtable_index_layout instead of "0" when accessing
10618 said slot.
10619 (scm_init_struct): Remove vcell slot layout code from
10620 required_vtable_fields.
10621
10622 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10623
10624 * goops.c (build_class_class_slots): Removed vcell slot
10625 definition.
10626
10627 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10628 Removed vcell slot layout code.
10629 (scm_si_vcell): Removed.
10630
10631 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10632
10633 "Glocs" have been removed.
10634
10635 * tags.h: Update tag system docs.
10636 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10637 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10638 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10639 or SCM_NCONSP, respectively.
10640
10641 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10642 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10643 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10644
10645 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10646 tell glocs from structs.
10647
10648 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10649
10650 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10651 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10652 instead of with glocs.
10653 (EVALCAR): Do not test for glocs.
10654 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10655 condition.
10656 (scm_unmemocar): Do not handle glocs.
10657 (scm_m_atfop): Memoize as a variable, not as a gloc.
10658 (scm_eval_args, scm_deval_args): Do not handle glocs.
10659 (scm_ceval, scm_deval): Likewise.
10660
10661 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10662 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10663 Removed.
10664
10665 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10666
10667 * dynwind.c (scm_swap_bindings): Likewise.
10668 (scm_dowinds): Updated to recognize lists of variables instead of
10669 lists of glocs.
10670
10671 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10672
10673
10674 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10675 where it is needed.
10676
10677 2001-07-25 Gary Houston <ghouston@arglist.com>
10678
10679 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10680 docstrings to reflect the n-ary implementation.
10681
10682 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10683
10684 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10685 value of a variable, not the plain "return" statement.
10686
10687 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10688
10689 * eval.c: Allow variables in memoized code (in addition to glocs).
10690 (scm_lookupcar): Handle variables in lost races. Replace symbol
10691 with variable directly, do not make a gloc.
10692 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10693 like glocs.
10694 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10695 the main switch.
10696
10697 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10698
10699 * variable.c (scm_i_variable_print): Use "value" instead of
10700 "binding" since a binding is the mapping between symbols and
10701 variables, not between variables and their values.
10702
10703 * tags.h (scm_tc7_variable): New.
10704 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10705 * print.c (scm_iprin1): Likewise.
10706
10707 * variable.h (scm_tc16_variable): Removed.
10708 (SCM_VARIABLEP): Test for new tc7 code.
10709 (scm_i_variable_print): New.
10710 * variable.c (scm_tc16_variable): Removed.
10711 (variable_print): Renamed to scm_i_variable_print and made
10712 non-static.
10713 (variable_equal_p): Removed.
10714 (make_variable): Construct a tc7 object instead of a smob.
10715 (scm_init_variable): Do not register smob.
10716
10717 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10718
10719 * tags.h: Include inttypes.h when we have it.
10720
10721 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10722
10723 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10724 is taken by the new SCM_IM_CALL_WITH_VALUES.
10725 * print.c (scm_isymnames): Update table accordingly.
10726
10727 2001-07-22 Gary Houston <ghouston@arglist.com>
10728
10729 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10730 SCM_MAKINUM to convert regoff_t value to SCM.
10731
10732 2001-07-21 Gary Houston <ghouston@arglist.com>
10733
10734 * scmsigs.c: include sys/time.h for itimer stuff.
10735
10736 2001-07-19 Rob Browning <rlb@defaultvalue.org>
10737
10738 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10739
10740 * c-tokenize.lex: add option %nounput to quiet warning.
10741 Add prototype for yylex to quiet warning.
10742
10743 * scmconfig.h.in: add flags for setitimer and getitimer.
10744
10745 * scmsigs.h (scm_init_scmsigs): new prototype.
10746 (scm_init_scmsigs): new prototype.
10747
10748 * scmsigs.c (s_scm_setitimer): new function.
10749 (s_scm_setitimer): new function.
10750
10751 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10752
10753 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10754 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10755 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10756 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10757 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10758 guile-func-name-check.in, guile-snarf-docs-texi.in,
10759 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10760 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10761 objprop.c, objprop.h, options.c, options.h, random.h,
10762 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10763 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10764 version.c, version.h: Updated copyright notice.
10765
10766 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10767
10768 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10769 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10770 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10771 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10772 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10773 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10774 sym_environment, scm_sym_change_class): New static variables to
10775 hold predefined symbols.
10776
10777 (build_class_class_slots): Build the list using scm_list_n
10778 instead of cons. Also, slots are already created as lists, thus
10779 making a call to maplist unnecessary.
10780
10781 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10782 scm_class_direct_subclasses, scm_class_direct_methods,
10783 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10784 scm_method_procedure, create_standard_classes, purgatory): Use
10785 predefined symbols.
10786
10787 (build_slots_list, compute_getters_n_setters,
10788 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10789 get_slot_value_using_name, set_slot_value_using_name,
10790 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10791 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10792 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10793
10794 (scm_sys_prep_layout_x): Minimize variable scopes.
10795
10796 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10797 scm_sys_fast_slot_set_x): Fix signedness.
10798
10799 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10800 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10801 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10802 when converting to and from SCM values.
10803
10804 (scm_enable_primitive_generic_x): Add rest argument checking.
10805
10806 (map, filter_cpl, maplist, scm_sys_initialize_object,
10807 scm_sys_prep_layout_x, slot_definition_using_name,
10808 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10809 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10810 predicates over SCM_N?IMP tests.
10811
10812 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10813 checking.
10814
10815 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10816 alias.
10817
10818 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10819
10820 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10821
10822 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10823
10824 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10825
10826 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10827
10828 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10829
10830 * strings.c (s_scm_string): fix arg position in assert.
10831
10832 2001-07-11 Gary Houston <ghouston@arglist.com>
10833
10834 * strports.c (st_write): use memcpy, not strncpy. thanks to
10835 Dale P. Smith.
10836
10837 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10838
10839 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10840 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10841 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10842 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10843 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10844 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10845 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10846 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10847 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10848 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10849 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10850 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10851 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10852 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10853 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10854 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10855 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10856 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10857 weaks.c, weaks.h: Remove "face-lift" comment.
10858
10859 2001-07-08 Rob Browning <rlb@defaultvalue.org>
10860
10861 * .cvsignore: add stamp-h.in.
10862
10863 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10864
10865 * hooks.c (scm_make_hook, scm_add_hook_x),
10866 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10867 value info to the docstrings.
10868
10869 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10870
10871 Some more compatibility patches for Windows.
10872
10873 * posix.c (getlogin): getlogin() implementation for Windows.
10874
10875 * backtrace.c, ioext.c: Include <stdio.h>.
10876
10877 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10878 exist.
10879
10880 * cpp_sig_symbols.in: Added SIGBREAK.
10881
10882 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10883
10884 * strports.c (scm_read_0str, scm_eval_0str): Call
10885 scm_c_read_string and scm_c_eval_string respectively, not
10886 themselves. Thanks to Dale P. Smith!
10887
10888 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10889
10890 * unif.c (scm_array_set_x): The variable args does not
10891 necessarily have to be a list. Further, got rid of a redundant
10892 SCM_NIMP test.
10893
10894 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10895
10896 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10897 last.
10898
10899 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
10900 init_heap_seg): Fixed signedness.
10901
10902 (init_heap_seg): Replaced strange for-loop with a while loop.
10903
10904 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10905
10906 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10907
10908 The following patch adds conservative marking for the elements of
10909 free or allocated cells.
10910
10911 * gc.c (allocated_mark, heap_segment): New static functions.
10912
10913 (which_seg): Deleted, since the functionality is now provided by
10914 function heap_segment.
10915
10916 (map_free_list): Use heap_segment instead of which_seg.
10917
10918 (MARK): If cell debugging is disabled, mark free cells
10919 conservatively.
10920
10921 (scm_mark_locations, scm_cellp): Extracted the search for the
10922 heap segment of a SCM value into function heap_segment.
10923
10924 (scm_init_storage): Allocated cells must be marked
10925 conservatively.
10926
10927 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10928
10929 The following patch changes the representation of weak vectors to
10930 double cells instead of using an extension of the vector's
10931 allocated memory.
10932
10933 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10934 the result of SCM_WVECT_GC_CHAIN.
10935
10936 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10937
10938 * weaks.c (allocate_weak_vector): New static function. It does
10939 not patch any previously created vector object during the
10940 construction of a weak vector, and thus doesn't need to switch
10941 off interrupts during vector creation.
10942
10943 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10944 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10945 Use allocate_weak_vector to provide the new weak vector object.
10946
10947 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10948 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10949 now stored in the double cell.
10950
10951 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10952 Use SCM_WVECT_TYPE.
10953
10954 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10955 using an entry of the double cell.
10956
10957 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
10958
10959 * stamp-h.in: bye bye
10960
10961 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
10962
10963 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
10964 scm_eval_0str.
10965
10966 * load.c, load.h (scm_c_primitive_load,
10967 scm_c_primitive_load_path): New.
10968
10969 * strports.c, strports.h (scm_c_read_string): Renamed from
10970 scm_read_0str. Also, added "const" qualifier to argument.
10971 (scm_c_eval_string): Renamed from scm_eval_0str.
10972 (scm_read_0str, scm_eval_0str): Deprecated.
10973
10974 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10975
10976 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
10977 SCM_LIST1.
10978
10979 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
10980
10981 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
10982 scm_list_n): New functions.
10983 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
10984 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
10985 (lots of files): Use the new functions.
10986
10987 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
10988
10989 * strings.c: #include "libguile/deprecation.h".
10990
10991 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10992
10993 * read.c (scm_lreadr): When reading a hash token, check for a
10994 user-defined hash procedure first, so that overriding the builtin
10995 hash characters is possible (this was needed for implementing
10996 SRFI-4's read synax `f32(...)').
10997
10998 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
10999 because the latter is unsigned now and breaks comparisons like
11000 (n < (scm_t_signed_bits)MIN_VALUE).
11001
11002 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11003
11004 * eval.h, eval.c (scm_call_4): New function.
11005
11006 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11007 directly rather than dispatching to them via scm_ithrow and a lazy
11008 catch.
11009
11010 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11011 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11012 for trap handler procedures.
11013
11014 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11015 procedures not being #f.
11016
11017 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11018
11019 * Makefile.am (c-tokenize.c): add rule to generate it.
11020 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11021
11022 filter-doc-snarfage.c: remove.
11023
11024 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11025
11026 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11027
11028 The following set of changes makes compiling Guile under various
11029 Windows compilers easier. Compilation under GNU systems should
11030 not be affected at all.
11031
11032 Thanks to Stefan Jahn for all necessary information, patches and
11033 testing.
11034
11035 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11036 getpgrp, ttyname, primitive-fork and some header inclusion for
11037 Windows.
11038
11039 * random.c: Define M_PI, if not predefined and use __int64 for
11040 LONG64 under Windows.
11041
11042 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11043 Windows and conditionalize some signal names.
11044
11045 * socket.c (scm_getsockopt): Added missing comma.
11046 Include socket library header under Windows.
11047
11048 * stime.c (CLKTCK): Add cast to int, to make it compile under
11049 Windows.
11050
11051 * ports.c (truncate): New function, compiled only under Windows.
11052
11053 * net_db.c: Do not declare errno under Windows.
11054
11055 * iselect.h, inet_aton.c: Include socket library headers under
11056 Windows.
11057
11058 * guile.c (inner_main): Under Windows, initialize socket library
11059 and initialize gdb_interface data structures.
11060
11061 * gdb_interface.h: Under Windows, gdb_interface cannot be
11062 initialized statically. Initialize at runtime instead.
11063
11064 * fports.c (write_all): ssize_t -> size_t.
11065 (fport_print): Conditionalize call to ttyname().
11066 (getflags): New function, compiled only under Windows.
11067
11068 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11069 primitives chown, link, fcntl.
11070 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11071 as path seperator.
11072
11073 * backtrace.c: Include <io.h> under Windows.
11074
11075 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11076
11077 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11078 declaration.
11079
11080 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11081
11082 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11083 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11084 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11085 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11086 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11087 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11088 (scm_dynamic_wind, scm_dowinds), environments.c
11089 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11090 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11091 goops.c (GETVAR, purgatory, make_class_from_template,
11092 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11093 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11094 (scm_primitive_load), modules.c (scm_resolve_module,
11095 scm_c_define_module, scm_c_use_module, scm_c_export,
11096 module_variable, scm_eval_closure_lookup, scm_sym2var,
11097 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11098 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11099 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11100 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11101 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11102 (scm_object_to_string, scm_call_with_output_string,
11103 scm_call_with_input_string), throw.c (scm_body_thunk,
11104 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11105 scm_make_shared_array), vports.c (sf_flush, sf_write,
11106 sf_fill_input, sf_close): Use one of the above functions.
11107 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11108
11109 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11110
11111 * filesys.c (scm_close), ports.c (scm_close_port,
11112 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11113 instead of SCM_NEGATE_BOOL.
11114
11115 * filesys.c (scm_stat): Clean up type dispatch.
11116
11117 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11118 scm_output_port_p): Get rid of redundant IM type check.
11119
11120 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11121 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11122 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11123 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11124 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11125 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11126 scm_addr_vector), stime.c (scm_strftime), strings.c
11127 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11128 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11129 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11130 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11131 instead of scm_makfromstr.
11132
11133 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11134 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11135 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11136 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11137 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11138 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11139 !SCM_<pred> over SCM_N<pred>.
11140
11141 * strings.[ch] (scm_makfromstr): Deprecated.
11142
11143 (scm_mem2string): New function, replaces scm_makfromstr.
11144
11145 * strings.c (scm_substring), strop.c (string_copy,
11146 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11147 (scm_symbol_to_string): Fix gc problem.
11148
11149 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11150 SCM_<foo>_H.
11151
11152 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11153 warning about comparing signed and unsigned values. This fix is
11154 not optimal, since it won't work reliably if sizeof (c_start) >
11155 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11156 solution is to define this macro as an inline function, thus
11157 allowing to specifiy the types of c_start and c_end.
11158
11159 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11160
11161 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11162 scm_t_debug_frame*.
11163
11164 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11165 Rename <foo>H to SCM_<foo>_H.
11166
11167 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11168 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11169
11170 (narrow_stack): Make i unsigned. Don't use side-effecting
11171 operations in conditions.
11172
11173 (narrow_stack, scm_make_stack, scm_stack_id,
11174 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11175
11176 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11177 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11178 more.
11179
11180 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11181 signedness.
11182
11183 (scm_last_stack_frame): Remove bogus `;'.
11184
11185 * stacks.h (SCM_FRAMEP): Fix type check.
11186
11187 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11188
11189 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11190 c-tokenize.c when doing maintainer-clean.
11191
11192 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11193
11194 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11195 simplify.
11196
11197 * eval.c: all hash signs are in column 0.
11198
11199 * Makefile.am (guile_filter_doc_snarfage): build using
11200 c-tokenize.c, not filter-doc-snarfage.c.
11201 rearrange snarfing dependencies a bit.
11202
11203 * c-tokenize.lex: new file.
11204
11205 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11206
11207 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11208 scm_t_srcpropso_plist. See the big type renaming.
11209 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11210 Thanks to Seth Alves!
11211
11212 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11213 they aren't defined already.
11214
11215 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11216
11217 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11218 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11219 problem.
11220
11221 * backtrace.c (display_expression, scm_set_print_params_x,
11222 display_application, display_frame, scm_backtrace), numbers.c
11223 (scm_istring2number), objects.c (scm_class_of,
11224 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11225 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11226
11227 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11228 always positive.
11229
11230 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11231 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11232
11233 * objects.c (scm_class_of): Type fix.
11234
11235 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11236 eliminated goto.
11237
11238 * pairs.h (scm_error_pair_access): The function can return if
11239 called recursively.
11240
11241 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11242
11243 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11244
11245 * gdbint.c, init.c: Removed inclusion of tag.h.
11246
11247 * tag.h, tag.c: Removed files.
11248
11249 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11250
11251 2001-06-20 Gary Houston <ghouston@arglist.com>
11252
11253 * deprecation.c, extensions.c, rw.c: include string.h.
11254
11255 2001-06-19 Gary Houston <ghouston@arglist.com>
11256
11257 * filter-doc-snarfage.c (process): added ungetc in
11258 MULTILINE_COOKIE case since otherwise it fails when there's no
11259 space between the '(' and the quote of the following string
11260 (gcc 3.0).
11261
11262 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11263
11264 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11265
11266 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11267
11268 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
11269 extension takes place.
11270 * strings.h (SCM_STRING_LENGTH): Likewise.
11271 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
11272
11273 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11274 it.
11275
11276 * tags.h: Include <stdint.h> when we have it.
11277 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11278 available. Else use "unsigned long".
11279 (scm_signed_bits_t): New.
11280
11281 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11282 (SCM_INUM): Cast result to scm_signed_bits_t.
11283
11284 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11285
11286 * mkstemp.c: Update path to #include file scmconfig.h.
11287 Thanks to Golubev I. N.
11288
11289 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11290
11291 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11292
11293 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
11294 the macro definition.
11295
11296 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11297 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11298 instead of SCM_INST_TYPE.
11299
11300 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11301 the object is a struct before accessing its struct flags.
11302
11303 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11304
11305 2001-06-10 Gary Houston <ghouston@arglist.com>
11306
11307 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11308 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11309 work reliably anymore. try it from boot-9.scm instead.
11310
11311 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11312
11313 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
11314 Thanks to Matthias Köppe!
11315
11316 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11317
11318 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11319 space-happy C preprocessors.
11320
11321 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
11322 inside cookies. thanks to Matthias Köppe!
11323
11324 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11325
11326 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11327 keywords. Fix gc protection.
11328
11329 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11330 operations in macro calls.
11331
11332 * pairs.c (scm_error_pair_access): Avoid recursion.
11333
11334 Thanks to Matthias Koeppe for reporting the bugs that correspond
11335 to the following set of patches.
11336
11337 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11338 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11339 bitvector base address using SCM_BITVECTOR_BASE.
11340
11341 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11342 unsigned long*.
11343
11344 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11345
11346 * goops.c (SCM_CLASS_REDEF): Removed.
11347
11348 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11349 SCM_<foo>_H.
11350
11351 Thanks to Matthias Koeppe for reporting the bugs that correspond
11352 to the following set of patches.
11353
11354 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11355 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11356 scm_sys_allocate_instance, clear_method_cache,
11357 scm_sys_invalidate_method_cache_x, scm_make,
11358 create_standard_classes, scm_make_port_classes, scm_make_class,
11359 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11360
11361 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11362
11363 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11364
11365 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11366 UNARY_ELTS_CODE): Remove bogus break statement.
11367
11368 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11369 Don't access bit vectors elements as SCM objects.
11370
11371 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11372 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11373 Don't assign to an unpacked value.
11374
11375 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11376
11377 * __scm.h (SCM_NORETURN): Moved here from error.h.
11378
11379 (SCM_UNUSED): New macro.
11380
11381 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11382
11383 * backtrace.c (display_error_handler), continuations.c
11384 (continuation_print), debug.c (debugobj_print), dynwind.c
11385 (guards_print), environments.c (observer_print,
11386 core_environments_finalize, leaf_environment_cell,
11387 leaf_environment_print, eval_environment_print,
11388 eval_environment_observer, import_environment_define,
11389 import_environment_undefine, import_environment_print,
11390 import_environment_observer, export_environment_define,
11391 export_environment_undefine, export_environment_print,
11392 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11393 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11394 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11395 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11396 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11397 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11398 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11399 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11400 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11401 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11402 set_slot_value, test_slot_existence, scm_change_object_class,
11403 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11404 default_setter), guardians.c (guardian_print, guardian_gc_init,
11405 guardian_zombify, whine_about_self_centered_zombies), guile.c
11406 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11407 mallocs.c (malloc_print), numbers.c (scm_print_real,
11408 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11409 end_input_default, scm_port_print, fill_input_void_port,
11410 write_void_port), root.c (root_print), smob.c (scm_mark0,
11411 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11412 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11413 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11414 (scm_struct_free_0, scm_struct_free_standard,
11415 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11416 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11417 scm_handle_by_throw, scm_ithrow), weaks.c
11418 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11419 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11420 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11421
11422 * error.h (SCM_NORETURN): Moved to __scm.h.
11423
11424 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11425 Renamed <foo>H to SCM_<foo>_H.
11426
11427 * gc.c (debug_cells_gc_interval): New static variable.
11428
11429 (scm_assert_cell_valid): If selected by the user, perform
11430 additional garbage collections.
11431
11432 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11433 if additional garbage collections are desired.
11434
11435 (mark_gc_async): If additional garbage collections are selected
11436 by the user, don't call the after-gc-hook. Instead require the
11437 user to run the hook manually.
11438
11439 * pairs.c (scm_error_pair_access): New function. Only compiled
11440 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11441
11442 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11443
11444 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11445 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11446 is a real pair object. (Glocs are also accepted, but that may
11447 change.) If not, abort with an error message.
11448
11449 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11450
11451 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11452
11453 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11454 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11455
11456 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11457
11458 * extensions.c (scm_c_register_extension): Allow NULL as library
11459 name.
11460 (load_extension): Ignore NULL library names when comparing.
11461
11462 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11463 non-pointers are being compared. Thanks to Alexander Klimov!
11464
11465 2001-06-04 Gary Houston <ghouston@arglist.com>
11466
11467 * rw.c (scm_write_string_partial): new procedure implementing
11468 write-string/partial in (ice-9 rw).
11469 * rw.h: declare scm_write_string_partial.
11470
11471 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11472
11473 * keywords.c (keyword_print): Substract 1 from length of symbol
11474 name, accounting for the silly dash.
11475
11476 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11477 Do not emit deprecation warning.
11478
11479 Added exception notice to all files.
11480
11481 * dynl.c: Include "deprecation.h".
11482
11483 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11484
11485 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11486 scm_clear_registered_modules): Deprecated.
11487
11488 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
11489
11490 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11491 guile-snarf-docs-texi.
11492
11493 * fports.c: HAVE_ST_BLKSIZE changed to
11494 HAVE_STRUCT_STAT_ST_BLKSIZE.
11495 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11496 HAVE_STRUCT_STAT_ST_BLKSIZE.
11497
11498 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11499 HAVE_STRUCT_STAT_ST_RDEV.
11500 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11501 HAVE_STRUCT_STAT_ST_BLKSIZE.
11502 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11503 HAVE_STRUCT_STAT_ST_BLOCKS.
11504
11505 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11506
11507 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11508 of scm_eval_x to allow module changes between the forms in the
11509 string. Set/restore module using scm_c_call_with_current_module.
11510
11511 * mkstemp.c: New file, slightly modified from libiberties
11512 mkstemps.c.
11513
11514 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11515
11516 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11517 filter-doc-snarfage.c: new files.
11518
11519 * Makefile.am: add stuff to [build,] use and distribute
11520 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11521
11522 * guile-snarf.in: grok the new snarf output.
11523
11524 * snarf.h: make the output both texttools- and `read'-friendly.
11525
11526 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11527 guile-snarf-docs. (should also deprecate, I guess. maybe not).
11528
11529 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11530
11531 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11532 error for unsupported format controls and for superflous
11533 arguments. Thanks to Daniel Skarda!
11534
11535 * print.h, print.c (scm_print_symbol_name): Factored out of
11536 scm_iprin1.
11537 (scm_iprin1): Call it.
11538
11539 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11540 weird names are printed correctly.
11541
11542 * print.c (scm_print_symbol_name): Symbols whose name starts with
11543 `#' or `:' or ends with `:' are considered weird.
11544
11545 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11546
11547 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11548 and /.
11549
11550 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11551
11552 * debug.h: Removed prototype for scm_eval_string.
11553
11554 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11555
11556 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
11557 (make-string 2000 #\!))' in an older version).
11558
11559 Change strncpy to memcpy to allow embedded NUL characters in
11560 symbol prefix.
11561
11562 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11563
11564 * hooks.c (scm_create_hook): deprecated.
11565 (make_hook): deleted.
11566 (scm_make_hook): all the hook creation code is now here.
11567
11568 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11569 a hook, make it permanent, and do a `scm_c_define' on it.
11570
11571 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11572
11573 * socket.c (s_scm_inet_pton): fix docstring quoting.
11574 (s_scm_inet_ntop): ditto.
11575
11576 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11577
11578 * hashtab.c (scm_internal_hash_fold): fix argument position in
11579 SCM_ASSERT.
11580
11581 * environments.c (s_scm_import_environment_set_imports_x): fix
11582 argument position in SCM_ASSERT.
11583
11584 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11585 (s_scm_make_iloc): ditto.
11586
11587 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11588
11589 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11590
11591 * eval.c (promise_print): Read the promise's value as an object.
11592
11593 (SCM_CEVAL): Don't perform side-effecting operations in macro
11594 parameters.
11595
11596 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11597 conditional expression.
11598
11599 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11600 initializer.
11601
11602 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11603 text, removed redundant computation of effective_length and fixed
11604 the overflow check.
11605
11606 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11607 values.
11608
11609 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11610
11611 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11612
11613 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11614 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11615
11616 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11617
11618 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11619 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11620 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11621 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11622
11623 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11624
11625 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11626
11627 * ramap.c (ramap_rp): Removed bogus `;'.
11628
11629 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11630 problem.
11631
11632 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11633 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11634 Read SCM objects rather than scm_bits_t values.
11635
11636 * tags.h (SCM_VOIDP_TEST): Removed.
11637
11638 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11639 value of 2 now corresponds to the former 1, the current 1
11640 corresponds to the former situation that SCM_VOIDP_TEST was
11641 defined.
11642
11643 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11644 If this appears to be not ANSI compliant, we will change it to
11645 typedef struct scm_unused_struct { } * SCM;
11646 Thanks to Han-Wen Nienhuys for the suggestion.
11647
11648 * unif.c (scm_array_set_x): Fix typing problem, and use
11649 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11650 dealing with uniform vectors.
11651
11652 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11653
11654 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11655 (scm_igc): mark from them, too (precisely, not conservatively!).
11656
11657 * root.h (scm_gc_registered_roots): new object in
11658 scm_sys_protects.
11659
11660 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11661 `scm_protect_object'. shouldn't call it at all, though, it seems.
11662
11663 * gc.c (scm_[un]protect_object): deprecated.
11664 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11665 (scm_gc_[un]register_root[s]): new.
11666
11667 * gc.h: add prototypes for scm_gc_[un]protect_object,
11668 scm_gc_[un]register_root[s].
11669
11670 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11671
11672 revert the controversial part of the 2001-05-24 changes.
11673
11674 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11675
11676 * modules.c (scm_env_module): Exported to Scheme.
11677
11678 * eval.c (scm_debug_opts): New option `show-file-name'.
11679
11680 * debug.h (SCM_SHOW_FILE_NAME): New.
11681
11682 * backtrace.c: Include "libguile/filesys.h".
11683 (sym_base, display_backtrace_get_file_line,
11684 display_backtrace_file, display_backtrace_file_and_line): New.
11685 (display_frame): Call display_backtrace_file_and_line if that is
11686 requested.
11687 (display_backtrace_body): Call scm_display_backtrace_file if
11688 requested.
11689
11690 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11691 Prototypes removed since there's no definition for these
11692 functions.
11693
11694 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11695
11696 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11697 Changed use of scm_array->scm_array_t and
11698 scm_array_dim->scm_array_dim_t to enable build with
11699 --disable-deprecated.
11700
11701 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11702
11703 The purpose of this set of changes is to regularize Guile's usage
11704 of ANSI C integral types, with the following ideas in mind:
11705
11706 - SCM does not nesessarily have to be long.
11707 - long is not nesessarily enough to store pointers.
11708 - long is not nesessarily the same size as int.
11709
11710 The changes are incomplete and possibly buggy. Please test on
11711 something exotic.
11712
11713 * validate.h
11714 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11715 new macros.
11716
11717 * unif.h: type renaming:
11718 scm_array -> scm_array_t
11719 scm_array_dim -> scm_array_dim_t
11720 the old names are deprecated, all in-Guile uses changed.
11721
11722 * tags.h (scm_ubits_t): new typedef, representing unsigned
11723 scm_bits_t.
11724
11725 * stacks.h: type renaming:
11726 scm_info_frame -> scm_info_frame_t
11727 scm_stack -> scm_stack_t
11728 the old names are deprecated, all in-Guile uses changed.
11729
11730 * srcprop.h: type renaming:
11731 scm_srcprops -> scm_srcprops_t
11732 scm_srcprops_chunk -> scm_srcprops_chunk_t
11733 the old names are deprecated, all in-Guile uses changed.
11734
11735 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11736 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11737 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11738 vectors.c, vports.c, weaks.c:
11739 various int/size_t -> size_t/scm_bits_t changes.
11740
11741 * random.h: type renaming:
11742 scm_rstate -> scm_rstate_t
11743 scm_rng -> scm_rng_t
11744 scm_i_rstate -> scm_i_rstate_t
11745 the old names are deprecated, all in-Guile uses changed.
11746
11747 * procs.h: type renaming:
11748 scm_subr_entry -> scm_subr_entry_t
11749 the old name is deprecated, all in-Guile uses changed.
11750
11751 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11752 type renaming:
11753 scm_option -> scm_option_t
11754 the old name is deprecated, all in-Guile uses changed.
11755
11756 * objects.c: various long -> scm_bits_t changes.
11757 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11758
11759 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11760 SCM_I_FIXNUM_BIT.
11761
11762 * num2integral.i.c: new file, multiply included by numbers.c, used
11763 to "templatize" the various integral <-> num conversion routines.
11764
11765 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11766 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11767 deprecated.
11768 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11769 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11770 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11771 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11772 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11773 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11774 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11775 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11776 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11777 scm_num2size): new functions.
11778
11779 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
11780
11781 * load.c: change int -> size_t in various places (where the
11782 variable is used to store a string length).
11783 (search-path): call scm_done_free, not scm_done_malloc.
11784
11785 * list.c (scm_ilength): return a scm_bits_t, not long.
11786 some other {int,long} -> scm_bits_t changes.
11787
11788 * hashtab.c: various [u]int -> scm_bits_t changes.
11789 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11790 (scm_ihashx): n: uint -> scm_bits_t
11791 use scm_bits2num instead of scm_ulong2num.
11792
11793 * gsubr.c: various int -> scm_bits_t changes.
11794
11795 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11796
11797 * gh_data.c (gh_num2int): no loss of precision any more.
11798
11799 * gh.h (gh_str2scm): len: int -> size_t
11800 (gh_{get,set}_substr): start: int -> scm_bits_t,
11801 len: int -> size_t
11802 (gh_<num>2scm): n: int -> scm_bits_t
11803 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11804 (gh_length): return scm_bits_t, not unsigned long.
11805
11806 * gc.[hc]: various small changes relating to many things stopping
11807 being long and starting being scm_[u]bits_t instead.
11808 scm_mallocated should no longer wrap around.
11809
11810 * fports.h: type renaming:
11811 scm_fport -> scm_fport_t
11812 the old name is deprecated, all in-Guile uses changed.
11813
11814 * fports.c (fport_fill_input): count: int -> scm_bits_t
11815 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11816
11817 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11818 those prototypes, as the functions they prototype don't exist.
11819
11820 * fports.c (default_buffer_size): int -> size_t
11821 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11822 default_size: int -> size_t
11823 (scm_setvbuf): csize: int -> scm_bits_t
11824
11825 * fluids.c (n_fluids): int -> scm_bits_t
11826 (grow_fluids): old_length, i: int -> scm_bits_t
11827 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11828 scm_bits_t
11829 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11830
11831 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11832 the new and shiny SCM_NUM2INT.
11833
11834 * extensions.c: extension -> extension_t (and made a typedef).
11835
11836 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11837 there are no nasty surprises if/when the various deeply magic tag
11838 bits move somewhere else.
11839
11840 * eval.c: changed the locals used to store results of SCM_IFRAME,
11841 scm_ilength and such to be of type scm_bits_t (and not int/long).
11842 (iqq): depth, edepth: int -> scm_bits_t
11843 (scm_eval_stack): int -> scm_bits_t
11844 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11845 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11846 i: int -> scm_bits_t
11847
11848 * environments.c: changed the many calls to scm_ulong2num to
11849 scm_ubits2num.
11850 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11851
11852 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11853
11854 * debug.h: type renaming:
11855 scm_debug_info -> scm_debug_info_t
11856 scm_debug_frame -> scm_debug_frame_t
11857 the old names are deprecated, all in-Guile uses changed.
11858 (scm_debug_eframe_size): int -> scm_bits_t
11859
11860 * debug.c (scm_init_debug): use scm_c_define instead of the
11861 deprecated scm_define.
11862
11863 * continuations.h: type renaming:
11864 scm_contregs -> scm_contregs_t
11865 the old name is deprecated, all in-Guile uses changed.
11866 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11867 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11868
11869 * continuations.c (scm_make_continuation): change the type of
11870 stack_size from long to scm_bits_t.
11871
11872 * ports.h: type renaming:
11873 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11874 scm_port -> scm_port_t
11875 scm_ptob_descriptor -> scm_ptob_descriptor_t
11876 the old names are deprecated, all in-Guile uses changed.
11877 (scm_port_t.entry): int -> scm_bits_t.
11878 (scm_port_t.line_number): int -> long.
11879 (scm_port_t.putback_buf_size): int -> size_t.
11880
11881 * __scm.h (long_long, ulong_long): deprecated (they pollute the
11882 global namespace and have little value beside that).
11883 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11884 SCM handle).
11885 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
11886 exist (for size_t & ptrdiff_t).
11887 (scm_sizet): deprecated.
11888
11889 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11890
11891 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11892
11893 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11894 SCM_VARIABLE_INIT since that it what it used to be.
11895
11896 * deprecation.c (scm_include_deprecated_features): Make docstring
11897 ANSIsh. Thanks to Matthias Köppe!
11898
11899 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11900
11901 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11902 needed for weak-key hashtables.
11903
11904 * procs.c (scm_make_subr_with_generic): Add missing last argument
11905 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11906
11907 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11908 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
11909
11910 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11911
11912 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11913
11914 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11915 `duplicate_string'. Do not use an indirect cell, store symbol
11916 directly in collision list of hash table.
11917 (duplicate_string): Removed.
11918
11919 * init.c (scm_init_guile_1): Call scm_init_extensions.
11920
11921 * Makefile.am: Add "extensions.c" and related files in all the
11922 right places.
11923
11924 * extensions.h, extension.c: New files.
11925
11926 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11927
11928 * modules.h (scm_system_module_env_p): Move out of deprecated
11929 section.
11930
11931 * rw.h (scm_init_rw): Added prototype.
11932
11933 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11934 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11935 New functions. They replace scm_make_gsubr and
11936 scm_make_gsubr_with_generic. The `make' variants only create the
11937 gsubr object, while the `define' variants also put it into the
11938 current module. Changed all callers.
11939 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11940
11941 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11942 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11943 functions. They replace scm_make_subr, scm_make_subr_opt and
11944 scm_make_subr_with_generic. The `make' variants only create the
11945 subr object, while the `define' variants also put it into the
11946 current module. Changed all callers.
11947 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11948 Deprecated.
11949
11950 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11951 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11952 the comments above.
11953
11954 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11955
11956 * throw.c (scm_lazy_catch): Slight docstring clarification.
11957
11958 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
11959
11960 * throw.c: Lazy-catch handlers are no longer allowed to return.
11961 Fixed comments throughout.
11962 (scm_ithrow): Signal an error when a lazy-catch handler returns.
11963 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
11964 recognized as such.
11965
11966 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
11967 refered to s_scm_minor_version previously.
11968
11969 * modules.h, modules.c: Moved around a lot of code so that
11970 deprecated features appear at the bottom.
11971 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
11972 module_prefix, make_modules_in_var, beautify_user_module_x_var,
11973 scm_the_root_module, scm_make_module, scm_ensure_user_module,
11974 scm_load_scheme_module): Deprecated.
11975 (scm_system_module_env_p): Return SCM_BOOL_T directly for
11976 environments corresponding to the root module.
11977 (convert_module_name, scm_c_resolve_module,
11978 scm_c_call_with_current_module, scm_c_define_module,
11979 scm_c_use_module, scm_c_export): New.
11980 (the_root_module): New static variant of scm_the_root_module. Use
11981 it everywhere instead of scm_the_root_module.
11982
11983 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
11984 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
11985 (scm_c_with_fluid): New.
11986 (scm_with_fluids): Use scm_c_with_fluids instead of
11987 scm_internal_with_fluids.
11988
11989 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
11990 `scm_init_goops'. Do not explicitly create/switch modules.
11991 Return SCM_UNSPECIFIED.
11992 (scm_init_goops): Only register `%init-goops-builtins' procedure.
11993 (scm_load_goops): Use scm_c_resolve_module instead of
11994 scm_resolve_module.
11995
11996 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
11997 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
11998 `scm_init_rw' prior to loading the startup files.
11999
12000 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12001 scm_init_rdelim. Do not explicitly create/switch modules.
12002 Return SCM_UNSPECIFIED.
12003 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12004 procedure.
12005
12006 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12007 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12008 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12009
12010 * script.c (scm_shell): Evaluate the compiled switches in the
12011 current module, not in the root module.
12012
12013 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12014
12015 * fluids.c (scm_c_with_fluids): Rename from
12016 scm_internal_with_fluids.
12017 (scm_internal_with_fluids): Deprecated.
12018 (scm_c_with_fluid): New.
12019
12020 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12021
12022 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12023
12024 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12025 accessed with SCM_C[AD]R.
12026
12027 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12028
12029 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
12030
12031 * version.c (s_scm_major_version): doc fixes.
12032 (s_scm_minor_version): doc fixes.
12033 (s_scm_minor_version): new function.
12034
12035 * version.h (scm_init_version): new function.
12036
12037 * versiondat.h.in: add GUILE_MICRO_VERSION.
12038
12039 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12040
12041 * deprecation.c (scm_init_deprecation): Renamed
12042 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12043
12044 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12045
12046 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12047 dependent on cpp_cnvt.awk
12048
12049 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12050
12051 * script.c (scm_compile_shell_switches): New command line option
12052 `--use-srfi' for loading a list of SRFIs on startup.
12053 (scm_shell_usage): Added `--use-srfi' to help message.
12054
12055 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12056
12057 Merged from mvo-vcell-cleanup-1-branch.
12058
12059 The concept of vcells has been removed from Guile. With it,
12060 explicit obarrays and associated operations are gone. Use
12061 hashtables instead of obarrays.
12062
12063 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12064 result as variable instead of vcell. Glocs no longer point to a
12065 vcell but to a variable. Use scm_c_define instead of
12066 scm_sysintern and treat the result as a variable (which it is),
12067 not a vcell.
12068
12069 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12070 SCM_DEFVARIABLEP): Deprecated.
12071 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12072 (variable_print): Do not print name of variable.
12073 (variable_equalp): Compare values, not vcells.
12074 (anonymous_variable_sym): Removed.
12075 (make_vcell_variable): Removed.
12076 (make_variable): New, as replacement.
12077 (scm_make_variable, scm_make_undefined_variable): Do not take name
12078 hint parameter.
12079 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12080 error in that case.
12081 (scm_builtin_variable): Deprecated.
12082
12083 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12084 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12085 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12086 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12087 scm_string_to_obarray_symbol, scm_intern_symbol,
12088 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12089 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12090 Deprecated and moved to "symbols-deprecated.c".
12091 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12092 (scm_init_symbols): Call scm_init_symbols_deprecated.
12093 * symbols-deprecated.c: New file.
12094 * Makefile.am: Added symbols-deprecated.c and related files in all
12095 the right places.
12096
12097 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12098 SCM_GLOBAL_VCELL_INIT): Deprecated.
12099 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12100 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
12101
12102 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12103 SCM_GLOC_SYM.
12104
12105 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12106 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12107 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12108 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12109 Changed according to the `throughout' comments.
12110
12111 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12112 to `int'.
12113 (scm_module_type): Removed.
12114 (the_root_module): Renamed to the_root_module_var. Now points to
12115 a variable instead of a vcell. Updated all uses.
12116 (scm_the_root_module): Return SCM_BOOL_F when module systems
12117 hasn't been booted yet.
12118 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12119 (scm_post_boot_init_modules): Made static.
12120 (scm_set_current_module): Call scm_post_boot_init_modules on first
12121 call.
12122 (make_modules_in, beautify_user_module_x, resolve_module,
12123 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12124 suffix. Now point to variables instead of vcells. Updated all
12125 uses.
12126 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12127 and return SCM_BOOL_F in that case.
12128 (scm_module_transformer): Likewise.
12129 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12130 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12131 (scm_eval_closure_lookup): Do not allow new definitions when
12132 `interface' flag is set.
12133 (scm_standard_interface_eval_closure): New.
12134 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12135 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12136 scm_c_lookup, scm_c_module_define, scm_c_define,
12137 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12138 scm_modules_prehistory): New.
12139 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12140 instead of scm_intern0.
12141
12142 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12143 symbol.
12144
12145 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12146 hashtable operations to maintain the keywords, not obarray ones.
12147
12148 * init.c (scm_load_startup_files): Do not call
12149 scm_post_boot_init_modules. This is done by
12150 scm_set_current_module now.
12151 (scm_init_guile_1): Call scm_modules_prehistory. Call
12152 scm_init_variable early on.
12153
12154 * goops.c (s_scm_sys_goops_loaded): Get
12155 var_compute_applicable_methods from scm_sym2var, not from a direct
12156 invocation of scm_goops_lookup_closure.
12157
12158 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12159
12160 * gc.c: Added simple debugging hack to mark phase of GC: When
12161 activated, do not tail-call scm_gc_mark. This gives nice
12162 backtraces.
12163 (scm_unhash_name): Removed.
12164
12165 * feature.c (features): Renamed to features_var. Now points to a
12166 variable instead of a vcell. Updated all uses.
12167
12168 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12169 `scm_current_module_lookup_closure' which will do the right thing
12170 when the module system hasn't been booted yet.
12171 (SCM_GLOC_SYM): Removed.
12172 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12173 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
12174
12175 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12176 instead of with vcells. Do not overwrite `var' with the result of
12177 the lookup, use the new `real_var' instead. Remove `var2' in
12178 exchange (which was only used with threads).
12179 (sym_three_question_marks): New.
12180 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12181 `SCM_GLOC_SYM'.
12182 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12183 (scm_m_atfop): Expect the function definition to be a variable
12184 instead of a vcell.
12185 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12186 symbol instead.
12187 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12188 (scm_eval_args): Use more explicit code in the gloc branch of the
12189 atrocious struct ambiguity test. The optimizer will sort this
12190 out.
12191 (scm_deval_args): Likewise.
12192 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12193 remember the symbol instead. Added some comments where
12194 scm_tc3_cons_gloc really exclusively refers to structs.
12195 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12196 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12197 of scm_sysintern in general.
12198
12199 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12200 explicit magic.
12201
12202 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12203 pairs. Put the variable directly in the gloc.
12204 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12205 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12206
12207 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12208
12209 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12210 scm_the_last_stack_fluid_var. It now points to a variable instead
12211 of a vcell. Updated all uses.
12212 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12213 instead of a vcell. Updated all uses.
12214
12215 * _scm.h: Include "variables.h" and "modules.h" since almost
12216 everybody needs them now.
12217
12218 * root.h (scm_symhash, scm_symhash_vars): Removed.
12219 * gc.c (scm_init_storage): Do not initialize them.
12220
12221 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12222
12223 * eval.c (scm_init_eval): Initialize scm_undefineds and
12224 scm_listofnull.
12225
12226 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12227 like the SCM_NEWCELL macro counterparts.
12228
12229 (scm_init_storage, scm_init_gc): Moved initialization of
12230 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12231
12232 (scm_init_storage): Moved initialization of scm_undefineds and
12233 scm_listofnull to eval.c, initializion of scm_nullstr to
12234 strings.c, initializion of scm_nullvect to vectors.c.
12235
12236 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12237 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12238
12239 * init.c (scm_init_guile_1): Reordered some initializations and
12240 added dependcy information comments.
12241
12242 * load.c (scm_init_load): Use scm_nullstr.
12243
12244 * strings.c (scm_init_strings): Initialize scm_nullstr.
12245
12246 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12247
12248 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12249
12250 * values.c (print_values): Print as a unreadable object, not as
12251 multiple lines. Thanks to Matthias Köppe!
12252
12253 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12254
12255 * deprecation.c: Fixed copyright date.
12256
12257 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12258 DEPRECATION_H to SCM_DEPRECATION_H.
12259
12260 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12261
12262 * guile-doc-snarf.in: Update copyright.
12263 Fix relative path bug. Thanks to Sergey Poznyakoff.
12264
12265 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12266
12267 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12268 accept open ports. Thanks to Quetzalcoatl Bradley!
12269
12270 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12271
12272 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12273 has 779 primitives on startup.
12274
12275 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12276
12277 * eval.c (scm_i_eval): Copy expression before passing it to
12278 SCM_XEVAL. The copy operation was removed unintendedly during my
12279 change on 2001-03-25.
12280
12281 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12282
12283 from Matthias Köppe (thanks!):
12284
12285 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12286 portable.
12287
12288 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12289 docstring.
12290
12291 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12292
12293 * gc.c (scm_init_gc): Added FIXME comment.
12294
12295 * hooks.c: Since hooks don't have a name any more, it is not
12296 necessary to include objprop.h.
12297
12298 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12299
12300 (symbol_name, scm_make_hook_with_name): Removed.
12301
12302 (scm_create_hook): Don't set the hook's name property.
12303
12304 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12305
12306 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12307
12308 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12309
12310 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12311 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12312 FLOBUFLEN and define it unconditionally.
12313
12314 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12315
12316 * gh_data.c (gh_lookup): Call gh_module_lookup with
12317 `scm_current_module ()', not `#f'.
12318 (gh_module_lookup): Expect a module instead of an obarray as first
12319 argument and do lookup in that module.
12320
12321 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12322 arrays. The length of array is already determined differently and
12323 scm_uniform_vector_length does not work on arrays.
12324
12325 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12326
12327 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12328 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12329
12330 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12331 they are not used. Changed `wrong type' error into `wrong num
12332 args' error. Changed all callers.
12333
12334 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12335 arguments are supplied.
12336
12337 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12338
12339 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12340 describe `regexp/notbol' and `regexp/noteol' execution flags.
12341
12342 * strop.c (scm_substring_move_x): Doc fix; nfc.
12343
12344 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12345
12346 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12347 (scm_set_object_procedure_x): Use it to check argument. Fix
12348 docstring.
12349
12350 * evalext.c (scm_definedp): Fix docstring.
12351
12352 2001-05-05 Gary Houston <ghouston@arglist.com>
12353
12354 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12355 support.
12356
12357 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12358
12359 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12360 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12361 Change R4RS references to R5RS.
12362
12363 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12364 docstring source are correctly reproduced in the output (ii)
12365 we don't anymore get occasional trailing quotes. Also reorganized
12366 and commented the code a little.
12367
12368 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12369 fixes.
12370
12371 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12372
12373 * strop.c (scm_string_split): New procedure.
12374
12375 * strop.h (scm_string_split): Added prototype.
12376
12377 2001-05-04 Gary Houston <ghouston@arglist.com>
12378
12379 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12380 Dale P. Smith.
12381
12382 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12383
12384 * rw.c: Include "modules.h" and "strports.h".
12385
12386 * net_db.h (scm_gethost): Added prototype.
12387
12388 * deprecation.h, deprecation.c: New.
12389 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12390 (DOT_X_FILES): Added "deprecation.x".
12391 (modinclude_HEADERS): Added "deprecation.h".
12392
12393 * init.c: Include "deprecation.h".
12394 (scm_init_guile_1): Call scm_init_deprecation.
12395
12396 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12397
12398 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12399 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12400 New.
12401
12402 2001-04-29 Gary Houston <ghouston@arglist.com>
12403
12404 * rw.c: new file, implementing C part of module (ice-9 rw).
12405 (scm_read_string_x_partial): moved from ioext.c
12406 (scm_init_rw): new proc.
12407 * rw.h: new file.
12408 init.c: include rw.h and call scm_init_rw.
12409 Makefile.am: include rw.c and rw.h.
12410
12411 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
12412
12413 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12414 know what's supposed to happen to it.
12415
12416 * list.h (scm_list_star): deprecation expired - removed.
12417
12418 * numbers.h (scm_dblproc): deprecation expired - removed.
12419 (SCM_UNEGFIXABLE): deprecation expired - removed.
12420 (SCM_FLOBUFLEN): deprecation expired - removed.
12421 (SCM_INEXP): deprecation expired - removed.
12422 (SCM_CPLXP): deprecation expired - removed.
12423 (SCM_REAL): deprecation expired - removed.
12424 (SCM_IMAG): deprecation expired - removed.
12425 (SCM_REALPART): deprecation expired - removed.
12426 (scm_makdbl): deprecation expired - removed.
12427 (SCM_SINGP): deprecation expired - removed.
12428 (SCM_NUM2DBL): deprecation expired - removed.
12429 (SCM_NO_BIGDIG): deprecation expired - removed.
12430
12431 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12432 (scm_tc_dblr): deprecation expired - removed.
12433 (scm_tc_dblc): deprecation expired - removed.
12434 (scm_tc16_flo): deprecation expired - removed.
12435 (scm_tc_flo): deprecation expired - removed.
12436
12437 * tag.h (scm_tag): deprecation expired - removed.
12438
12439 * tag.c: (scm_tag): deprecation expired - removed.
12440
12441 * ioext.c: (scm_fseek): deprecation expired - removed.
12442
12443 * ioext.h (scm_fseek): deprecation expired - removed.
12444
12445 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12446
12447 * gh.h (gh_int2scmb): deprecation expired - removed.
12448
12449 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12450
12451 * stacks.c (scm_make_stack): Fix typo in docstring.
12452
12453 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
12454
12455 * error.c (scm_sysmissing): deprecation expired - removed.
12456
12457 * error.h (scm_sysmissing): deprecation expired - removed.
12458
12459 * gc.c
12460 (scm_init_gc): gc-thunk deprecation expired - removed.
12461 (scm_gc_vcell): deprecation expired - removed.
12462 (gc_async_thunk): scm_gc_vcell related code removed.
12463
12464 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12465
12466 * strings.h
12467 (SCM_NSTRINGP): deprecation expired - removed.
12468 (SCM_NRWSTRINGP): deprecation expired - removed.
12469
12470 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12471
12472 * chars.h
12473 (SCM_ICHRP): deprecation expired - removed.
12474 (SCM_ICHR): deprecation expired - removed.
12475 (SCM_MAKICHR): deprecation expired - removed.
12476
12477 * ports.h
12478 (SCM_INPORTP): deprecation expired - removed.
12479 (SCM_OUTPORTP): deprecation expired - removed.
12480
12481 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12482
12483 * modules.c (scm_module_type): New.
12484 (scm_post_boot_init_modules): Initialize from Scheme value.
12485 (the_module, scm_current_module, scm_init_modules): the_module is
12486 now a C only fluid.
12487 (scm_current_module): Export to Scheme.
12488 (scm_set_current_module): Do not call out to Scheme, do all the
12489 work in C. Export procedure to Scheme. Only accept modules, `#f'
12490 is no longer valid as the current module. Only set
12491 scm_top_level_lookup_closure_var and scm_system_transformer when
12492 they are not deprecated.
12493 (scm_module_transformer, scm_current_module_transformer): New.
12494
12495 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12496 scm_current_module_transformer, scm_module_transformer): New.
12497
12498 * gh_data.c: Removed FIXME comment about gh_lookup returning
12499 SCM_UNDEFINED. That's the right thing to do.
12500
12501 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12502 into the conditionally compiled sections.
12503 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12504 scm_current_module_transformer instead of scm_system_transformer.
12505 * init.c (start_stack): Move initialization of
12506 scm_system_transformer to the deprecated section.
12507
12508 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12509
12510 * throw.c (scm_throw): Correct docstring.
12511
12512 2001-04-22 Gary Houston <ghouston@arglist.com>
12513
12514 * socket.c: attempted to improve the docstrings slightly.
12515
12516 * net_db.c: remove bogus "close" declaration.
12517 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12518 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12519 moved to socket.c.
12520 * net_db.h: declarations moved too.
12521
12522 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12523 long.
12524 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12525 (VALIDATE_INET6): new macro.
12526 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12527 inet-pton and inet-ntop.
12528 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12529 (scm_addr_vector): use ipv6_net_to_num.
12530
12531 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12532
12533 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12534 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12535
12536 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12537 when compiled in debug mode.
12538
12539 (scm_gc_sweep): Only call smob's free function if it is defined.
12540
12541 * print.c (scm_iprin1): No need to check for validity of smob
12542 type or existence of print function.
12543
12544 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12545 Resizing will not work well with preemptive threading.
12546
12547 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12548
12549 (scm_make_smob_type): Extracted initialization of smob
12550 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12551 of the critical section.
12552
12553 (scm_smob_prehistory): Initialize all smob descriptors. By
12554 default, don't assign a smob free function: Most smob types don't
12555 need one.
12556
12557 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12558
12559 2001-04-21 Gary Houston <ghouston@arglist.com>
12560
12561 * socket.c (FLIP_NET_HOST_128): new macro.
12562 (scm_fill_sockaddr): use new macro.
12563 (scm_addr_vector): completed IPv6 address support. added const
12564 to the address parameter.
12565
12566 2001-04-20 Gary Houston <ghouston@arglist.com>
12567
12568 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12569 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12570 is defined.
12571 (scm_addr_vector): use a switch instead of multiple if statements.
12572 Add support for IPv6 (incomplete) .
12573 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
12574
12575 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12576
12577 * struct.c (scm_free_structs): Only pairs may be accessed with
12578 SCM_C[AD]R.
12579
12580 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12581
12582 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12583
12584 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12585 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12586 parentheses in order to get the correct associativity.
12587
12588 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12589
12590 * unif.c (scm_array_to_list): Added missing handling of arrays of
12591 bytes. Thanks to Masao Uebayashi for the bug report.
12592
12593 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12594
12595 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12596 consistently.
12597
12598 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12599
12600 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12601
12602 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12603 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
12604 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
12605 SCM_CLOSURE_FORMALS.
12606
12607 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12608 (scm_i_procedure_arity): Prefer stronger predicates like
12609 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12610
12611 * macros.c (macro_print): Extracted macro printing code from
12612 print.c and simplified it.
12613
12614 (scm_macro_type): Use SCM_MACRO_TYPE;
12615
12616 (scm_init_macros): Use macro_print for printing macros.
12617
12618 * print.c (scm_print_opts): Improved option documentation.
12619
12620 (scm_iprin1): Extracted printing of macros to macros.c.
12621 Simplified printing of ordinary closures.
12622
12623 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12624 Martin Grabmueller for the bug report.
12625
12626 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12627
12628 This patch eliminates some further applications of SCM_C[AD]R to
12629 non pair cells.
12630
12631 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12632 never been applied to real pairs.
12633
12634 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12635
12636 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12637
12638 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12639 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12640 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12641
12642 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12643 Added.
12644
12645 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12646 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12647
12648 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12649 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12650 SCM_SET{AND,OR}_CAR.
12651
12652 2001-04-17 Gary Houston <ghouston@arglist.com>
12653
12654 * some initial support for IPv6:
12655
12656 * socket.c (scm_fill_sockaddr): improve the argument validation.
12657 don't allocate memory until all args are checked. instead of
12658 unconditional memset of soka, try setting sin_len to 0 if
12659 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12660 (scm_socket, scm_connect): extend docstrings for IPv6.
12661 (scm_init_socket): intern AF_INET6 and PF_INET6.
12662
12663 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
12664
12665 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12666 matches SCM_DEFER_INTS at the beginning of the function.
12667
12668 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12669
12670 * gc.c (scm_igc): Unconditionally call
12671 SCM_CRITICAL_SECTION_START/END.
12672
12673 * fluids.c (next_fluid_num): Unconditionally call
12674 SCM_CRITICAL_SECTION_START/END.
12675 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12676
12677 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12678 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12679 Removed.
12680
12681 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12682 Defined as nothing for the case of !defined(USE_THREADS).
12683 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12684 Removed.
12685 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12686 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12687 LINE.
12688 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12689 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12690 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12691 SCM_CRITICAL_SECTION_START/END.
12692 (SCM_REALLOW_INTS: Bug fix. Don't call
12693 SCM_THREAD_SWITCHING_CODE.
12694 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12695 SCM_THREAD_SWITCHING_CODE directly.
12696 (SCM_ENTER_A_SECTION): Unconditionally use
12697 SCM_CRITICAL_SECTION_START/END. (was:
12698 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12699
12700 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12701
12702 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12703 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12704 allowed to explicitly set this macro via the CFLAGS variable
12705 during make.
12706
12707 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12708 (SCM_THREAD_CRITICAL_SECTION_START,
12709 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12710 SCM_THREAD_CRITICAL_SECTION_START/END to
12711 SCM_CRITICAL_SECTION_START/END.
12712
12713 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12714
12715 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12716 instead of bzero.
12717
12718 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
12719 (MISSING_BZERO_DECL): Remove the declaration.
12720
12721 Thanks to NIIBE Yutaka.
12722
12723 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12724
12725 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12726 goops module should be registered in order to work for an
12727 application which uses libguile statically linked.)
12728
12729 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12730
12731 * numbers.[ch] (scm_num2long, scm_num2long_long,
12732 scm_num2ulong_long, scm_num2ulong): Argument position is an
12733 unsigned integer.
12734
12735 * environments.c (eval_environment_folder,
12736 import_environment_folder), gh_data.c (gh_scm2longs,
12737 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12738 for integers and pointers, respectively.
12739
12740 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12741 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12742 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12743 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12744
12745 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12746 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12747 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12748 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12749 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12750 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12751
12752 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12753
12754 * strings.c (scm_read_only_string_p): Update docstring to reflect
12755 current (non-)usage of "read only" strings.
12756 (scm_make_shared_substring): Clarify docstring by changing
12757 "semantics" to "arguments".
12758
12759 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12760
12761 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12762 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12763 improvements.
12764
12765 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12766
12767 The following changes make the documentation more consistent.
12768
12769 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12770 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12771 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12772 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12773 ... @end lisp.
12774
12775 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12776 (scm_array_dimensions, scm_make_shared_array),
12777 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12778 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12779 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12780 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12781 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12782 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12783 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12784 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12785 @example ... @end example to @lisp ... @end lisp.
12786
12787 * weaks.c (scm_weak_vector): Corrected docstring.
12788
12789 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12790 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12791 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12792 (scm_hashx_set_x, scm_hashx_get_handle),
12793 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12794 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12795 vectors.c (scm_vector_fill_x), strings.c
12796 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12797 objprop.c (scm_set_object_properties_x):
12798 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12799 strports.c (scm_call_with_input_string), ports.c
12800 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12801 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12802 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12803 (scm_make_weak_vector,scm_weak_vector_p),
12804 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12805 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12806 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12807 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12808 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12809 Made parameter names match documentation by renaming parameters
12810 and/or fixing docstrings.
12811
12812 * numbers.c (scm_ash): Corrected Texinfo markup.
12813
12814 * strop.c (scm_string_index, scm_string_rindex),
12815 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12816
12817 * vports.c (scm_make_soft_port), unif.c
12818 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12819 (scm_dimensions_to_uniform_array, scm_transpose_array),
12820 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12821 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12822 (scm_array_to_list, scm_list_to_uniform_array),
12823 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12824 (scm_open_input_string, scm_open_output_string),
12825 (scm_get_output_string), strop.c (scm_string_copy),
12826 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12827 (scm_get_internal_real_time, scm_times),
12828 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12829 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12830 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12831 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12832 simpos.c (scm_system), random.c (scm_random_uniform),
12833 (scm_random_normal, scm_random_exp), ramap.c
12834 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12835 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12836 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12837 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12838 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12839 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12840 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12841 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12842 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12843 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12844 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12845 (scm_integer_expt, scm_bit_extract, scm_logcount),
12846 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12847 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12848 (scm_interaction_environment), macros.c (scm_makacro),
12849 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12850 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12851 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12852 (scm_fluid_ref), filesys.c (scm_open_fdes),
12853 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12854 Docstring correction: `Returns' -> `Return'
12855
12856 * gc.c (scm_set_debug_cell_accesses_x):
12857 (s_scm_gc_set_debug_check_freelist_x):
12858 * fluids.c (scm_fluid_p): Added texinfo markup.
12859
12860 * error.c (scm_strerror): Made docstring more precise.
12861
12862 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12863 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12864 (scm_symbol_p, scm_symbol_to_string), strorder.c
12865 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12866 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12867 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12868 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12869 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12870
12871 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12872
12873 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12874 mode, as suggested by Michael Livshin.
12875
12876 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12877
12878 * backtrace.c (display_backtrace_body): since the `print_state'
12879 variable is not used (instead its data field is used directly as
12880 `pstate'), protect it from the hungry compiler optimizations.
12881 thanks to Bill Schottstaedt for the report.
12882
12883 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12884
12885 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12886 It is only defined and used if guile is compiled with
12887 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12888 let cells with a free_cell type tag be visible outside of the
12889 garbage collector when in debug mode.
12890
12891 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12892
12893 (scm_assert_cell_valid): Use a local static variable to avoid
12894 recursion.
12895
12896 (MARK): Only check for rogue cell pointers in debug mode. Use
12897 scm_cellp for this purpose and place all checks for rogue pointers
12898 into that function. Further, since due to conservative scanning
12899 we may encounter free cells during marking, don't use the standard
12900 cell type accessor macro to determine the cell type.
12901
12902 (scm_cellp): Check if the cell pointer actually points into a
12903 card header.
12904
12905 (scm_init_gc): Initalize scm_tc16_allocated.
12906
12907 * gc.h (GCH): Renamed to SCM_GC_H.
12908
12909 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12910 might be unnecessary, but I feel better this way :-)
12911
12912 (SCM_GC_CELL_TYPE): New macro.
12913
12914 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12915 in guile, and it is unlikely that they will be applied to real
12916 pairs anyway.
12917
12918 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12919
12920 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12921 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12922
12923 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12924 make sure that in debug mode no free cell will ever be visible
12925 outside of the garbage collector.
12926
12927 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12928
12929 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12930 values.
12931
12932 * async.c (scm_system_async), variable.c (scm_make_variable,
12933 scm_make_undefined_variable): Use scm_cons to create a pair.
12934
12935 * debug.c (scm_reverse_lookup): Perform proper type checking.
12936 Remove suspicious use of SCM_SLOPPY_CONSP.
12937
12938 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12939 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12940 the corresponding optimization.
12941
12942 * eval.c (iqq): Use proper type check.
12943
12944 (scm_m_expand_body): Remove redundant type checks.
12945
12946 (promise_print): Don't access promise cells as pairs.
12947
12948 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12949 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12950 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12951 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12952 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12953
12954 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12955 (scm_iprin1): Use new macro predicate and accessors.
12956
12957 * eval.h (scm_tc16_macro): Removed declaration. It is declared
12958 in macros.h.
12959
12960 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
12961 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
12962 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
12963 SCM_VARIABLE_H. Even the macros that are used to inhibit
12964 including a header file twice should be in the SCM_ namespace.
12965
12966 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
12967 properties.c (scm_primitive_property_ref,
12968 scm_primitive_property_del_x): Prefer stronger predicates like
12969 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12970
12971 * gc.c (MARK): Use proper macros to access procedure-with-setter
12972 cell elements and closure cell elements.
12973
12974 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
12975 access free cells as pairs.
12976
12977 (scm_unprotect_object): scm_hashq_get_handle returns #f if
12978 no hashtab entry is found.
12979
12980 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
12981 SCM_CLR_PORT_OPEN_FLAG.
12982
12983 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
12984 use SCM_SET_C[AD]R for uninitialized cells.
12985
12986 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
12987 If the hashtable has no slots, return #f instead of '(). This
12988 unifies the return value with most assoc-functions.
12989
12990 (scm_hash_fn_ref): Use proper type check.
12991
12992 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
12993 Removed references to non-existing functions from documentation.
12994
12995 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
12996 access keyword cell elements.
12997
12998 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
12999 macros.
13000
13001 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13002
13003 * print.c (scm_iprlist): Added comment. Improved loop
13004 conditions.
13005
13006 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13007 pairs.
13008
13009 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13010
13011 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13012
13013 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13014 cells as pairs.
13015
13016 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13017 scm_variable_set_x): Use proper macros to access variable cell
13018 elements.
13019
13020 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13021
13022 * variable.h (SCM_VARVCELL): Don't access variable cells as
13023 pairs.
13024
13025 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13026 added FIXME comment, removed register specifier.
13027
13028 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13029
13030 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13031 * init.c (scm_init_guile_1): Don't init goopscore module.
13032
13033 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13034
13035 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13036
13037 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13038
13039 * strop.c (scm_string_to_list): Fixed docstring markup.
13040 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13041 (scm_string_downcase, scm_string_capitalize_x),
13042 (scm_string_capitalize): Rewrote and corrected docstrings.
13043 (scm_string_ci_to_symbol): Made docstring more explicit.
13044
13045 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13046
13047 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13048 eval.c can use it.
13049 (scm_call_with_values): Removed.
13050 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13051 so that it can be exported.
13052 (scm_call_with_values): Removed.
13053
13054 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13055 * eval.c: Include "libguile/values.h"
13056 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13057 New.
13058 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13059 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13060 New delcarations to support above change.
13061
13062 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13063 errors with last change.
13064
13065 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13066
13067 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13068 scm_i_eval): Moved the application of the system transformer from
13069 scm_i_eval to scm_primitive_eval.
13070
13071 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13072
13073 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13074
13075 * strop.c (scm_string_index): Fix docstring line break
13076 regression.
13077
13078 * list.c (scm_cons_star): Fix docstring typo.
13079
13080 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13081
13082 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13083 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13084 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13085 scm_make_string, scm_string_append), strports.c (st_resize_port,
13086 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13087 scm_makstr with calls to scm_allocate_string.
13088
13089 * strings.[ch] (scm_allocate_string): New function.
13090
13091 * strings.[ch] (scm_makstr): Deprecated.
13092
13093 2001-03-18 Gary Houston <ghouston@arglist.com>
13094
13095 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13096 NULL. rewrote the docstring.
13097 (scm_mkstemp): new procedure implementing "mkstemp!".
13098 * posix.h: declare scm_mkstemp.
13099
13100 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13101 normally it would be found in netdb.h.
13102
13103 2001-03-17 Gary Houston <ghouston@arglist.com>
13104
13105 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13106 warning when HAVE_ARRAYS is not defined. move len too.
13107
13108 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13109 (EXTRA_DOT_X_FILES): let configure set the value.
13110 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13111
13112 * gc.c (scm_must_malloc): changed the comment explaining when
13113 scm_must variants of malloc/free etc., should be used, based on
13114 explanation from Dirk Herrmann.
13115 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13116 string with procedure name. use scm_must_malloc instead of malloc.
13117 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13118 of malloc/free.
13119 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13120 scm_ungetc): use scm_must variants of malloc/realloc/free.
13121 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13122
13123 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13124
13125 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13126 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13127 scm_wrong_type_arg instead.
13128
13129 (SCM_WNA): Deprecated.
13130
13131 * error.[ch] (scm_wta): Deprecated.
13132
13133 * numbers.c (s_i_log): Minor comment fix.
13134
13135 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13136 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13137 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13138 wrong-num-args or misc errors.
13139
13140 * unif.c (scm_make_shared_array, scm_transpose_array,
13141 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13142 Validate the rest argument (note: this is only done when guile is
13143 built with SCM_DEBUG_REST_ARGUMENT=1)
13144
13145 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13146 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13147
13148 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13149 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13150
13151 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13152
13153 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13154 instead of scm_wrong_num_args.
13155
13156 * coop-threads.c: Don't include libguile/strings.h. (Was only
13157 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13158
13159 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13160 wrong-num-args errors.
13161
13162 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13163
13164 * error.[ch] (scm_error_num_args_subr): New function.
13165
13166 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13167
13168 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13169 (scm_length, scm_append, scm_reverse, scm_list_ref),
13170 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13171 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13172 (scm_delete1_x), gc.c (scm_map_free_list),
13173 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13174 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13175 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13176 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13177 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13178 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13179 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13180
13181 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13182 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13183 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13184 symbols.c (scm_symbol_interned_p), numbers.c
13185 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13186 markup.
13187
13188 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13189
13190 * snarf.h (SCM_CONST_LONG): Deprecated.
13191 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13192
13193 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13194
13195 * numbers.c (scm_num2ulong): Check that a bignum is positive
13196 before looking at the magnitude. Correctly check for overflow
13197 during conversion.
13198 (scm_num2long_long): Likewise.
13199 (scm_num2ulong_long): New.
13200 (ULONG_LONG_MAX): Define if not already defined.
13201 * numbers.h: (scm_num2ulong_long): New prototype.
13202
13203 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13204
13205 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13206
13207 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13208 (SCM_OPOUTSTRPORTP): New predicate macros.
13209 (scm_open_input_string, scm_open_output_string),
13210 (scm_get_output_string): New prototypes.
13211
13212 * strports.c (scm_open_input_string, scm_open_output_string),
13213 (scm_get_output_string): New procedures (SRFI-6 compliant).
13214 Made scm_tc16_strport non-static.
13215
13216 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13217
13218 * macros.h (SCM_ASSYNT): Removed unused object argument from
13219 signature.
13220
13221 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13222 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13223 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13224 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13225 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13226 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13227 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13228 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13229 scm_m_atdispatch): Removed unused object argument from call to
13230 SCM_ASSYNT.
13231
13232 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13233
13234 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13235 const int* to reflect that the input array of integers remains
13236 unchanged. Thanks to Brett Viren for the hint.
13237
13238 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13239
13240 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13241 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13242 in various places.
13243 (gh_scm2newstr, gh_symbol2newstr): Change call to
13244 scm_must_malloc() to malloc(), because user-free()able memory is
13245 allocated.
13246
13247 * gc.c: Added declaration of `scm_debug_check_freelist'.
13248
13249 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13250
13251 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13252
13253 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13254
13255 * strports.c (scm_object_to_string): New procedure.
13256 (scm_strprint_obj): Deprecated.
13257 * strports.h: Reflect the changes.
13258
13259 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13260
13261 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13262
13263 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13264 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13265 SCM_ASSYNT to check for correct argument types. Either use some
13266 SCM_VALIDATE_* macro or an explicit test.
13267
13268 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13269 misc-errors.
13270
13271 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13272 instead of calling scm_wta.
13273
13274 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13275
13276 * load.c (scm_primitive_load, scm_primitive_load_path),
13277 (scm_sys_search_load_path): Corrected docstrings (file ->
13278 filename).
13279
13280 * eval.c (scm_force): Added texinfo markup to docstring.
13281 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13282
13283 * debug-malloc.c: Reinserted #include <stdio.h>.
13284
13285 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13286
13287 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13288
13289 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13290 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13291 Use SCM_LISTn instead of scm_listify.
13292
13293 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13294
13295 * _scm.h: Removed #include <errno.h>.
13296
13297 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13298 errno variable (can be a macro on some systems, for example when
13299 using linux libc with threads).
13300
13301 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13302 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13303 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13304 #include <errno.h> in these 20 out of 100 files.
13305
13306 2001-03-10 Gary Houston <ghouston@arglist.com>
13307
13308 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13309 not already defined.
13310
13311 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13312
13313 * coop.c: Inserted #include <stdio.h>.
13314
13315 * iselect.c: Reinserted #include <stdio.h>.
13316
13317 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13318
13319 * posix.c: Replaced `#define' of __USE_XOPEN right before
13320 including unistd.h with a define of _GNU_SOURCE at the very top of
13321 the file.
13322
13323 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13324
13325 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13326 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13327 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13328 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13329 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13330 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13331 print.c, procprop.c, procs.c, properties.c, ramap.c,
13332 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13333 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13334 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
13335 Remove #include <stdio.h>
13336 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13337
13338 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13339
13340 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13341
13342 * posix.c (scm_gethostname): Set initial name length to 256 for
13343 Solaris.
13344
13345 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13346
13347 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13348 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13349 (scm_sethostname, scm_gethostname): New prototypes.
13350
13351 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13352 <sys/file.h>, if present.
13353 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13354 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13355 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13356 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13357 (scm_sethostname, scm_gethostname): New procedures.
13358
13359 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13360
13361 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13362 not optional (ii) "recommend" spelling correction.
13363
13364 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13365
13366 * ramap.c (racp): Removed optimization which caused array copying
13367 to fail if the two arrays shared storage. Re-inserted the IVDEP
13368 macros removed in the change of 2000-03-09. (Don't really have a
13369 complete grasp of what they are for, but they seem to be necessary
13370 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13371
13372 * hash.c (scm_string_hash): Don't downcase characters.
13373
13374 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13375
13376 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
13377 size from 277 --> 1009.
13378
13379 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13380 function.
13381
13382 * coop-threads.c: Fixed change of 2001-03-06.
13383
13384 * validate.h: Code formatting.
13385
13386 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13387
13388 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13389 (*.doc): Add dependency on guile-snarf.awk.in.
13390
13391 * guile-snarf.awk.in: Neglect spaces at the end of
13392 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13393 middle of docstrings. (To avoid the problem with gcc-2.96.)
13394
13395 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13396
13397 * coop-threads.c (scm_call_with_new_thread), load.c
13398 (scm_primitive_load, scm_sys_search_load_path), random.c
13399 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13400 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13401 (potentially) issue a scm-misc-error or wrong-num-args error
13402 message.
13403
13404 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13405 about the expected type with the wrong-type-arg error message.
13406
13407 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13408 a C level bug that can't be fixed from scheme anyway.
13409
13410 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13411
13412 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13413 Duplicate bindings are OK in a let* since a let* is semantically
13414 equivalent to a nested set of let:s.
13415
13416 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13417
13418 * print.c (scm_print_options): Fixed texinfo in docstring.
13419
13420 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13421 the underlying functions getservent, getprotoent or getnetent
13422 return NULL instead of signalling an error.
13423
13424 2001-03-04 Gary Houston <ghouston@arglist.com>
13425
13426 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13427 taking an unexpectedly large filename for an AF_UNIX socket from
13428 bind/connect/sendto (thanks to Martin Grabmueller).
13429
13430 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13431 former and adjusted the latter.
13432 (scm_socket, scm_socketpair): cosmetic changes.
13433 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13434 size_t as socklen_t substitute. don't restrict args/return values
13435 to INUM: allow full range of int or size_t.
13436 (scm_fill_sockaddr): check arguments before allocating memory, to
13437 avoid leakage. use malloc, not scm_must_malloc.
13438 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13439 substitute. free the sockaddr structure before throwing an error.
13440 (scm_init_add_buffer): procedure removed, together with its static
13441 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13442 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13443 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13444 scm_sendto): use a local buffer instead of scm_addr_buffer.
13445 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13446 not size_t.
13447 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13448 call to detect whether recvfrom could be bothered to set the address.
13449 (scm_init_socket): don't call scm_init_addr_buffer.
13450
13451 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13452
13453 * debug.c (scm_procedure_source, scm_procedure_environment),
13454 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13455 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13456 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13457 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13458 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13459 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13460 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13461 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13462 scm_array_to_list, scm_array_prototype), validate.h
13463 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13464 scm_misc_error or scm_wrong_type_arg instead.
13465
13466 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13467
13468 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13469
13470 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13471 (scm_sys_tag_body): Added.
13472
13473 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13474
13475 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13476 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13477 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13478 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13479 options.c (scm_options), ports.c (scm_remove_from_port_table),
13480 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13481 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13482 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13483 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13484 instead.
13485
13486 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13487
13488 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13489
13490 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13491
13492 * eval.c (scm_s_duplicate_bindings): New error message.
13493 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13494
13495 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13496
13497 * eval.h (SCM_EVALIM2): New macro. Use it when a
13498 immediate, literal constant should be evaluated.
13499 * eval.c (scm_s_duplicate_formals): New error message string.
13500 (scm_c_improper_memq): New function.
13501 (scm_m_lambda): Check for duplicate arguments.
13502 (scm_ceval, scm_deval): When executing a body: only cons a new
13503 toplevel environment frame when it is different from the
13504 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13505 check for empty combinations; use SCM_EVALIM2 for the same reason
13506 in the non-toplevel loop.
13507 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13508 New labels with the meaning of their non-"nontoplevel" partners,
13509 but they are used when it is known that the body is not evaluated at
13510 top-level.
13511 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13512 reporting for empty combinations.
13513
13514 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13515
13516 * Remove dump facilities.
13517 * dump.c, dump.h: Removed.
13518 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13519 * init.c: Remove #include "libguile/dump.h".
13520 (scm_init_guile_1): Remove scm_init_dump.
13521 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13522 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13523 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13524 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13525
13526 * keywords.c: Remove #include "libguile/dump.h".
13527 (keyword_dump, keyword_undump): Removed.
13528 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13529
13530 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13531
13532 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13533 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13534 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13535 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13536 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13537 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13538 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13539 to @code{} as the texinfo manual recommends, converted the
13540 examples to use a @lisp{}-environment.
13541
13542 * strports.c (scm_eval_string): Cleaned up the docstring.
13543
13544 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13545 markup.
13546
13547 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13548 (scm_number_to_string, scm_string_to_number, scm_number_p)
13549 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13550 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13551 (scm_ash): Added texinfo markup and removed obsolete @refill.
13552 (scm_gr_p): Corrected comment.
13553 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13554 docstring) comments.
13555 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13556 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13557 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13558 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13559 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13560 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13561 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13562 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13563
13564 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13565
13566 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13567 (Obviously nobody compiles with SCM_RECKLESS defined...)
13568
13569 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13570
13571 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13572
13573 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13574
13575 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13576
13577 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13578
13579 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13580 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13581 since use of `z' suggests that the arguments may be complex.
13582
13583 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13584 typos.
13585
13586 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13587
13588 * dump.c (scm_binary_write, scm_binary_read), eval.c
13589 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13590 scm_guardian_greedy_p, scm_make_guardian), fports.c
13591 (scm_file_port_p): Minor docstring fixes.
13592
13593 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13594
13595 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
13596
13597 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13598 scm_i_eval.
13599 (make_class_from_template): Do not bother to set the current
13600 module around the call to DEFVAR, scm_eval takes care of that.
13601 (scm_init_goops): Make scm_module_goops and
13602 scm_goops_lookup_closure permanent objects.
13603
13604 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13605 top level, create a fresh top-level environment for each
13606 expression instead of mutating the exisint frame. This is
13607 important when that frame is closed over.
13608
13609 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13610 SCM_DIGSPERLONG instead of DIGSPERLONG.
13611
13612 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13613
13614 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13615 before applying arrow procedure in `cond' and before applying
13616 receiver procedure in call-with-current-continuation.
13617 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13618 macro. The argument is expanded more than one time.
13619
13620 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13621 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13622
13623 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13624
13625 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13626 notice and license.
13627
13628 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13629
13630 * variable.c (scm_make_variable, scm_make_undefined_variable)
13631 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13632 (scm_variable_bound_p), values.c (scm_values)
13633 (scm_call_with_values), unif.c (scm_bit_count)
13634 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13635 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13636 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13637 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13638 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13639 (scm_copy_random_state, scm_random), print.c (scm_newline)
13640 (scm_write_char, scm_simple_format), debug-malloc.c
13641 (scm_malloc_stats), environments.c (scm_environment_p)
13642 (scm_environment_bound_p, scm_environment_ref)
13643 (scm_environment_fold, scm_environment_define)
13644 (scm_environment_undefine, scm_environment_set_x)
13645 (scm_environment_cell, scm_environment_observe)
13646 (scm_environment_observe_weak, scm_environment_unobserve)
13647 (scm_make_eval_environment, scm_eval_environment_p)
13648 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13649 (scm_eval_environment_imported)
13650 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13651 (scm_import_environment_p, scm_import_environment_imports)
13652 (scm_import_environment_set_imports_x, scm_make_export_environment)
13653 (scm_export_environment_p, scm_export_environment_private)
13654 (scm_export_environment_set_private_x)
13655 (scm_export_environment_signature)
13656 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13657 Added texinfo markup.
13658
13659 * ports.c (scm_drain_input): Lowercased argument to @var.
13660 (scm_current_input_port, scm_current_output_port): Filled in
13661 missing explanation.
13662 (scm_current_load_port, scm_set_current_output_port)
13663 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13664 Added texinfo markup.
13665
13666 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13667 (scm_release_arbiter): Added texinfo markup to docstrings.
13668 Changed `Returns' to `Return'.
13669 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13670
13671 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13672
13673 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13674 by doubling them to `@@'.
13675
13676 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13677
13678 * numbers.c (scm_lognot), random.c (scm_random,
13679 scm_random_normal, scm_random_solid_sphere_x,
13680 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13681 scm_random_exp), dynwind.c
13682 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
13683
13684 * goops.c (scm_sys_initialize_object, scm_instance_p,
13685 scm_class_name, scm_class_precedence_list, scm_class_slots,
13686 scm_class_environment, scm_generic_function_name,
13687 scm_generic_function_methods, scm_method_generic_function,
13688 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13689 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13690 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13691 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13692 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13693 scm_class_direct_supers, scm_class_direct_slots,
13694 scm_class_direct_subclasses, scm_class_direct_methods,
13695 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13696 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13697 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13698 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13699 scm_memoized_environment, scm_procedure_name,
13700 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13701 objects.c
13702 (scm_class_of, scm_entity_p, scm_operator_p,
13703 scm_set_object_procedure_x, scm_object_procedure,
13704 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13705 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13706 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13707 scm_hook_to_list), lang.c
13708 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13709 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13710 (scm_print_options, scm_port_with_print_state,
13711 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13712 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13713 scm_make_procedure_with_setter, scm_procedure), throw.c
13714 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13715 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13716 scm_stack_ref, scm_stack_length, scm_frame_p,
13717 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13718 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13719 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13720 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13721 (scm_dirname, scm_basename), dynwind.c
13722 (scm_wind_chain), read.c (scm_read_options, scm_read,
13723 scm_read_hash_extend), gc.c
13724 (scm_unhash_name), eval.c (scm_eval_options_interface,
13725 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13726 (scm_display_error, scm_set_print_params_x,
13727 scm_display_application, scm_display_backtrace, scm_backtrace),
13728 async.c (scm_async, scm_system_async, scm_async_mark,
13729 scm_system_async_mark, scm_run_asyncs, scm_noop,
13730 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13731 scm_mask_signals): Added docstrings.
13732
13733 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13734
13735 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13736 address of car/cdr. (Thanks to Dirk Herrmann)
13737 Use scm_sizet to obtain the length of strings.
13738 (Thanks to Matthias Koeppe)
13739
13740 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13741
13742 * symbols.c (scm_mem2symbol): Put a empty statement after the
13743 next_symbol label. This is mandated by ANSI, appearantly.
13744
13745 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13746
13747 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13748 sense to compile for a specific kernel version. Do not include
13749 <asm/signal.h> while defining __KERNEL__. This hack should no
13750 longer be needed and caused problems.
13751
13752 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13753
13754 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13755 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13756 can not deal with immediates.
13757
13758 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13759
13760 * list.c (scm_list_copy): Validate the first argument.
13761
13762 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13763
13764 Fix evaluator so that top-level expressions are correctly
13765 evaluated with respect to the module system.
13766
13767 * modules.h. modules.c (scm_current_module_lookup_closure): New
13768 function.
13769
13770 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13771 prototypes.
13772 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13773 names to better reflect their meaning.
13774
13775 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13776 evaluated at top-level and synronize lookup closure before
13777 executing every subform.
13778 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13779 (scm_eval_x, scm_eval): Reimplement in terms of
13780 scm_primitive_eval_x and scm_primitive_eval, respectively.
13781
13782 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13783
13784 * macros.c (scm_macro_name, scm_macro_transformer): Use
13785 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13786 Thanks!
13787
13788 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13789
13790 * dump.c (scm_store_bytes): Store data size before data.
13791 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13792 * dump.h (scm_restore_bytes): Updated.
13793
13794 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13795
13796 * dump.c: Use double cells for update schedule.
13797
13798 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13799
13800 * ports.c (scm_unread_char): Take an optional argument.
13801
13802 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13803
13804 * modules.h (scm_selected_module, scm_current_module): Renamed
13805 scm_selected_module to scm_current_module to synchronize Scheme
13806 and C names.
13807 (scm_select_module, scm_set_current_module): Likewise. Changed
13808 all uses.
13809
13810 * ports.c (scm_port_for_each): Make a snapshot of the port table
13811 before iterating over it. The table might change while the user
13812 code is running. With the snapshot, the user can depend on the
13813 fact that each port that existed at the start of the iteration is
13814 encountered exactly once. (ice-9 popen) depends on this.
13815
13816 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13817
13818 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13819
13820 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13821 range checking for the size parameter. Thanks to Martin
13822 Grabmueller for the hint.
13823
13824 (scm_makstr): Reordered string initialization to make interrupt
13825 deferring unnecessary.
13826
13827 * vectors.c (scm_make_vector): Fixed range checking.
13828
13829 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13830
13831 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13832
13833 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13834 checking of the size parameter for type correctness and valid
13835 range. Thanks to Rob Browning for reporting the problem. Instead
13836 of deferring interrupts, scm_remember_upto_here_1 is used.
13837
13838 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13839
13840 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13841 (scm_dump_cell_update): Removed.
13842 (scm_dump_update): Renamed from scm_dump_object_update.
13843 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13844 a pointer instead of returning a value.
13845 * keywords.c (keyword_undump): Updated.
13846
13847 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13848
13849 * dump.c, dump.h: Modified a lot.
13850 (SCM_DUMP_COOKIE): Version 0.1
13851 (scm_dump_mark): Removed.
13852 (scm_restore_cell_object, scm_store_cell_object): New functions.
13853
13854 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13855 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13856 New slots: dump, undump.
13857 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13858 Updated.
13859
13860 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13861 (keyword_undump): Renamed from keyword_alloc.
13862 (scm_init_keywords): Set keyword_dump and keyword_undump.
13863
13864 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13865
13866 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13867 the deprecated SCM_DOUBLE_CELLP.
13868
13869 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13870
13871 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13872
13873 * dump.c, dump.h: New files.
13874 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13875 * init.c: #include "libguile/dump.h".
13876 (scm_init_guile_1): Call scm_init_dump.
13877 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13878 dump_dealloc, dump_store, undump_alloc, undump_restore,
13879 undump_init.
13880 * smob.c (scm_make_smob_type): Init the new slots.
13881 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13882 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13883
13884 * keywords.c: #include "libguile/dump.h".
13885 (keyword_dealloc, keyword_alloc): New functions.
13886 (scm_init_keywords): Set smob_dump and smob_undump.
13887
13888 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13889
13890 * vectors.c (scm_c_make_vector): New function.
13891 * vectors.h (scm_c_make_vector): Declared.
13892 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13893 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13894 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13895 (scm_make_method_cache, scm_i_vector2list,
13896 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13897 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13898 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13899 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13900 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13901 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13902 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13903 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13904
13905 * hashtab.c (scm_c_make_hash_table): New function.
13906 * hashtab.h (scm_c_make_hash_table): Declared.
13907 * environments.c (scm_make_leaf_environment,
13908 scm_make_eval_environment), gc.c (scm_init_storage),
13909 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13910 Use scm_c_make_hash_table.
13911
13912 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13913
13914 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13915
13916 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13917
13918 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13919 end of docstring.
13920
13921 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13922 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13923 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13924 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13925 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13926 scm_source_property, scm_set_source_property_x), sort.c
13927 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13928 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13929 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13930 docstrings.
13931
13932 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13933
13934 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13935 really get that arg.
13936
13937 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13938
13939 * goops.c (s_scm_get_keyword): Bug fix.
13940
13941 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13942
13943 The following patch was sent by Martin Grabmueller. It makes sure
13944 that in case of parameter errors the correct function name is
13945 shown, and that parameter types are only checked once.
13946
13947 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13948 string_capitalize_x): New functions. Each one performs the core
13949 functionality of the corresponding scm_* function.
13950
13951 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13952 scm_string_downcase_x, scm_string_downcase,
13953 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13954 parameter checking wrappers of the above functions.
13955
13956 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13957
13958 * continuations.c, dynl.c, keywords.c, load.c: Include
13959 strings.h. Thanks to Bill Schottstaedt for the bug report.
13960
13961 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13962
13963 * backtrace.c (display_header): Make sure that line and column
13964 information is shown independent of whether the port the code was
13965 read from had an associated filename. Thanks to Martin
13966 Grabmueller for providing this patch.
13967
13968 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13969
13970 * fports.[ch] (scm_file_port_p): New primitive.
13971
13972 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13973
13974 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
13975 These are now defined in fports.c, strports.c and vports.c.
13976
13977 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
13978 vports.c (scm_tc16_sfport): Made variables (were macros defined in
13979 tags.h).
13980
13981 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
13982 (scm_make_sfptob): Made static. These return a type code now.
13983
13984 fports.c (scm_init_fports), strports.c (scm_init_strports),
13985 vports.c (scm_init_vports): Create the corresponding port types.
13986
13987 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
13988 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
13989
13990 * init.c (scm_init_guile_1): Make sure strports are initialized
13991 before gdbint.
13992
13993 * ports.[ch] (scm_make_port_type): Changed the return type to
13994 scm_bits_t.
13995
13996 * ports.c (scm_ports_prehistory): Don't create any port types
13997 here.
13998
13999 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14000 against scm_tc16_fport directly.
14001
14002 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14003
14004 * srcprop.c (scm_set_source_property_x): Fix to handle
14005 (set-source-property! <obj> 'copy <datum>) correctly.
14006
14007 2001-01-24 Gary Houston <ghouston@arglist.com>
14008
14009 * filesys.c (scm_link): docstring fix.
14010 * fports.h (scm_setfileno): obsolete declaration removed.
14011 * posix.c: bogus popen declaration removed.
14012
14013 * rdelim.c: new file, split from ioext.c.
14014 * rdelim.h: new file, split from ioext.h
14015 * Makefile.am: add rdelim.c and related files.
14016 * init.c: call scm_init_rdelim. include rdelim.h.
14017
14018 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14019
14020 This patch was sent by Martin Grabmueller and makes sure that
14021 parameter errors are reported correctly by the lexicographic
14022 ordering predicates.
14023
14024 * strorder.c (string_less_p, string_ci_less_p): New functions.
14025
14026 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14027 functionality into string_less_p, string_ci_less_p respectively.
14028 The remaining code is just a wrapper to do the parameter
14029 checking.
14030
14031 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14032 parameters and call string_less_p instead of scm_string_less_p.
14033
14034 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14035 Check the parameters and call string_less_ci_p instead of
14036 scm_string_ci_less_p.
14037
14038 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14039
14040 This patch modifies scm_display_error to perform parameter
14041 checking. Thanks to Neil Jerram for the bug report.
14042
14043 * backtrace.[ch] (scm_i_display_error): New function.
14044
14045 * backtrace.c (scm_display_error): Added parameter check and
14046 extracted the core functionality into function
14047 scm_i_display_error.
14048
14049 * throw.c (handler_message): Call scm_i_display_error to display
14050 the error message.
14051
14052 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14053
14054 * eval.c (SCM_APPLY): Added # args check for application of
14055 procedures with arity 3. (Thanks to Anders Holst.)
14056
14057 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14058
14059 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14060
14061 (SCM_OPDIRP): Deprecated.
14062
14063 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14064 SCM_OPN.
14065
14066 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14067 Instead, give an explicit error message in case the directory is
14068 closed.
14069
14070 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14071 instead of SCM_OPENP and SCM_CLOSEDP.
14072
14073 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14074
14075 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14076
14077 * eval.c (inner_eval, scm_eval): Move all real functionality into
14078 inner_eval. Avoid to copy the expression twice by inlining some
14079 code from scm_i_eval.
14080
14081 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14082
14083 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14084 now has to be the last clause, as required by R5RS. Thanks to
14085 Martin Grabmueller for the patch.
14086
14087 2001-01-18 Gary Houston <ghouston@arglist.com>
14088
14089 * ioext.c: further simplify scm_read_string_x_partial by defining
14090 a macro SCM_EBLOCK.
14091
14092 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14093
14094 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14095
14096 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14097
14098 * __scm.h: Added comment about architecture and compiler
14099 properties that are required by guile.
14100
14101 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14102 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14103
14104 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14105
14106 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14107
14108 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14109 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14110
14111 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14112
14113 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14114 to the names in limits.h.
14115
14116 * numbers.c (abs_most_negative_fixnum): Added.
14117
14118 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14119 fixnum-min) special case.
14120
14121 (scm_big_and): Fix for negative first parameter.
14122
14123 (scm_bit_extract): Fix for fixnum paramters.
14124 Thanks to Rob Browning for the bug report.
14125
14126 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14127
14128 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14129
14130 * symbols.c (scm_symbol_bound_p): Fixed comment.
14131 Thanks to Chris Cramer.
14132
14133 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14134
14135 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14136 Thanks to Bill Schottstaedt.
14137
14138 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14139
14140 from Matthias Köppe:
14141
14142 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14143 casts its result, so doesn't yield an lvalue per ANSI C.
14144
14145 * goops.c (s_scm_sys_set_object_setter_x): use
14146 SCM_SET_ENTITY_SETTER.
14147 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14148
14149 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14150 its result, so doesn't yield an lvalue per ANSI C.
14151 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14152 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14153 SCM_GC_SET_CARD_FLAGS.
14154 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14155
14156 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14157
14158 2001-01-08 Gary Houston <ghouston@arglist.com>
14159
14160 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14161 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14162 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14163 changes.
14164 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14165 for fdes. if current input port is used, check that it's a file
14166 port.
14167
14168 2001-01-06 Gary Houston <ghouston@arglist.com>
14169
14170 * ioext.c (scm_read_string_x_partial): new procedure, implements
14171 read-string!/partial.
14172 * ports.c (scm_take_from_input_buffers): new procedure used by
14173 scm_read_string_x_partial.
14174 (scm_drain_input): use scm_take_from_input_buffers.
14175
14176 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14177
14178 * validate.h (SCM_VALIDATE_NUMBER): New.
14179
14180 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14181
14182 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14183 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14184 SET_DESTROYED): new defines/macros.
14185 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14186 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14187 (guardian_print): print more info.
14188 (guardian_apply): check if the guardian is destroyed, and throw an
14189 error if so. take one more optional argument `throw_p'.
14190 (scm_guard): depending on the value of `throw_p', return a boolean
14191 result.
14192 (scm_get_one_zombie): remove redundant property test.
14193 (guardian_t): represent the various (currently 3, I hope nothing
14194 more gets added) boolean fields as bit flags.
14195 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14196 (scm_destroy_guardian_x): new procedure.
14197
14198 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14199 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14200
14201 2001-01-01 Gary Houston <ghouston@arglist.com>
14202
14203 * fports.c (fport_write): bugfix: handle short writes for
14204 unbuffered ports too. optimize the buffered case by minimizing
14205 the number of write/flush calls.
14206 (write_all): new helper procedure.
14207
14208 The ChangeLog continues in the file: "ChangeLog-2000"
14209
14210 ;; Local Variables:
14211 ;; coding: utf-8
14212 ;; End: