dd29b8a149c78077282b0ec5b5d86f88bafa79fa
[bpt/guile.git] / libguile / ChangeLog
1 2007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
2
3 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
4 held.
5
6 2007-08-23 Ludovic Courtès <ludo@gnu.org>
7
8 * read.c (scm_read_quote): Record position and copy source
9 expression when asked to. Reported by Kevin Ryde.
10
11 * stime.c: Define `_REENTRANT' only if not already defined.
12
13 2007-08-21 Kevin Ryde <user42@zip.com.au>
14
15 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
16 tc16 values so big, real, complex and fraction can be distinguished.
17
18 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
19 was making numbers come out as "type 23" in gc-live-object-stats.
20 Fix tests of the tc16 number types, they were checked under
21 scm_tc7_number, but the values went down the tag>=255 smob case.
22 Put smob case under scm_tc7_smob instead of using tag>=255, per
23 recommendation in comments with scm_tc7_smob to use symbolic values.
24 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
25 code. Lose some unnecessary "break" statements.
26
27 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
28 element returned, rather than two lookups scm_hashq_ref and
29 scm_hashq_set_x.
30
31 2007-08-17 Kevin Ryde <user42@zip.com.au>
32
33 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
34 solaris 2.6. Reported by anirkko.
35
36 2007-07-29 Ludovic Courtès <ludo@gnu.org>
37
38 * Makefile.am (INCLUDES): Added Gnulib includes.
39 (gnulib_library): New.
40 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
41 `$(gnulib_library)'.
42 (libguile_la_LIBADD): Likewise.
43
44 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
45 to define it when available.
46 * srfi-14.c: Likewise.
47 * i18n.c: Likewise. Include Gnulib's <alloca.h>
48 * eval.c: Include Gnulib's <alloca.h>.
49 * filesys.c: Likewise.
50 * read.c: Don't include <strings.h> and don't provide an
51 `strncasecmp ()' replacement; use Gnulib's <string.h> and
52 `strncasecmp ()' instead.
53
54 2007-07-25 Ludovic Courtès <ludo@gnu.org>
55
56 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
57 immediately. This used to produce a circular memoized
58 expression, e.g., for `(set (quote x) #t)'.
59
60 2007-07-22 Ludovic Courtès <ludo@gnu.org>
61
62 Overhauled the reader, making it faster.
63
64 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
65 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
66 of `scm_lreadr ()'.
67
68 * read.c: Overhauled. No longer use a token buffer. Use a
69 on-stack C buffer in the common case and use Scheme strings when
70 larger buffers are needed.
71 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
72 scm_lreadr, scm_lreadrecparen): Removed.
73 (scm_i_input_error): Marked as `SCM_NORETURN'.
74
75 2007-07-15 Ludovic Courtès <ludo@gnu.org>
76
77 * script.c (scm_compile_shell_switches): Updated copyright year.
78
79 2007-07-11 Ludovic Courtès <ludo@gnu.org>
80
81 * goops.c (scm_sys_method_more_specific_p): Added docstring.
82 Make sure LEN is greater than or equal to the minimum length of
83 specializers of M1 and M2. This fixes a segfault later on in
84 `more_specificp ()' if TARGS is too small. Reported by Marco
85 Maggi <marco.maggi-ipsu@poste.it>.
86
87 2007-06-26 Ludovic Courtès <ludo@gnu.org>
88
89 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
90 sure to free the previous array after the new one has been
91 installed. This leak is made visible by running
92 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
93 from the REPL within Valgrind.
94
95 2007-06-12 Ludovic Courtès <ludo@chbouib.org>
96
97 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
98 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
99 bus error on SPARC (and possibly others) due to unaligned access.
100
101 2007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
102
103 * posix.c (scm_ttyname): Check whether RESULT is NULL before
104 making a string from it (reported by Dan McMahill). Don't call
105 `scm_from_locale_string ()' before the mutex is released.
106
107 2007-05-26 Ludovic Courtès <ludo@chbouib.org>
108
109 * eval.c (scm_m_define): Updated comment. Changed order for value
110 evaluation and `scm_sym2var ()' call, which is perfectly valid per
111 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
112
113 2007-05-05 Ludovic Courtès <ludo@chbouib.org>
114
115 Implemented lazy duplicate binding handling.
116
117 * modules.c (scm_export): Renamed to...
118 (scm_module_export): This. Now public.
119 (module_variable): Removed.
120 (default_duplicate_binding_procedures_var): New variable.
121 (default_duplicate_binding_handlers, resolve_duplicate_binding,
122 module_imported_variable, scm_module_local_variable,
123 scm_module_variable): New functions.
124 (scm_module_import_interface): Rewritten.
125 (scm_module_reverse_lookup): Exported as a Scheme function.
126 * modules.h (scm_module_index_duplicate_handlers,
127 scm_module_index_import_obarray): New macros.
128 (scm_module_variable, scm_module_local_variable,
129 scm_module_export): New declarations.
130
131 2007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
132
133 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
134 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
135
136 2007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
137
138 * numbers.c (carg): provide carg, cexp, clog in case they are
139 missing.
140
141 2007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
142
143 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
144 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
145 Steven Wu.
146
147 2007-03-08 Kevin Ryde <user42@zip.com.au>
148
149 * struct.c, struct.h (scm_make_vtable): New function, providing
150 `make-vtable'.
151 * stacks.c (scm_init_stacks): Use it.
152
153 2007-03-06 Kevin Ryde <user42@zip.com.au>
154
155 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
156 allocating a tail array. If there's no such then those tail fields
157 are uninitialized and garbage SCMs there can cause a segv if printed
158 (after fetching with struct-ref).
159
160 2007-02-22 Kevin Ryde <user42@zip.com.au>
161
162 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
163 (scm_usleep): Update docstring per manual, cross reference sleep.
164
165 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
166 scm_struct_init is not within that section. scm_struct_init can
167 thrown an error, which within a critical section results in an
168 abort().
169
170 2007-02-19 Neil Jerram <neil@ossau.uklinux.net>
171
172 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
173 is included in the distribution.
174 (noinst_HEADERS): And the same for eval.i.c.
175
176 2007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
177
178 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
179 unconditionally. Include <langinfo.h> and <nl_types.h> when
180 available.
181 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
182 SCM_LIST_OR_INTEGER_P): New macros.
183 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
184 as powers of two instead of `(1 << LC_*)'.
185 (scm_i_locale_free): New function/macro.
186 (scm_global_locale): New global variable.
187 (smob_locale_free): Use `scm_i_locale_free ()'.
188 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
189 (get_current_locale_settings): Return `EINVAL' instead of `errno'
190 when `setlocale' fails.
191 (restore_locale_settings): Likewise.
192 (install_locale_categories): Likewise.
193 (install_locale): Likewise. Stop the locale stack traversal when
194 all categories have been handled.
195 (get_current_locale, category_to_category_mask,
196 category_list_to_category_mask): New function.
197 (scm_make_locale): Use them. Accept both lists of `LC_*' values
198 and single `LC_*' values as the first argument. Handle the case
199 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
200 duplicate C_BASE_LOCALE before using it.
201 (scm_nl_langinfo, define_langinfo_items): New functions.
202 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
203 `nl-langinfo' and invoke `define_langinfo_items ()'.
204 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
205 * posix.c: Include <xlocale.h> when available.
206 (scm_i_locale_mutex): Always define it. Statically initialized.
207 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
208 acquiring the locale mutex.
209 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
210
211 2007-01-27 Kevin Ryde <user42@zip.com.au>
212
213 * ports.c (scm_port_line, scm_set_port_line_x), read.c
214 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
215 port line number type, should be "long" not "int", as per line_number
216 field of scm_t_port. (Makes a difference only on 64-bit systems, and
217 only then for a linenum above 2Gig.)
218
219 2007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
220
221 * vector.c: remove comment as per kryde's request.
222
223 2007-01-25 Kevin Ryde <user42@zip.com.au>
224
225 * sort.c (scm_stable_sort): Return empty list for input empty list, as
226 done in guile 1.6 and as always done by plain `sort'. Was falling
227 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
228
229 2007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
230
231 * vectors.c (s_scm_vector_move_right_x): complain about naming.
232
233 * srcprop.c: regularize comments.
234
235 * eval.c: remove superfluous ifndef DEVAL.
236
237 * private-options.h: idem.
238
239 * eval.i.c: copyright nitpicking.
240
241 * eval.c: distangle. move duplicate code to eval.i.c and include
242 twice.
243
244 * eval.i.c: new file.
245
246 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
247 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
248 read.h, stacks.c, symbols.c, throw.c: use private-options.h
249
250 * private-options.h: new file: contain hardcoded option
251 definitions.
252
253 * private-gc.h: add FSF header.
254
255 2007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
256
257 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
258 memoize-symbol is set.
259
260 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
261
262 * eval.c (CEVAL): add memoize_symbol trap.
263
264 * options.c (scm_options_try): new function. This allows error
265 reporting before changing options in a critical section.
266
267 * srcprop.c: use double cell for storing source-properties. Put
268 filename in the plist, and share between srcprops if possible.
269 Remove specialized storage.
270
271 * srcprop.h: remove macros without SCM_ prefix from
272 interface. Remove specialized storage/type definitions.
273
274 * read.c: idem.
275
276 * print.c: idem.
277
278 * eval.c: terminate option lists with 0.
279
280 * options.c: remove n (for length) from scm_option_X
281 functions. Detect option list length by looking for NULL name.
282
283 2007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
284
285 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
286 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
287 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
288 added by `make-vtable-vtable'. Reported by Marco Maggi.
289
290 2007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
291
292 * throw.c (scm_ithrow): more refined error message: print symbols
293 too.
294
295 2007-01-16 Kevin Ryde <user42@zip.com.au>
296
297 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
298 implementing `set-program-arguments'.
299
300 * filesys.c (scm_init_filesys): Use scm_from_int rather than
301 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
302 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
303 O_LARGEFILE. These are all int not long, per arg to open().
304 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
305 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
306 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
307 an int arg to fcntl.
308
309 * posix.c (scm_putenv): Correction to "len" variable, was defined only
310 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
311 Move it to where it's used. Reported by Hugh Sasse.
312
313 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
314 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
315 meant #\nul in the input (detected by scm_to_locale_string) and a bad
316 flags arg (detected by scm_to_int) would throw from a critical
317 section, causing an abort().
318
319 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
320 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
321 REG_NOTEOL; they're all ints not longs (per args to regcomp and
322 regexec).
323
324 2007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
325
326 * throw.c (scm_ithrow): print out key symbol and string arguments
327 when error happens inside a critical section, and document why.
328
329 2007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
330
331 * read.c (s_scm_read_hash_extend): document #f argument to
332 read-hash-extend.
333
334 2007-01-04 Kevin Ryde <user42@zip.com.au>
335
336 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
337 scm_minor_version, scm_micro_version, scm_effective_version,
338 scm_version, scm_init_version): Use SCM_API instead of just extern,
339 for the benefit of mingw. Reported by Cesar Strauss.
340
341 2007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
342
343 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
344 too.
345 (gc_update_stats): update scm_gc_cells_allocated_acc too.
346
347 2006-12-27 Kevin Ryde <user42@zip.com.au>
348
349 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
350 the basic scm_get_stack_base. As advised by Nils Durner.
351
352 * threads.c (get_thread_stack_base): Add a version using
353 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
354 As advised by Heikki Lindholm.
355
356 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
357 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
358 Durner.
359
360 2006-12-24 Kevin Ryde <user42@zip.com.au>
361
362 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
363 error if pid is not our own process, instead of silently doing nothing.
364
365 * print.c (scm_write, scm_display, scm_write_char): Disable port close
366 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
367 check in configure.in unintentionally enabled it. Believe that
368 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
369 can leave errno in that state. popen.test "no duplicates" output test
370 provoked that.
371
372 2006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
373
374 * numbers.c (scm_i_fraction_reduce): move logic into
375 scm_i_make_ratio(), so fractions are only read.
376 scm_i_fraction_reduce() modifies a fraction when reading it. A
377 race condition might lead to fractions being corrupted by reading
378 them concurrently.
379
380 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
381 comparisons between reduced and unreduced fractions go wrong.
382
383 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
384 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
385 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
386 SCM_FRACTION_REDUCED.
387
388 2006-12-16 Kevin Ryde <user42@zip.com.au>
389
390 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
391 more direct for a procedure called raise.
392 (kill): Remove mingw fake fallback.
393
394 2006-12-15 Kevin Ryde <user42@zip.com.au>
395
396 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
397 _pipe on mingw.
398
399 2006-12-14 Kevin Ryde <user42@zip.com.au>
400
401 * threads.c (thread_print): Cope with the case where pthread_t is a
402 struct, as found on mingw. Can't just cast to size_t for printing.
403 Reported by Nils Durner.
404
405 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
406 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
407
408 2006-12-13 Kevin Ryde <user42@zip.com.au>
409
410 * eval.c (scm_m_define): Set 'name procedure property on any
411 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
412 procedures with setters as used in srfi-17.
413
414 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
415 linux man page says is a possibility.
416
417 2006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
418
419 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
420 instead of RES (reported by Szavai Gyula). This allows the use of
421 negative lower bounds.
422 (scm_i_read_array): Make sure LEN is non-negative (reported by
423 Szavai Gyula).
424
425 (scm_array_in_bounds_p): Iterate over S instead of always
426 comparing indices with the bounds of S[0]. This fixes
427 `array-in-bounds?' for arrays with a rank greater than one and
428 with different lower bounds for each dimension.
429
430 2006-12-05 Kevin Ryde <user42@zip.com.au>
431
432 * numbers.c (scm_product): For flonum*inum and complex*inum, return
433 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
434 and as per R5RS section "Exactness".
435
436 2006-12-03 Kevin Ryde <user42@zip.com.au>
437
438 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
439 allow $AWK from the environment to override. It had syntax gremlins,
440 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
441 Makefile stopped it having any effect. Use just $(AWK), which can be
442 overridden with "make AWK=xxx" in the usual way if desired.
443
444 2006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
445
446 * libguile/vectors.c (scm_vector_to_list): Fixed list
447 construction: elements were not copied when INC is zero (see
448 "shared array" example in `vectors.test'). Reported by
449 Szavai Gyula.
450
451 2006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
452
453 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
454 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
455 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
456 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
457 (DOT_X_FILES): Added `gettext.x'.
458 (DOT_DOC_FILES): Likewise.
459 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
460 (modinclude_HEADERS): Added `gettext.h'.
461 (EXTRA_DIST): Added `libgettext.h'.
462
463 * gettext.h: Renamed to...
464 * libgettext.h: New file.
465
466 * i18n.c: Renamed to...
467 * gettext.c: New file.
468
469 * i18n.h: Renamed to...
470 * gettext.h: New file.
471
472 * i18n.c, i18n.h, locale-categories.h: New files.
473
474 * init.c: Include "libguile/gettext.h" instead of
475 "libguile/i18n.h".
476 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
477 `scm_init_i18n ()'.
478
479 * posix.c: Include "libguile/gettext.h" instead of
480 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
481 (USE_GNU_LOCALE_API): New macro.
482 (scm_i_locale_mutex): New variable.
483 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
484
485 * posix.h: Include "libguile/threads.h".
486 (scm_i_locale_mutex): New declaration.
487
488 2006-11-17 Neil Jerram <neil@ossau.uklinux.net>
489
490 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
491
492 2006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
493
494 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
495 "sweep_stats" arguments; use them instead of accessing the global
496 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
497
498 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
499 before each iteration of the loop.
500 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
501 (scm_i_get_new_heap_segment): Take an additional argument
502 SWEEP_STATS. Compute MIN_CELLS as a function of it.
503
504 * libguile/gc.c (scm_gc_cells_collected,
505 scm_gc_cells_collected_1): Removed.
506 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
507 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
508 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
509 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
510 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
511 `scm_gc_cells_(collected|swept)'.
512 (gc_update_stats): New.
513 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
514 `scm_i_gc_sweep_stats_1' instead of the former globals.
515 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
516 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
517 would keep allocating new segments instead of re-using collected
518 cells (because `scm_gc_cells_collected' would remain zero).
519
520 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
521 scm_gc_cell_yield_percentage): Removed.
522
523 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
524 (scm_i_adjust_min_yield): Updated.
525 (scm_i_get_new_heap_segment): Updated.
526
527 2006-11-02 Neil Jerram <neil@ossau.uklinux.net>
528
529 * modules.c: Correct comment saying that low-level environments
530 will be used "in the next release".
531
532 * init.c: Comment out #include of environments.h.
533 (scm_i_init_guile): Comment out scm_environments_prehistory() and
534 scm_init_environments() calls.
535
536 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
537 (DOT_X_FILES): Remove environments.x.
538 (DOT_DOC_FILES): Remove environments.doc.
539 (modinclude_HEADERS): Remove environments.h.
540
541 2006-10-25 Neil Jerram <neil@ossau.uklinux.net>
542
543 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
544
545 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
546 scm_ia64_register_backing_store_base() instead of Linux-specific
547 implementations.
548
549 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
550 New declarations.
551
552 * gc.c (__libc_ia64_register_backing_store_base): Declaration
553 removed.
554 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
555 implementations for Linux and HP-UX.
556
557 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
558 and scm_ia64_register_backing_store_base() instead of
559 Linux-specific implementations.
560
561 * continuations.h (__libc_ia64_register_backing_store_base):
562 Declaration removed.
563 (scm_t_contregs): New "fresh" field.
564
565 * continuations.c (ia64_getcontext): Removed.
566 (scm_make_continuation): Use continuation fresh field instead of
567 interpreting getcontext return values (which isn't portable). Use
568 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
569 instead of Linux-specific implementations.
570 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
571 instead of Linux-specific implementation.
572
573 * _scm.h (__ia64__): Also detect __ia64.
574
575 2006-10-03 Kevin Ryde <user42@zip.com.au>
576
577 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
578 arguments or 3 or more arguments. Previously 0 called proc with
579 SCM_UNDEFINED, and 3 or more silently used just the first 2.
580
581 2006-09-28 Kevin Ryde <user42@zip.com.au>
582
583 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
584 for chsize fallback, instead of hard-coding mingw. Mingw in fact
585 supplies ftruncate itself these days.
586
587 * ports.c (fcntl.h): Can include this unconditionally, no need for
588 __MINGW32__.
589
590 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
591 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
592 "off_t" for parameters, per usual definition of this function, rather
593 than "char *" and "int". Use ftruncate instead of chsize. Check for
594 error on final close.
595
596 2006-09-27 Kevin Ryde <user42@zip.com.au>
597
598 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
599 in mingw.
600
601 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
602 const *" for mingw to suppress warnings from gcc (which are errors
603 under the configure default -Werror). Reported by Nils Durner.
604
605 2006-09-26 Kevin Ryde <user42@zip.com.au>
606
607 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
608 * fports.c (scm_open_file): Use open_or_open64.
609 (fport_seek_or_seek64): New function, adapting fport_seek.
610 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
611 functions.
612 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
613 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
614
615 * ports.c (scm_truncate_file): Update docstring per manual.
616
617 2006-09-23 Kevin Ryde <user42@zip.com.au>
618
619 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
620 functions.
621
622 2006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
623
624 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
625 (make_predset, define_predset, make_strset, define_strset, false,
626 true): Removed.
627 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
628 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
629 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
630 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
631 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
632 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
633 (define_charset, scm_srfi_14_compute_char_sets): New functions.
634 (scm_init_srfi_14): Use `define_charset ()' instead of
635 `define_predset ()' and `define_strset ()'.
636
637 * srfi-14.h (scm_c_init_srfi_14): Removed.
638 (scm_srfi_14_compute_char_sets): New declaration.
639
640 * posix.h: Include "srfi-14.h".
641 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
642 successful `setlocale ()' call.
643
644 2006-09-08 Kevin Ryde <user42@zip.com.au>
645
646 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
647 (scm_recvfrom): Update docstring from manual.
648
649 2006-08-31 Rob Browning <rlb@defaultvalue.org>
650
651 * ports.c (scm_c_port_for_each): Add a
652 scm_remember_upto_here_1(ports) at the end of the function to fix
653 a GC bug.
654
655 2006-08-28 Neil Jerram <neil@ossau.uklinux.net>
656
657 * backtrace.c (scm_display_backtrace_with_highlights): Minor
658 improvements to docstring.
659 (scm_backtrace_with_highlights): Analogous improvements.
660
661 2006-08-12 Kevin Ryde <user42@zip.com.au>
662
663 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
664 New, set from configure.
665 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
666 to scmconfig.h.
667 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
668 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
669 Reported by Claes Wallin.
670
671 2006-08-11 Neil Jerram <neil@ossau.uklinux.net>
672
673 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
674 frame, not a stack).
675
676 2006-07-25 Kevin Ryde <user42@zip.com.au>
677
678 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
679 on pthreads version, since pthread_getattr_np not available on solaris
680 and macos. Reported by Claes Wallin.
681
682 2006-07-24 Kevin Ryde <user42@zip.com.au>
683
684 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
685 it's a macro on MacOS X. Reported by Claes Wallin.
686
687 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
688 for the benefit of Solaris 10. Reported by Claes Wallin.
689
690 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
691 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
692
693 2006-07-21 Kevin Ryde <user42@zip.com.au>
694
695 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
696 autoconf recommendation. Should fix Solaris 10 reported by Claes
697 Wallin.
698
699 * threads.c: Include <string.h>, needed for memset() which is used by
700 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
701
702 2006-07-18 Rob Browning <rlb@defaultvalue.org>
703
704 * continuations.c: Add __attribute__ ((returns_twice)) to the
705 ia64_getcontext prototype so that gcc will make the right
706 arrangements and avoid an illegal instruction during
707 call-with-current-continuation.
708
709 2006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
710
711 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
712 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
713
714 2006-07-08 Kevin Ryde <user42@zip.com.au>
715
716 * environments.c (core_environments_unobserve): Use if/else rather
717 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
718 about them not being rvalues. Reported by Mike Gran.
719
720 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
721 portable and in particular fails on OpenBSD and AIX (see autoconf
722 manual too). Reported by Mike Gran.
723
724 2006-06-25 Kevin Ryde <user42@zip.com.au>
725
726 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
727 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
728 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
729 HAVE_TM_ZONE.
730 (scm_strptime): Use tm_gmtoff from the strptime result when that field
731 exists, it's set by glibc strptime "%s".
732
733 2006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
734
735 * eq.c: Include "struct.h", "goops.h" and "objects.h".
736 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
737 are not GOOPS instances.
738 * struct.c: Include "eq.h".
739 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
740 hand-written code.
741 (scm_i_struct_equalp): New.
742 * struct.h (scm_i_struct_equalp): New declaration.
743
744 2006-06-06 Kevin Ryde <user42@zip.com.au>
745
746 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
747 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
748 reported by Mattias Holm.
749
750 2006-06-03 Kevin Ryde <user42@zip.com.au>
751
752 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
753 unused variable warning when elisp disabled. Reported by Ryan
754 VanderBijl.
755
756 * throw.c (scm_handle_by_message): Add dummy return value to avoid
757 compiler warning on cygwin. Reported by Ryan VanderBijl.
758
759 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
760 duplicate of EXTRA_DOT_DOC_FILES.
761 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
762 Add scmconfig.h to dependencies, since these all run cpp. Helps a
763 parallel "make -j2". Reported by Mattias Holm.
764
765 2006-05-30 Kevin Ryde <user42@zip.com.au>
766
767 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
768 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
769 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
770 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
771 port type descriptor, same as scm_make_port_type return value.
772
773 2006-05-30 Marius Vollmer <mvo@zagadka.de>
774
775 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
776 of the arguments is a array. This allows vectors to be equal to
777 one-dimensional arrays.
778
779 2006-05-29 Marius Vollmer <mvo@zagadka.de>
780
781 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
782 that we have a pair before accessing its cdr. Thanks to Bill
783 Schottstaedt!
784
785 2006-05-28 Kevin Ryde <user42@zip.com.au>
786
787 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
788 by "The Senator".
789
790 2006-05-27 Marius Vollmer <mvo@zagadka.de>
791
792 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
793 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
794
795 2006-05-26 Kevin Ryde <user42@zip.com.au>
796
797 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
798 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
799 Reported by "The Senator".
800 For select and ioctl, move fdes into those conditionals, to avoid
801 unused variable warning when neither of those used.
802
803 2006-05-23 Kevin Ryde <user42@zip.com.au>
804
805 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
806 It's unused and will be in stdio.h anyway (if it's anywhere).
807
808 2006-05-20 Kevin Ryde <user42@zip.com.au>
809
810 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
811 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
812
813 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
814 symlink). Probably can't create symlinks with mknod anyway though.
815
816 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
817 generation.
818
819 2006-05-15 Kevin Ryde <user42@zip.com.au>
820
821 * simpos.c, simpos.h (scm_primitive__exit): New function.
822 (scm_primitive_exit): Update docstring, no longer the best exit after
823 a fork.
824
825 2006-05-09 Kevin Ryde <user42@zip.com.au>
826
827 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
828 rather than converting to doubles, to avoid inf or nan when the inputs
829 are too big for a double but the quotient does fit. This affects
830 conversions exact->inexact of big fractions.
831
832 * filesys.c (scm_open_fdes): Use open64.
833 (scm_init_filesys): Add O_LARGEFILE.
834
835 * ports.c (scm_seek): Use lseek64.
836 (scm_truncate_file): Use ftruncate64.
837
838 2006-05-08 Marius Vollmer <mvo@zagadka.de>
839
840 * private-gc.h (CELL_P): Also check that the potential pointer is
841 correctly aligned for a cell. Thanks to Miroslav Lichvar!
842
843 2006-04-18 Rob Browning <rlb@defaultvalue.org>
844
845 * _scm.h: Add back error if the size of off_t is unknown. The bug
846 was actually in guile-readline's configuration.
847
848 2006-04-18 Kevin Ryde <user42@zip.com.au>
849
850 * posix.c (scm_mkstemp): Update docstring from the manual, in
851 particular file mode 0600 is not guaranteed.
852
853 2006-04-17 Kevin Ryde <user42@zip.com.au>
854
855 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
856 size, to help the guile-readline build where off_t is unused.
857
858 2006-04-16 Kevin Ryde <user42@zip.com.au>
859
860 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
861 (scm_readdir): Use readdir64.
862 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
863 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
864 and ftruncate take off_t not size_t.
865 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
866 available.
867
868 2006-04-06 Kevin Ryde <user42@zip.com.au>
869
870 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
871 instead of toggling it. Reported by Ludovic Courtès.
872
873 2006-03-26 Marius Vollmer <mvo@zagadka.de>
874
875 * threads.c (get_thread_stack_base): Use scm_get_stack_base
876 instead of accessing __libc_stack_end directly, and only do this
877 when pthread_attr_getstack is known not to work for the main
878 thread or when not using pthreads at all.
879
880 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
881 unknown instead of returning NULL.
882
883 2006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
884
885 * numbers.c (scm_i_mem2number): Renamed to
886 scm_c_locale_stringn_to_number.
887 * numbers.c, print.c, read.c: Updated callers.
888 * numbers.h: Update function declaration.
889
890 2006-03-11 Neil Jerram <neil@ossau.uklinux.net>
891
892 * unif.c (string_set): Don't return in a void function. (Reported
893 by Mike Gran.)
894
895 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
896 rather than void*, so we can do pointer arithmetic on it.
897 (Reported by Mike Gran.)
898 (s_scm_uniform_vector_write): Ditto.
899
900 2006-03-10 Neil Jerram <neil@ossau.uklinux.net>
901
902 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
903 oldra is not an array. (Reported by Steve Juranich.)
904
905 * threads.c (do_unlock): Renamed from "unlock", which is defined
906 in unistd.h on QNX. (Reported by Matt Kraai.)
907
908 2006-03-04 Kevin Ryde <user42@zip.com.au>
909
910 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
911 not SCM_CRITICAL_SECTION_START.
912
913 * eval.c, posix.c: Change comments from C++ to C style. Reported by
914 Mike Gran.
915
916 2006-02-28 Kevin Ryde <user42@zip.com.au>
917
918 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
919
920 2006-02-26 Kevin Ryde <user42@zip.com.au>
921
922 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
923 NAME_MAX is not available, which is so on Solaris 10. Report and help
924 by Bill Schottstaedt.
925
926 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
927 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
928 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
929 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
930 use "unsigned char", not signed char. This ensures comparisons are
931 the same as `char<?' etc, and is also the same as guile 1.6 did.
932 Reported by Sven Hartrumpf.
933
934 2006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
935
936 * random.c: Test for SCM_HAVE_T_UINT64 instead of
937 SCM_HAVE_T_INT64.
938 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
939 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
940 scm_t_int32.
941
942 2006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
943
944 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
945 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
946 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
947 Take into account SEG->SPAN when computing CELLS_SWEPT.
948 (scm_i_sweep_segment): Take one more argument, similarly.
949 (scm_i_sweep_all_segments): Likewise.
950 (scm_i_sweep_some_segments): Likewise.
951 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
952 refer to SCM_GC_CELLS_COLLECTED.
953
954 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
955 argument, an `scm_i_sweep_statistics' object.
956 Change the way DELTA is collected: don't take into account
957 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
958
959 * gc-malloc.c (scm_realloc): Pass an extra argument
960 to `scm_i_sweep_all_segments ()'.
961
962 * gc.c (gc_start_stats): Updated accordingly.
963 (gc_end_stats): Take an additional SWEEP_STATS argument.
964 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
965 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
966 Decrement SCM_CELLS_ALLOCATED.
967 (scm_i_gc): Likewise.
968
969 * private-gc.h (scm_i_sweep_*): Updated function
970 prototypes accordingly.
971 (scm_t_sweep_statistics): New type.
972 (scm_i_sweep_statistics_init): New macro.
973 (scm_i_sweep_statistics_sum): New macro
974
975 2006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
976
977 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
978 LEN. Without this, too much collectable memory gets unregistered,
979 which results in an underflow of SCM_MALLOCATED in
980 `decrease_mtrigger()'.
981
982 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
983 equal to SCM_MALLOCATED.
984
985 2006-02-13 Marius Vollmer <mvo@zagadka.de>
986
987 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
988 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
989 configured --without-threads.
990 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
991
992 2006-02-12 Marius Vollmer <mvo@zagadka.de>
993
994 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
995 filling when the fill parameter is omitted, as documented, but
996 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
997 can not store characters.
998
999 2006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1000
1001 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1002 on to scm_fill_sockaddr call.
1003
1004 2006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1005
1006 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1007 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1008
1009 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1010 (struct pre_unwind_data): New, replaces struct lazy_catch.
1011 (scm_c_catch): New, replaces scm_internal_catch as the primary
1012 catch API for C code; adds pre-unwind handler support.
1013 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1014 compatibility.
1015 (tc16_pre_unwind_data, pre_unwind_data_print,
1016 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1017 "lazy_catch" equivalents.
1018 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1019 as the primary C API for a "lazy" catch.
1020 (scm_internal_lazy_catch): Now just a wrapper for
1021 scm_c_with_throw_handler, for back compatibility.
1022 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1023 pre-unwind handler support.
1024 (scm_catch): Now just a wrapper for
1025 scm_catch_with_pre_unwind_handler, for back compatibility.
1026 (scm_with_throw_handler): New.
1027 (scm_lazy_catch): Update comment to say that the handler can
1028 return, and what happens if it does.
1029 (toggle_pre_unwind_running): New.
1030 (scm_ithrow): When identifying the throw target, take running
1031 flags into account. In general, change naming of things from
1032 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1033 don't unwind the dynamic context first. Add dynwind framing to
1034 manage the running flag of a throw handler. If a lazy catch or
1035 throw handler returns, rethrow the same exception again. Add
1036 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1037
1038 * root.c (scm_internal_cwdr): Add NULL args to
1039 scm_i_with_continuation_barrier call.
1040
1041 * dynwind.c: Change comment mentioning lazy-catch to mention
1042 pre-unwind data and throw handler also.
1043
1044 * continuations.h (scm_i_with_continuation_barrier): Add
1045 pre-unwind handler args.
1046
1047 * continuations.c (scm_i_with_continuation_barrier): Add
1048 pre-unwind handler args, and pass on to scm_c_catch (changed from
1049 scm_internal_catch).
1050 (c_handler): Remove scm_handle_by_message_noexit call.
1051 (scm_c_with_continuation_barrier): Call
1052 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1053 as the pre-unwind handler.
1054 (scm_handler): Remove scm_handle_by_message_noexit call.
1055 (s_scm_with_continuation_barrier): Call
1056 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1057 as the pre-unwind handler.
1058
1059 2006-02-04 Kevin Ryde <user42@zip.com.au>
1060
1061 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1062
1063 2006-02-03 Kevin Ryde <user42@zip.com.au>
1064
1065 * list.c, list.h (scm_list): Restore this function for use from C.
1066 It's a complete no-op but in theory might used by someone.
1067
1068 2006-01-30 Marius Vollmer <mvo@zagadka.de>
1069
1070 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1071 so that it gets unlocked in all cases.
1072 (SCM_APPLY, CEVAL): Likewise.
1073
1074 2006-01-29 Marius Vollmer <mvo@zagadka.de>
1075
1076 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1077 scm_is_typed_array instead.
1078
1079 Renamed the "frames" that are related to dynamic-wind to "dynamic
1080 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1081 Updated documentation.
1082
1083 Disabled "futures":
1084
1085 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1086 * eval.c, init.c: Comment out all 'future' related things.
1087
1088 2006-01-28 Marius Vollmer <mvo@zagadka.de>
1089
1090 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1091 to inline.h to make it inline.
1092
1093 2005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
1094
1095 * strings.c (scm_i_take_stringbufn): New.
1096 (scm_i_c_take_symbol): New.
1097 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1098
1099 * strings.h (scm_i_c_take_symbol): New.
1100 (scm_i_take_stringbufn): New.
1101
1102 * symbols.c (lookup_interned_symbol): New function.
1103 (scm_i_c_mem2symbol): New function.
1104 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1105 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1106 creating a new Scheme string.
1107 (scm_from_locale_symboln): Likewise.
1108 (scm_take_locale_symbol): New.
1109 (scm_take_locale_symboln): New.
1110
1111 * symbols.h (scm_take_locale_symbol): New.
1112 (scm_take_locale_symboln): New.
1113
1114 2006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1115
1116 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1117 free_count.
1118
1119 2005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1120
1121 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1122 upon error
1123
1124 2005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1125
1126 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
1127 the GC when allocated_fluids_len is zero.
1128
1129 2005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1130
1131 * load.c (the_reader, the_reader_fluid_num): New.
1132 (scm_primitive_load): Support custom reader.
1133 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1134 the_reader as `current-reader'.
1135
1136 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1137 (rather than an uninitialized pointer on the stack).
1138
1139 2005-12-07 Marius Vollmer <mvo@zagadka.de>
1140
1141 Reported by Bruce Korb:
1142
1143 * init.c (invoke_main_func): Don't call exit here. Throws that
1144 are only caught by scm_with_guile will bypass us and would cause
1145 scm_boot_guile to return erroneously.
1146 (scm_boot_guile): Expect scm_with_guile to return and call exit
1147 here, passing it an appropriate exit code.
1148
1149 From Andy Wingo:
1150
1151 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1152 unsigned char cast to an int, or -1 for EOS.
1153
1154 2005-12-06 Marius Vollmer <mvo@zagadka.de>
1155
1156 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1157 non-const.
1158 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
1159
1160 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1161 scm_enter_guile): Removed from public API. See comment at
1162 scm_without_guile for the rationale.
1163
1164 * scmsigs.c (read_without_guile): New.
1165 (signal_delivery_thread): Use it instead of
1166 scm_leave_guile/read/scm_enter_guile.
1167
1168 From Stephen Compall:
1169
1170 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1171 (CEVAL): Evaluate SRFI 61 cond clauses.
1172
1173 2005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
1174
1175 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1176 This was typically hit when running `gc-live-object-stats' right
1177 after starting Guile.
1178
1179 2005-11-30 Kevin Ryde <user42@zip.com.au>
1180
1181 * srfi-13.c (scm_string_append_shared): No copying if just one
1182 non-empty string in args.
1183
1184 2005-11-26 Kevin Ryde <user42@zip.com.au>
1185
1186 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
1187 by Ludovic Courtès.
1188
1189 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1190 "register".
1191
1192 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1193 scm_malloc returning NULL, it never does that.
1194 * putenv.c (putenv): Likewise.
1195
1196 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1197 much too big to want to inline.
1198
1199 2005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
1200
1201 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1202 the value at its top. This fixes a reference leak.
1203 (PUSH_REF): Perform `pstate->top++' after calling
1204 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1205 effects.
1206
1207 2005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
1208
1209 * gc.c (scm_weak_vectors): Removed.
1210
1211 2005-11-12 Kevin Ryde <user42@zip.com.au>
1212
1213 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
1214 by Ludovic Courtès.
1215
1216 2005-11-07 Marius Vollmer <mvo@zagadka.de>
1217
1218 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1219 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1220 section might exit non-locally.
1221
1222 2005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1223
1224 * eval.c (sym_instead): New symbol.
1225 (ENTER_APPLY): Remove optional use of a continuation when making
1226 trap call.
1227 (scm_debug_opts): Change doc for 'cheap option to make clear that
1228 it is now obsolete.
1229 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1230 making trap calls, and implement substitution of eval expressions
1231 and return values using the values that the trap call handlers
1232 return.
1233
1234 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1235
1236 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
1237
1238 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1239 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1240 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1241 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1242 scm_c_make_socket_address): New functions.
1243 * socket.h: Add prototypes.
1244
1245 2005-10-24 Kevin Ryde <user42@zip.com.au>
1246
1247 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1248 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1249 POSIX spec examples, the latter are not available on for instance
1250 NetBSD.
1251
1252 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1253 posix.texi.
1254
1255 * stime.c (scm_strftime): Update docstring from posix.texi.
1256
1257 2005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1258
1259 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1260
1261 * null-threads.h, pthread-threads.h
1262 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1263 (scm_i_pthread_mutexattr_recursive): New.
1264
1265 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1266 (scm_i_critical_section_mutex): Do not initialize statically.
1267 (scm_threads_prehistory): Initialize
1268 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1269 here.
1270
1271 * eval.c (source_mutex): Do not initialiaze statically.
1272 (scm_init_eval): Do it here, using
1273 scm_i_pthread_mutexattr_recursive.
1274
1275 2005-09-05 Marius Vollmer <mvo@zagadka.de>
1276
1277 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1278 New.
1279 (sym_reader): New.
1280 (scm_print_opts): Added "quote-keywordish-symbols" option.
1281 (quote_keywordish_symbol): New, for evaluating the option.
1282 (scm_print_symbol_name): Use it.
1283 (scm_init_print): Initialize new option to sym_reader.
1284
1285 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1286
1287 * eval.c (eval_letrec_inits): New.
1288 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1289
1290 2005-08-12 Marius Vollmer <mvo@zagadka.de>
1291
1292 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1293 Peter Gavin!
1294
1295 2005-08-12 Kevin Ryde <user42@zip.com.au>
1296
1297 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1298
1299 2005-08-06 Kevin Ryde <user42@zip.com.au>
1300
1301 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1302 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1303 scm_string_index, scm_string_index_right, scm_string_skip,
1304 scm_string_skip_right, scm_string_count, scm_string_map,
1305 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1306 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1307 procedures called in loops.
1308
1309 2005-08-02 Kevin Ryde <user42@zip.com.au>
1310
1311 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1312 avoid lots of copying where previoulsy growing by only 80 bytes at a
1313 time.
1314
1315 2005-08-01 Marius Vollmer <mvo@zagadka.de>
1316
1317 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1318 already have scm_lookup_closure_module, which does the same thing.
1319
1320 2005-08-01 Marius Vollmer <mvo@zagadka.de>
1321
1322 New marking algorithm for weak hashtables that fixes the problem
1323 that references from the non-weak value to the associated weak
1324 key (for example) would prevent the entry from ever being dropped.
1325
1326 Guardians have been changed back to their original semantics and
1327 are no longer greedy and no longer drop cycles.
1328
1329 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1330 hashtable and guardian machinery but call the relevant functions
1331 directly.
1332
1333 * guardians.h, guardians.c, deprecated.h,
1334 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1335 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1336 Deprecated and moved into deprecated.[ch].
1337
1338 * guardians.h, guardians.c: Mostly rewritten.
1339 (scm_i_init_guardians_for_gc,
1340 scm_i_identify_inaccessible_guardeds,
1341 scm_i_mark_inaccessible_guardeds): New.
1342 (scm_make_guardian): Removed greedy_p argument.
1343
1344 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1345 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1346 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1347 (scm_weaks_prehistory): Removed.
1348 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1349 scm_i_mark_weak_vectors_non_weaks,
1350 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1351 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1352 scm_scan_weak_vectors): Removed.
1353
1354 * hashtab.h (scm_i_scan_weak_hashtables): New.
1355 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1356 SCM_WVECTF_NOSCAN.
1357 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1358 t->n_items.
1359 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1360 to latter. Do not scan the alists themselves, this is done by the
1361 weak vector code now. Just update the element count.
1362
1363 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1364 to latter. The type is now only part of the cell word.
1365 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1366
1367 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1368
1369 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1370
1371 Some changes towards making it possible to run Guile on the EM64T
1372 platform.
1373
1374 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1375 mallocating for (unsigned long *bounds).
1376
1377 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1378 scm_t_bits before storing them in the type word.
1379
1380 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1381 scm_t_bits to int.
1382
1383 2005-07-12 Kevin Ryde <user42@zip.com.au>
1384
1385 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1386 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1387 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1388 than scm_makfrom0str.
1389 Reported by Ken Raeburn.
1390
1391 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1392 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1393 returning SCM_GC_CARD_BVEC.
1394
1395 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1396 rather than latin-1 acute accent, the latter may not print on all
1397 terminals.
1398
1399 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1400 trailing deletions, so as to return a substring if those are the only
1401 changes.
1402
1403 2005-07-10 Kevin Ryde <user42@zip.com.au>
1404
1405 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1406 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1407 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1408 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1409
1410 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1411
1412 * gc-card.c (scm_i_card_statistics): init tag.
1413
1414 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1415
1416 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1417
1418 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1419 string.
1420
1421 2005-06-25 Kevin Ryde <user42@zip.com.au>
1422
1423 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1424 last change, use plain copy-on-write substrings, the individual
1425 descriptions in the srfi don't mention shared storage (only the
1426 introduction does).
1427
1428 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1429 null-terminator, rather than mallocing a whole new block.
1430 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1431
1432 2005-06-12 Marius Vollmer <mvo@zagadka.de>
1433
1434 * ramap.c (scm_array_index_map_x): First test for real arrays,
1435 then check for generalized vectors. This ensures that the
1436 generalized vector case need only work with zero-origin ranges.
1437 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1438 to access the target array, making these functions work with all
1439 kinds of arrays, not just bit arrays.
1440
1441 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1442 gh_list.c, gh_predicates.c: Deprecated everything.
1443
1444 * environments.c (environment_default_folder,
1445 environment_default_observer): Do not use gh_call3, gh_call1.
1446
1447 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1448
1449 * modules.c (s_scm_eval_closure_module): new function. Return the
1450 module inside an eval-closure.
1451
1452 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1453 table. This means that procedure properties are GC'd if the
1454 procedure dies.
1455
1456 2005-06-11 Kevin Ryde <user42@zip.com.au>
1457
1458 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1459 charset cases, count chars kept and build a string in a second pass,
1460 rather than using a cons cell for every char kept. Use a shared
1461 substring when nothing removed (such sharing is allowed by the srfi).
1462
1463 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1464
1465 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1466 string, so live object stats can be sorted with string<?.
1467
1468 2005-06-06 Marius Vollmer <mvo@zagadka.de>
1469
1470 * print.c (iprin1): When writing a string, collect all characters
1471 that can be printed directly into one call to scm_lfwrite.
1472 Previously, every character was output with its own call to
1473 write(2) on unbuffered ports.
1474
1475 * eval.c (scm_eval_options_interface): Use
1476 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1477 and SCM_CRITICAL_SECTION_END.
1478
1479 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1480 check for generalized vectors. This ensures that the generalized
1481 vector case need only work with zero-origin ranges.
1482
1483 2005-06-06 Kevin Ryde <user42@zip.com.au>
1484
1485 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1486 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1487 matched.
1488
1489 2005-06-05 Marius Vollmer <mvo@zagadka.de>
1490
1491 * eval.c: Added comment on how to make case 1.1 of
1492 r5rs_pitfall.test succeed.
1493
1494 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1495
1496 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1497
1498 * socket.c: Remove obsolete comment about socklen_t.
1499 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1500
1501 * numbers.h (isnan)[__MINGW32__]: Remove.
1502
1503 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1504 DEFAULT_INCLUDES when cross compiling.
1505
1506 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1507
1508 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
1509 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1510 from Jan's patch.)
1511
1512 2005-05-22 Marius Vollmer <mvo@zagadka.de>
1513
1514 * unif.c (scm_make_shared_array): Add old base to new base since
1515 scm_array_handle_pos does not include the base.
1516 (scm_aind): Likewise.
1517
1518 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1519 output port.
1520
1521 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1522
1523 Mac OS X compile warning fixes, reported by Richard Todd.
1524
1525 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1526 that it is signed.
1527
1528 * strports.c (st_resize_port): Add unsigned char cast.
1529 (scm_mkstrport): Make read/write_buf cast unsigned.
1530
1531 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1532
1533 * rdelim.c (scm_read_line): Initialize slen.
1534
1535 * load.c (scm_search_path): Remove weird >=1, and add
1536 parentheses to clarify conditions.
1537
1538 * hash.c (scm_hasher): Add const unsigned char cast.
1539
1540 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1541
1542 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1543
1544 Fix C99isms reported by Ludovic Courtès:
1545
1546 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1547 code.
1548
1549 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1550 of code.
1551
1552 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1553 of code.
1554 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1555 and current.
1556
1557 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1558
1559 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1560 compile warning reported by Werner Scheinast.
1561
1562 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1563
1564 * list.h: remove scm_list()
1565
1566 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1567 SCM_DEBUG_CELL_ACCESSES
1568 (FLUID_NEXT_LOC): idem.
1569
1570 2005-04-30 Kevin Ryde <user42@zip.com.au>
1571
1572 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1573 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1574 zero when re==0 and im<0. Reported by Jean Crepeau.
1575
1576 2005-04-25 Kevin Ryde <user42@zip.com.au>
1577
1578 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
1579 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1580 few sensible uses (like filling with a random number generator say),
1581 but has been allowed in the past and so should be kept.
1582
1583 2005-04-23 Kevin Ryde <user42@zip.com.au>
1584
1585 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1586 scm_hash_fn_remove_x.
1587
1588 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1589 the caller when cons* is reached through apply.
1590
1591 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1592 list is called using apply, under the debugging evaluator.
1593 (scm_list): Remove.
1594
1595 * list.c, list.h (scm_make_list): New code, moving make-list from
1596 boot-9.scm.
1597
1598 2005-04-14 Kevin Ryde <user42@zip.com.au>
1599
1600 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1601 converted from scheme code in boot-9.scm.
1602
1603 2005-04-11 Kevin Ryde <user42@zip.com.au>
1604
1605 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1606 Validate list argument, scm_string_append and scm_string_append_shared
1607 don't do that to their rest argument (in a normal build).
1608
1609 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1610
1611 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1612 closure can not be stored since it is no longer valid at GC time.
1613 (make_hash_table): Initialize 'hash_fn' field.
1614 (scm_i_rehash): Only store hash_fn in hash table when closre is
1615 NULL.
1616 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1617 non-NULL. Always use a NULL closure.
1618 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1619 few entries.
1620
1621 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1622
1623 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1624 argument; always use scm_delq_x. The delete_fn function works on
1625 the handle, not the key, and it therefore makes no sense to make
1626 it configurable. Changed all callers.
1627 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1628 (scm_hash_clear): Accept plain vectors as hashtables.
1629 (scm_delx_x): Removed.
1630
1631 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1632
1633 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1634 compatibility with gcc -std=c99.
1635
1636 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1637
1638 * async.h (scm_mask_ints): Removed left over reference to
1639 scm_root.
1640
1641 * threads.c: Removed fprintf debug statements.
1642
1643 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1644
1645 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1646
1647 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1648
1649 * debug.c (scm_make_memoized): Remove unnecessary critical
1650 section, and simplify by using SCM_RETURN_NEWSMOB.
1651
1652 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1653
1654 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1655
1656 2005-03-18 Kevin Ryde <user42@zip.com.au>
1657
1658 * arbiters.c (FETCH_STORE) [generic C]: Should be
1659 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
1660
1661 2005-03-13 Kevin Ryde <user42@zip.com.au>
1662
1663 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1664 srfi-60.
1665
1666 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1667 because OR-ing bits into a negative can reduce the value to an inum.
1668
1669 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1670 casting inum to double since that can lose precision.
1671
1672 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1673
1674 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1675 (guilify_self_1): Initialize it.
1676
1677 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1678 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1679 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1680 field.
1681 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1682 recursively.
1683 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1684 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1685 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1686 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1687 scm_after_gc_c_hook here.
1688 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1689 scm_after_gc_c_hook when a full GC has in fact been performed.
1690 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1691
1692 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1693 scm_gc_heap_lock.
1694
1695 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1696 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1697
1698 * inline.h (scm_cell, scm_double_cell): Do not check
1699 scm_gc_running_p, allocation during sweeping is OK.
1700
1701 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1702 not set scm_block_gc.
1703
1704 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1705
1706 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1707 instead of scm_malloc. The latter can not be used during GC.
1708
1709 2005-03-09 Marius Vollmer <mvo@zagadka.de>
1710
1711 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1712 years.
1713
1714 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1715
1716 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1717 scm_gc_running_p. Sweeping can happen in parallel with
1718 allocation.
1719
1720 * inline.h: Updated comments for current threading implementation.
1721
1722 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1723 (scm_i_thread): Removed unused signal_asyncs field.
1724 (threads_mark): Do not mark it.
1725 (guilify_self_1): Do not initialize it. Do initialize
1726 continuation_root field.
1727 (do_thread_exit): Do not remove thread from all_threads list.
1728 (on_thread_exit): Do it here, after leaving guile mode.
1729 (sleep_level): Removed.
1730 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1731 returning. Do not support recursive sleeps.
1732 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1733 entry. Do not support recursive sleeps.
1734
1735 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1736 resize_all_states): Collapsed ensure_state_size and
1737 ensure_all_state_sizes into one function named resize_all_states.
1738 Allocate new vectors outside of single threaded region. Do only
1739 simple things inside that region.
1740 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1741 while adding to the global lists.
1742
1743
1744 2005-03-08 Marius Vollmer <mvo@zagadka.de>
1745
1746 libltdl is no longer distributed. We expect it to be installed
1747 already.
1748
1749 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1750 (libguile_la_LIBADD): Removed @LIBLTDL@.
1751
1752 2005-03-07 Marius Vollmer <mvo@zagadka.de>
1753
1754 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1755 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1756 they also block/unblock execution of asyncs and call
1757 scm_async_click which is declared in async.h but threads.h can not
1758 include async.h since async.h already includes threads.h.
1759 (scm_i_critical_section_level): New, for checking mistakes in the
1760 use of the SCM_CRITICAL_SECTION_* macros.
1761 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1762 critical sections can be nested.
1763
1764 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1765 not zero.
1766
1767 * threads.h, threads.c (scm_frame_lock_mutex): New.
1768 (scm_frame_critical_section): Take mutex as argument.
1769 (framed_critical_section_mutex): New, used as default for above.
1770 (scm_init_threads): Initialize it.
1771 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1772 scm_i_critical_section_mutex; both are initialized statically.
1773
1774 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1775 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
1776 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1777 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
1778
1779 * debug.c (scm_debug_options): Replace
1780 SCM_CRITICAL_SECTION_START/END with a frame and
1781 scm_frame_critical_section.
1782
1783 * continuations.c (scm_make_continuation): No longer a critical
1784 section.
1785 (scm_dynthrow): Abort when scm_i_critical_section_level is
1786 not zero.
1787
1788 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1789
1790 * threads.c (scm_try_mutex): Renamed argument for consistency.
1791
1792 * root.c (scm_call_with_dynamic_root): New docstring.
1793
1794 * eval.c: Define _GNU_SOURCE.
1795
1796 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1797
1798 Big merge from the mvo-thread-cleanup branch. The main changes
1799 are:
1800
1801 - The dynamic roots functionality has been split into dynamic
1802 states and continuations barriers. Fluids have been
1803 reimplemented and can now be garbage collected.
1804
1805 - Initialization of Guile now works in a multi-thread friendly
1806 manner. Threads can freely enter and leave guile mode.
1807
1808 - Blocking on mutexes or condition variables or while selecting
1809 can now be reliably interrupted via system asyncs.
1810
1811 - The low-level threading interface has been removed.
1812
1813 - Signals are delivered via a pipe to a dedicated 'signal delivery
1814 thread'.
1815
1816 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1817
1818 * throw.c (scm_handle_by_message): Exit only the current thread,
1819 not the whole process.
1820 (scm_handle_by_message_noexit): Exit when catching 'quit.
1821
1822 * scmsigs.c (take_signal, signal_delivery_thread,
1823 start_signal_delivery_thread, ensure_signal_delivery_thread,
1824 install_handler): Reimplemented signal delivery as explained in
1825 the comments.
1826
1827 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
1828 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
1829 scm_i_sched_yield, scm_i_pthread_sigmask,
1830 SCM_I_PTHREAD_MUTEX_INITIALIZER,
1831 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
1832 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
1833 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
1834 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
1835 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
1836 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
1837 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
1838 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
1839 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
1840 scm_i_pthread_key_create, scm_i_pthread_setspecific,
1841 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
1842 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
1843 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
1844 when using pthreads.
1845 * null-threads.c, null-threads.h: Provide dummy definitions for
1846 the above symbols when not using pthreads.
1847
1848 * modules.h, modules.c (scm_frame_current_module): New.
1849
1850 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
1851 instead of scm_internal_dynamic_wind.
1852
1853 * init.h, init.c (restart_stack, start_stack): Removed.
1854 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
1855 (scm_boot_guile_1): Removed.
1856 (scm_i_init_mutex): New.
1857 (really_cleanup_for_exit, cleanup_for_exit): New.
1858 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
1859 Moved around some init funcs. Call
1860 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
1861 with atexit.
1862
1863 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
1864 Use "!scm_is_eq" instead of "!=".
1865
1866 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
1867 SCM_USE_COOP_THREADS): Removed.
1868
1869 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
1870 maintained. Unlock scm_i_sweep_mutex before running
1871 scm_after_gc_c_hook.
1872 (scm_permanent_object): Allocate outside of critical section.
1873 (cleanup): Removed.
1874
1875 * fluids.h, fluids.c: Reimplemented completely.
1876 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
1877 SCM_FAST_FLUID_SET): Reimplemented as functions.
1878 (scm_is_fluid): New.
1879 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
1880 (scm_make_dynamic_state, scm_dynamic_state_p,
1881 scm_is_dynamic_state, scm_current_dynamic_state,
1882 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
1883 scm_c_with_dynamic_state, scm_with_dynamic_state,
1884 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
1885
1886 * feature.c (progargs_fluid): New.
1887 (scm_program_arguments, scm_set_program_arguments): Use it instead
1888 of scm_progargs.
1889 (scm_init_feature): Allocate it. Also, only add "threads" feature
1890 when SCM_USE_PTHREAD_THREADS is true.
1891
1892 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
1893 scm_make_rec_mutex, with all the consequences.
1894 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
1895 scm_internal_dynamic_wind. Handle dynamic states as second
1896 argument.
1897
1898 * threads.h, threads.c (scm_internal_select): Renamed to
1899 scm_std_select and discouraged old name.
1900 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
1901 and scm_std_usleep.
1902 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
1903 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
1904 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
1905 SCM_THREAD_DATA): Removed.
1906 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
1907 (scm_i_thread): New.
1908 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1909 Use scm_assert_smob_type.
1910 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
1911 scm_thread_self, scm_thread_yield, scm_mutex_init,
1912 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
1913 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
1914 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
1915 scm_cond_init, scm_cond_destroy, scm_cond_wait,
1916 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
1917 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
1918 scm_thread_select): Removed. Replaced with scm_i_pthread
1919 functions as appropriate.
1920 (scm_in_guile, scm_outside_guile): Removed.
1921 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
1922 take a ticket.
1923 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
1924 New.
1925 (scm_i_frame_single_threaded): New.
1926 (scm_init_threads_default_dynamic_state): New.
1927 (scm_i_create_thread): Removed.
1928 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
1929 (scm_make_recursive_mutex): New.
1930 (scm_frame_critical_section): New.
1931 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
1932 latter, changed all uses.
1933 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
1934 scm_i_set_last_debug_frame): New, use them instead of scm_root
1935 stuff.
1936 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
1937 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
1938 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
1939 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
1940 (remqueue): Allow the removal of already removed cells. Indicate
1941 whether a real removal has happened.
1942 (scm_thread): Removed, replaced with scm_i_thread.
1943 (make_thread, init_thread_creatant): Removed.
1944 (cur_thread): Removed.
1945 (block_self, unblock_from_queue): New.
1946 (block, timed_block, unblock): Removed.
1947 (guilify_self_1, guilify_self_2, do_thread_exit,
1948 init_thread_key_once, init_thread_key,
1949 scm_i_init_thread_for_guile, get_thread_stack_base,
1950 scm_init_guile): New initialisation method.
1951 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
1952 thread creation.
1953 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
1954 "fair" to fat and implemented new semantics, including reliable
1955 interruption.
1956 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
1957 (scm_threads_mark_stacks): Explicitly mark handle.
1958 (scm_std_select): Allow interruption by also selecting on the
1959 sleep_pipe.
1960 (scm_i_thread_put_to_sleep): Handle recursive requests for
1961 single-threadedness.
1962 (scm_threads_prehistory, scm_init_threads): Put current thread
1963 into guile mode via guileify_self_1 and guileify_self_2,
1964 respectively.
1965
1966 * fluid.h (SCM_FLUIDP): Deprecated.
1967
1968 * coop-threads.c: Removed.
1969
1970 * continuations.h, continuations.c (scm_with_continuation_barrier,
1971 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
1972 New.
1973
1974 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
1975 (async_mutex): New.
1976 (scm_async_click): Protected with async_mutex. Do not deal with
1977 signal_asyncs, which are gone. Set cdr of handled async cell to
1978 #f.
1979 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
1980 current sleep.
1981 (scm_system_async_mark_for_thread): Do not use scm_current_thread
1982 since that might not work during early initialization.
1983
1984 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
1985 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
1986 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
1987 and SCM_CRITICAL_SECTION_END.
1988 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
1989 SCM_CRITICAL_SECTION_START/END.
1990
1991 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
1992 (libguile_la_SOURCES): Added null-threads.c
1993 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
1994 threads-plugin.c.
1995 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
1996
1997 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
1998 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
1999 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2000 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2001 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2002 scm_make_root): Removed or deprecated. Replaced with references
2003 to the current thread, dynamic state, continuation barrier, or
2004 some fluid, as appropriate.
2005 (root_mark, root_print): Removed.
2006 (scm_internal_cwdr): Reimplemented guts with
2007 scm_frame_current_dynamic_state and
2008 scm_i_with_continuation_barrier.
2009 (scm_dynamic_root): Return current continuation barrier.
2010
2011
2012 2005-02-28 Marius Vollmer <mvo@zagadka.de>
2013
2014 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2015 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2016 cleanliness.
2017 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2018 IP_DROP_MEMBERSHIP.
2019 Thanks to Greg Troxel!
2020
2021 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2022
2023 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2024 block.
2025
2026 2005-02-25 Marius Vollmer <mvo@zagadka.de>
2027
2028 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2029 so that no two weak alist vectors share a spine.
2030 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2031 during GC before inserting the new alist cell.
2032
2033 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2034
2035 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2036 the hashtable.
2037 (scm_hash_fn_create_handle_x): Likewise.
2038 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2039
2040 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2041
2042 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2043 the prototypical examples mentioned in the old reference manual.
2044 Instead keep the old semantics of dispatching on type. (Yes, this
2045 is extremely ugly, but the whole point of keeping the deprecated
2046 interface is not to break old code.)
2047
2048 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2049
2050 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2051 scm_i_array_dims.
2052
2053 2005-01-28 Kevin Ryde <user42@zip.com.au>
2054
2055 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2056 integer-expt and multiply/divide. Inexacts and fractions no longer
2057 supported (they happened to work before for left shifts, but not
2058 right). Don't really need inexacts and fractions, since ash is
2059 documented as a "bitwise operation", and all the rest of those only
2060 take exact integers.
2061
2062 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2063
2064 * gc-card.c (scm_i_card_statistics): map structs, closures and
2065 subrs to one tag.
2066
2067 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
2068 (tag_table_to_type_alist): ignore unknown types.
2069
2070 * gc-segment.c (scm_i_all_segments_statistics): new function.
2071 (scm_i_heap_segment_statistics): new function
2072
2073 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2074 statistics on the number of live objects of each type.
2075
2076 * gc-card.c (scm_i_tag_name): new function.
2077 (scm_i_card_statistics): new function.
2078
2079 2005-01-24 Kevin Ryde <user42@zip.com.au>
2080
2081 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2082 POSIX and C99 don't document errno being set. Reported by Bruno
2083 Haible.
2084 (scm_flock): Update docstring from manual.
2085
2086 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2087 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2088 a 64-bit system.
2089
2090 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2091 sa_handler, needs to be a long on 64-bit systems where int is only 32
2092 bits.
2093
2094 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2095
2096 * environments.c (obarray_enter, obarray_replace): Call
2097 SCM_HASHTABLE_INCREMENT when adding a new entry.
2098
2099 * objects.c: Include goops.h for the scm_class_of prototype.
2100
2101 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2102 sizes to be smaller than the maximum lengths of vectors.
2103
2104 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2105
2106 * ports.c, smob.c: Include "libguile/goops.h".
2107
2108 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2109 scm_class_char, scm_class_pair, scm_class_procedure,
2110 scm_class_string, scm_class_symbol,
2111 scm_class_procedure_with_setter, scm_class_primitive_generic,
2112 scm_class_vector, scm_class_null, scm_class_real,
2113 scm_class_complex, scm_class_integer, scm_class_fraction,
2114 scm_class_unknown, scm_port_class, scm_smob_class,
2115 scm_no_applicable_method, scm_class_of): Moved from objects to
2116 goops since they are only useable once goops has been loaded.
2117 (scm_classes_initialized): Removed.
2118 (scm_class_of): Do not check it.
2119 (create_standard_classes): Do not set it.
2120
2121 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2122
2123 * objects.h, objects.c (scm_classes_initialized): New.
2124 (scm_class_of): Signal error when scm_classes_initialized is zero.
2125 * goops.c (create_standard_classes): Set scm_classes_initialized
2126 to one.
2127
2128 * random.c (scm_random_solid_sphere_x): Use
2129 scm_c_generalized_vector_length instead of
2130 scm_uniform_vector_length.
2131
2132 2005-01-16 Marius Vollmer <mvo@zagadka.de>
2133
2134 * script.c (scm_compile_shell_switches): Removed debugging output.
2135
2136 2005-01-15 Kevin Ryde <user42@zip.com.au>
2137
2138 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2139 docstrings from manual.
2140 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2141
2142 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2143
2144 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2145 its value.
2146
2147 Implement u64 and s64 uniform numeric vectors with bignums when
2148 scm_t_uint64 and scm_t_int64 are not available.
2149
2150 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2151 scm_array_handle_u64_elements,
2152 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2153 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2154 is not available.
2155 (scm_take_s64vector, scm_array_handle_s64_elements,
2156 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2157 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2158 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2159 scm_t_int64/scm_t_uint64 are not available.
2160 (uvec_mark): New, to mark the bignums.
2161 (alloc_uvec): Initialize bignums.
2162 (uvec_fast_ref): Return bignums directly.
2163 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2164 assert_exact_integer): New.
2165 (uvec_fast_set): Use them to validate the bignums.
2166 (scm_init_srfi_4): Set mark function of smob when needed.
2167 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2168 scm_int64_max.
2169
2170 Recognize 1.4 -e syntax.
2171
2172 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2173 (scm_compile_shell_switches): Use them to recognize and convert
2174 1.4 "-e" syntax.
2175
2176 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2177
2178 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2179 deprecated features that once were macros but are now functions
2180 back into macros.
2181
2182 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2183
2184 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2185 * deprecation.c (scm_issue_deprecation_warning,
2186 scm_c_issue_deprecation_warning_fmt): Use it.
2187 (mode): Removed.
2188 (print_summary): New.
2189 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2190 mode.
2191
2192 Deprecated SCM_ARRAY* macros.
2193
2194 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2195 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2196 version. Changed all uses.
2197 (scm_tc16_array, scm_i_tc16_array,
2198 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2199 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2200 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2201 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2202 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2203 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2204 SCM_ARRAY_V, SCM_I_ARRAY_V,
2205 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2206 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2207 scm_t_array, scm_i_t_array): Likewise.
2208 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2209 Moved from unif.h to unif.c.
2210 (scm_c_array_rank): New.
2211 (scm_array_rank): Reimplement using it.
2212
2213 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2214 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2215 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2216
2217 2005-01-11 Marius Vollmer <mvo@zagadka.de>
2218
2219 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2220 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2221 scm_c_generalized_vector_ref and scm_cvref, and
2222 scm_c_generalized_vector_set_x, respectively.
2223 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2224 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2225
2226 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2227 former to latter and made public. Changed all uses.
2228 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2229 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2230 (scm_i_shap2ra): New internal version of scm_shap2ra.
2231 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2232 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2233 (scm_ra_set_contp): Deprecated, changed all uses to
2234 scm_i_ra_set_contp.
2235 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2236
2237 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2238
2239 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2240 Trotts!
2241
2242 * unif.c (scm_list_to_typed_array): Allow the specification of the
2243 upper bound as well. This is needed for empty arrays.
2244 (l2ra): Give needed number of elements in error message.
2245 (scm_i_print_array): Print length information for arrays that need
2246 it.
2247 (scm_i_read_array): Parse it.
2248
2249 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2250 scm_i_object_chars, scm_i_object_length): Brought back from the
2251 dead.
2252
2253 2005-01-10 Marius Vollmer <mvo@zagadka.de>
2254
2255 * ramap.c: Replaced single-index uses of scm_array_set_x with
2256 scm_c_generalized_vector_set_x.
2257
2258 * unif.c (scm_array_rank, scm_array_dimensions,
2259 scm_shared_array_offset, scm_shared_array_increments,
2260 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2261 to simplify code and make it more general.
2262 (scm_shared_array_root): Work with all kinds of arrays, including
2263 naked vectors.
2264 (indices_to_pos): New.
2265 (scm_make_shared_array): Use it instead of scm_aind; use handle
2266 for oldra.
2267
2268 2005-01-10 Kevin Ryde <user42@zip.com.au>
2269
2270 * posix.c (scm_mkstemp): Update docstring from manual.
2271
2272 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2273
2274 2005-01-09 Marius Vollmer <mvo@zagadka.de>
2275
2276 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2277 scm_i_uniform_vector_set_proc): New.
2278 (u8ref, u8set, s8ref, s8set, etc): New.
2279 (uvec_reffers, uvec_setters): New.
2280 (uvec_to_list): Use generic scm_array_handle_ref instead of
2281 uvec_fast_ref since scm_array_handle_ref should be faster now.
2282 (coerce_to_uvec, scm_c_uniform_vector_ref,
2283 scm_c_uniform_vector_set_x): Likewise.
2284
2285 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2286 New.
2287 (scm_t_array_handle): Added ref, set, elements and
2288 writable_elements for fast inline operation of
2289 scm_array_handle_ref and scm_array_handle_set.
2290 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2291 and replaced with inline code that simply calls the ref/set
2292 members of the handle.
2293 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2294 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2295 New.
2296 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2297 and memoize_set.
2298 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2299 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2300 scm_bit_invert_x): Correctly multiply index with increment in the
2301 general case.
2302
2303 * unif.c (scm_array_handle_set): Correctly execute only one
2304 alternative. D'Oh!
2305 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2306 the array; this covers all cases with much simpler code.
2307
2308 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2309 as well.
2310
2311 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2312
2313 * srfi-4.c (uvec_type): New.
2314 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2315 scm_c_uniform_vector_x): Use it to get concrete type.
2316
2317 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2318 fit the docs.
2319
2320 * unif.c (ra2l): Handle zero rank arrays.
2321 (scm_i_print_array): Print zero rank arrays specially.
2322 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2323 (scm_i_read_array): Allow zero rank arrays.
2324
2325 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2326
2327 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2328 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2329 and SCM_SET_HASHTAB_BUCKET.
2330
2331 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2332 Removed ref_stack field.
2333 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2334 of a print state. Use them everywhere instead of ref_stack.
2335
2336 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2337
2338 * srfi-4.c: Include deprecation.h.
2339
2340 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2341 deprecated.c, eq.c
2342 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2343 (scm_vector_elements, scm_vector_writable_elements,
2344 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2345 unif.[hc].
2346 (SCM_SIMPLE_VECTOR_LOC): Removed.
2347 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2348 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2349 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2350 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2351 latter. Changed use in eq.c.
2352
2353 2005-01-07 Marius Vollmer <mvo@zagadka.de>
2354
2355 Make the uniform vector routines also deal with one dimensional
2356 arrays.
2357
2358 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2359 SCM_SMOB_PREDICATE in this file.
2360 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2361 of the right type.
2362 (scm_is_uniform_vector): Likewise.
2363 (uvec_fast_ref): Made BASE param const.
2364 (uvec_writable_elements, uvec_elements): New.
2365 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2366 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2367 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2368 arrays.
2369 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2370 argument convention.
2371 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2372 checking.
2373 (scm_uniform_vector_length): Use uvec_length.
2374
2375 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2376
2377 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2378 scm_c_uniform_vector_size): Removed.
2379 (scm_array_handle_uniform_element_size): New.
2380
2381
2382 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2383 type of POS parameter to be signed, positions can be negative.
2384 (scm_array_handle_release): New, changed all uses of
2385 scm_t_array_handle to properly call it.
2386 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2387 Renamed former to latter, changed all uses.
2388
2389 2005-01-05 Marius Vollmer <mvo@zagadka.de>
2390
2391 Updated bitvector routines to also use scm_t_array_handles.
2392
2393 * unif.h (scm_bitvector_elements,
2394 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2395 deliver offset, length and increment to caller. Changed all uses.
2396 (scm_bitvector_release_elements,
2397 scm_frame_bitvector_release_elements,
2398 scm_bitvector_release_writable_elements,
2399 scm_frame_bitvector_release_writable_elements): Removed.
2400 (scm_array_handle_bit_elements,
2401 scm_array_handle_bit_writable_elements,
2402 scm_array_handle_bit_elements_offset): New.
2403 (scm_make_typed_array): The special value for non-initialized
2404 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2405 was a valid value to fill bitvectors with, so it can't really be
2406 specialed out.
2407
2408 2005-01-04 Kevin Ryde <user42@zip.com.au>
2409
2410 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2411 Reported by Bill Schottstaedt.
2412
2413 2005-01-02 Marius Vollmer <mvo@zagadka.de>
2414
2415 * sort.c (quicksort): Added INC parameter for non-contigous
2416 vectors.
2417 (quicksort1): New, for contigous vectors. Both functions are
2418 generated from the same code by including "quicksort.i.c".
2419 (scm_restricted_vector_sort_x): Call one of quicksort and
2420 quicksort1, depending on increment of vector.
2421 (scm_sort): Simply call scm_sort_x on a copy of the list or
2422 vector.
2423 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2424 size_t, added inc parameter.
2425 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2426 so that it doesn't leak.
2427 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2428 list or vector.
2429
2430 * ramap.c (scm_array_map_x): Do not try to convert fill value
2431 before filling, any necessary conversion is done while storing.
2432
2433 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2434 doing it inline.
2435
2436 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2437 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2438 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2439
2440 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2441 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2442 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2443 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2444 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2445 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2446 vector elements API or simple vector API, as appropriate. Removed
2447 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2448 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2449
2450 * srfi-4.h, srfi-4.c,
2451 srfi-4.i.c (scm_array_handle_uniform_elements,
2452 scm_array_handle_uniform_writable_elements,
2453 scm_uniform_vector_elements,
2454 scm_uniform_vector_writable_elements):
2455 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2456 scm_t_array_handle, deliver length and increment.
2457 (scm_array_handle_<foo>_elements,
2458 scm_array_handle_<foo>_writable_elements): New.
2459
2460 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2461 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2462
2463 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2464 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2465 scm_array_handle_set, scm_array_handle_elements
2466 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2467 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2468 scm_dimensions_to_uniform_array): Deprecated for real.
2469 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2470 snarfing wont allow a mismatch between C and Scheme arglists.
2471 (scm_make_shared_array, scm_enclose_array): Correctly use
2472 scm_c_generalized_vector_length instead of
2473 scm_uniform_vector_length.
2474
2475 * validate.h (SCM_VALIDATE_VECTOR,
2476 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2477 of SCM_VECTORP.
2478
2479 * weaks.h, weaks.c: Use new internal weak vector API from
2480 vectors.h.
2481
2482 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2483 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2484 'extra' to being regular sources.
2485 (noinst_HEADERS): Added quicksort.i.c.
2486 * quicksort.i.c: New file.
2487
2488 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2489 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2490 and reimplemented. Replaced all uses with scm_vector_elements,
2491 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2492 appropriate.
2493 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2494 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2495 SCM_SIMPLE_VECTOR_LOC): New.
2496 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2497 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2498 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2499 Removed.
2500 (scm_vector_copy): New.
2501 (scm_vector_elements, scm_vector_writable_elements): Use
2502 scm_t_array_handle, deliver length and increment. Moved to
2503 unif.h. Changed all uses.
2504 (scm_vector_release_elements,
2505 scm_vector_release_writable_elements,
2506 (scm_frame_vector_release_elements,
2507 scm_frame_vector_release_writable_elements): Removed.
2508 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2509 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2510 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2511 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2512 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2513 weak vectors.
2514
2515 2004-12-29 Marius Vollmer <mvo@zagadka.de>
2516
2517 No longer use creators to specify the type of an array. Creators
2518 expose the fact that arrays are wrapped around vectors, but that
2519 might change.
2520
2521 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2522 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2523 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2524 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2525 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2526 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2527 uvec_proc_vars): Removed.
2528 (scm_i_generalized_vector_creator): Removed.
2529 (scm_i_generalized_vector_type): New.
2530
2531 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2532 scm_make_typed_array, scm_array_type, scm_list_to_array,
2533 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2534 (scm_array_creator): Removed.
2535 (scm_array_p): Deprecated second PROT argument.
2536 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2537 Deprecated, reimplemented in terms of scm_make_typed_array and
2538 scm_list_to_typed_array.
2539 (scm_i_proc_make_vector, scm_i_proc_make_string,
2540 scm_i_proc_make_bitvector): Removed.
2541 (type_creator_table, init_type_creator_table, type_to_creator,
2542 make_typed_vector): New.
2543 (scm_i_convert_old_prototype): Removed.
2544 (prototype_to_type): New.
2545 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2546 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2547 minor added clarity.
2548 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2549 instead of scm_make_uve.
2550 (tag_creator_table, scm_i_tag_to_creator): Removed.
2551 (tag_to_type): New.
2552 (scm_i_read_array): Use scm_list_to_typed_array instead of
2553 scm_list_to_uniform_array.
2554
2555 2004-12-27 Marius Vollmer <mvo@zagadka.de>
2556
2557 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2558 (scm_bitvector_writable_elements): New.
2559 (scm_bitvector_release, scm_bitvector_release_elements):
2560 Renamed former to latter. Added explicit call to
2561 scm_remember_upto_here_1.
2562 (scm_frame_bitvector_release,
2563 scm_frame_bitvector_release_elements): Renamed former to latter.
2564 (scm_bitvector_release_writable_elements,
2565 scm_bitvector_release_writable_elements): New.
2566 Changed all uses as required by the changes above.
2567
2568 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2569 scm_u8vector_elements, etc): Made return value "const".
2570 (scm_uniform_vector_writable_elements,
2571 scm_u8vector_writable_elements, etc): New.
2572 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2573 Renamed former to latter. Added explicit call to
2574 scm_remember_upto_here_1.
2575 (scm_frame_uniform_vector_release,
2576 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2577 (scm_uniform_vector_release_writable_elements,
2578 scm_frame_uniform_vector_release_writable_elements): New. Takes
2579 crown of longest identifier yet.
2580 Changed all uses as required by the changes above.
2581
2582 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2583 void.
2584 (scm_is_vector, scm_vector_p, scm_vector_length,
2585 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2586 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2587 scm_vector_move_left_x, scm_vector_move_right_x,
2588 scm_vector_fill_x): handle one-dimensional arrays.
2589 (scm_vector_elements, scm_vector_release_elements,
2590 scm_vector_frame_release_elements, scm_vector_writable_elements,
2591 scm_vector_release_writable_elements,
2592 scm_vector_frame_release_writable_elements): New.
2593 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2594 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
2595
2596 * ramap.c (scm_ramapc, scm_raeql): Use
2597 scm_c_generalized_vector_length instead of
2598 scm_uniform_vector_length.
2599 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2600 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2601
2602 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2603
2604 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2605 member for relocating debug frames.
2606 (scm_make_continuation): Set it.
2607
2608 * stacks.c (read_frame, read_frames, scm_make_stack,
2609 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2610 of continuations instead of calculating the offset ourselves.
2611 Relocate 'vect' member of scm_t_debug_frame.
2612
2613 2004-12-16 Kevin Ryde <user42@zip.com.au>
2614
2615 * ramap.c (scm_array_map_x): Check for at least one source argument.
2616
2617 2004-12-14 Kevin Ryde <user42@zip.com.au>
2618
2619 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2620 the C code so for the final call to the predicate procedure is a tail
2621 call, per SRFI-13 spec.
2622
2623 2004-12-10 Kevin Ryde <user42@zip.com.au>
2624
2625 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2626 recent revision to the reference manual.
2627
2628 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2629 with "%", C99 says it's well-defined.
2630
2631 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2632 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2633 bother trying to fit scm_from_ulong, not really worth the trouble if
2634 addresses are more than 4 bytes usually.
2635
2636 2004-11-30 Kevin Ryde <user42@zip.com.au>
2637
2638 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2639 arm32. Reported by Greg Troxel.
2640
2641 2004-11-14 mvo <mvo@zagadka.de>
2642
2643 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2644
2645 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2646
2647 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2648
2649 Enclosed arrays are now their own smob. This has been done to
2650 make the code more explicit about them and to prepare for the time
2651 when generalized vectors include arbitrary one-dimensional
2652 arrays. (Uptonow, enclosed arrays have been recognized by their
2653 use of an array as their storage 'vector'. When all generalized
2654 vectors are allowed as storage, including one-dimensional arrays,
2655 this will no longer work.)
2656
2657 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2658 New.
2659 (exactly_one_third, singp): Removed.
2660 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2661 scm_shared_array_offset, scm_shared_array_increments): Handle
2662 enclosed arrays explicitely.
2663 (scm_array_rank): Likewise. Also, do not return zero for
2664 non-arrays, signal an error instead since arrays with rank zero do
2665 exist.
2666 (scm_i_make_ra): New, for specifying the tag of the new array.
2667 (scm_make_enclosed_array): Use it.
2668 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2669 (scm_make_shared_array): Use scm_c_generalized_vector_length
2670 instead of scm_uniform_vector_length.
2671 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2672 (scm_i_cvref): New, doing the job of scm_cvref.
2673 (scm_cvref): Use scm_i_cvref.
2674 (scm_array_ref): Do not accept non-arrays when no indices are
2675 given. Use scm_i_cvref to do the actual access.
2676 ("uniform-array-set1"): Do not register.
2677 (scm_array_set_x, scm_uniform_array_read_x,
2678 scm_uniform_array_write): Handle enclosed arrays explicitly.
2679 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2680 handle enclosed arrays.
2681 (scm_array_to_list): Handle enclosed arrays explicitly.
2682 (rapr1): Removed.
2683 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2684 enclosed arrays.
2685 (scm_i_print_enclosed_array): New.
2686 (tag_proto_table, tag_creator_table): Renamed former to latter.
2687 Added "a" and "b" for strings and bitvectors, resp.
2688 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2689 latter. Tag "a" is in the table now, no need to handle it as a
2690 legacy tag.
2691 (scm_raprin1): Just call scm_iprin1.
2692 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2693 explicitly.
2694 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2695 Use scm_i_print_array as printer for scm_tc16_array.
2696
2697 2004-11-10 Marius Vollmer <mvo@zagadka.de>
2698
2699 * ramap.c (cind): Changed second arg to be pointer to long instead
2700 of uniform vector.
2701 (scm_ramapc): Allocate index vector with scm_malloc and not as
2702 uniform vector. Wrap it in a frame so that it gets properly freed.
2703 (scm_array_index_map_x): Likewise.
2704
2705 * unif.c: Changed all uses of scm_array_prototype to
2706 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2707 prototype is known.
2708 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2709 in terms of scm_uniform_vector_read_x and
2710 scm_uniform_vector_write, respectively. Strings and
2711 bitvector support has been dropped.
2712
2713 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2714 needed files directly. Include config.h, <unistd.h> and <io.h>
2715 when available.
2716 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2717
2718 2004-11-09 Marius Vollmer <mvo@zagadka.de>
2719
2720 * gh_data.c (gh_uniform_vector_length): Properly use
2721 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2722
2723 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2724
2725 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2726 New.
2727 (scm_i_uniform_vector_creator): Removed.
2728 (scm_i_generalized_vector_creator): New.
2729 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2730 handle generalized vectors, only uniform numeric vectors.
2731 (alloc_uvec): Do length check here...
2732 (make_uvec): ...but not here.
2733 (coerce_to_uvec): Use new generalized vector functions to handle
2734 all kinds of vectors in one go.
2735
2736 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2737 remaining scm_tc7_unused tags to get a neatly ordered list.
2738
2739 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2740 longer handle scm_tc7_bvect bitvectors.
2741
2742 * ramap.c: Use the new generalized vector functions to handle all
2743 vector like things.
2744
2745 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2746 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2747 scm_generalized_vector_length, scm_generalized_vector_ref,
2748 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2749 scm_is_generalized_vector, scm_c_generalized_vector_length,
2750 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2751 New.
2752
2753 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2754 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2755 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2756 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2757 scm_c_bitvector_length, scm_c_bitvector_ref,
2758 scm_c_bitvector_set_x, scm_bitvector_elements,
2759 scm_bitvector_release, scm_frame_bitvector_release,
2760 scm_tc16_bitvector, bitvector_free, bitvector_print,
2761 bitvector_equalp, count_ones, find_first_one): New.
2762 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2763 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2764 using the new C API for bitvectors and maybe count_ones or
2765 find_first_one, as appropriate.
2766 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2767 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2768 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2769 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2770 new functions from above.
2771 (scm_i_proc_make_vector, scm_i_proc_make_string,
2772 scm_i_proc_make_bitvector): Made non-static for use in
2773 scm_i_generalized_vector_creator.
2774 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2775 (scm_make_uve): Validate that the created object is a generalized
2776 vector.
2777 (scm_i_legacy_tag): Removed.
2778 (scm_i_print_array): Do it here.
2779 (scm_raprin1): Only print enclosed arrays.
2780
2781 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2782
2783 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2784
2785 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2786 added portability.
2787
2788 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2789 for "space". Thanks to Bruce Korb!
2790
2791 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2792 only after dest has been set. Thanks to Hyper Division!
2793
2794 * gh_data.c (gh_uniform_vector_length): Use
2795 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2796
2797 2004-11-03 Marius Vollmer <mvo@zagadka.de>
2798
2799 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2800 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2801 SCM_SET_UVECTOR_LENGTH): Removed.
2802
2803 2004-11-02 Marius Vollmer <mvo@zagadka.de>
2804
2805 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
2806 Thanks!
2807
2808 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2809 first and the second line of the SCM_DEFINE macro call, since old
2810 preprocessors cannot handle definitions that are split into two
2811 lines.
2812
2813 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2814 declarations.
2815
2816 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2817 scm_t_uint32 to fix the mismatch between the function declaration
2818 and definition.
2819
2820 * sort.c (quicksort): Don't use C99 variable declarations.
2821
2822 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2823 SCM_BOOL_F if no type matches.
2824
2825 * threads.c (thread_print): Cast a pointer to size_t when printing
2826 with scm_uintprint.
2827
2828 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
2829 defined.
2830 (scm_array_prototype): Deprecated.
2831
2832 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2833
2834 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
2835 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
2836 more efficient access to the u32vector.
2837
2838 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
2839 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
2840 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
2841
2842 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
2843 instead of the old-style dvectors.
2844
2845 * gh_data.c: Use new-style uniform arrays in place of old-style
2846 ones.
2847
2848 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
2849 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
2850
2851 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
2852 instead of old-sytle uvectors.
2853
2854 * convert.c, convert.i.c: Rewritten completely, using
2855 scm_any_to_u8vector, etc and other new-style uniform vector
2856 functions.
2857
2858 * random.c (scm_random_solid_sphere_x,
2859 scm_random_hollow_sphere_x): Do not validate vector argument, this
2860 is already done elsewhere.
2861
2862 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
2863 scm_any_to_u8vector, etc): New.
2864 (scm_uniform_element_size, scm_uniform_vector_length): Do no
2865 longer handle old-style uniform vectors.
2866
2867 * read.c (scm_lreadr): Bugfix: include the last bit in the
2868 bit vector.
2869
2870 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2871
2872 * unif.h, unif.c (scm_array_creator): New.
2873 (scm_i_get_old_prototype): New.
2874 (scm_array_prototype): use it to return old-style prototype, never
2875 return creators.
2876 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
2877 arg of SCM_UNDEFINED. The latter is wrong.
2878
2879 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
2880 (make_uve): Removed.
2881 (scm_i_proc_make_vector, scm_i_proc_make_string,
2882 scm_i_proc_make_u1vector): New.
2883 (scm_init_unif): Initialize them.
2884 (scm_i_convert_old_prototype): New.
2885 (scm_make_uve): Use it to get the creator procedure. Removed all
2886 old code that created old-style uniform vectors.
2887 (scm_array_p): Handle generic vectors.
2888 (scm_dimensions_to_uniform_array): Do not fill new array with
2889 prototype when that is a procedure.
2890 (scm_list_to_uniform_array): Also accept a list of lower bounds as
2891 the NDIM argument.
2892 (scm_i_print_array): Print rank for shared or non-zero-origin
2893 vectors.
2894 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
2895 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
2896 which I do not understand yet.
2897 (scm_array_prototype): Explicitely handle generic vectors.
2898
2899 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
2900 (iflo2str): Use icmplx2str for complex numbers.
2901
2902 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
2903 scm_i_uniform_vector_prototype): Removed.
2904 (scm_i_uniform_vector_creator): New.
2905 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
2906 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
2907 Updated all tables and generic functions to support them.
2908 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
2909 (scm_init_srfi_4): Initialize them.
2910
2911 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
2912 sizeof(CTYPE) as explained in the comment.
2913
2914 * read.c (scm_lreadr): Call scm_i_read_array for all characters
2915 following '#' that can start an array. Explicitely disambiguate
2916 'i' and 'e' between introducing numbers and uniform vectors. Do
2917 not call scm_i_read_homogenous_vector, since that is also handled
2918 by scm_i_read_array now.
2919
2920 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2921
2922 First cut at integrating uniform vectors from srfi-4 with the rest
2923 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
2924 vector. The plan is to gradually replace one type after the other
2925 until none is left and then to consider general cleanups and
2926 optimizations.
2927
2928 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
2929
2930 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
2931 scm_uniform_vector_ref, scm_uniform_vector_set_x,
2932 scm_uniform_vector_to_list, scm_is_uniform_vector,
2933 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
2934 scm_uniform_vector_elements, scm_uniform_vector_element_size,
2935 scm_uniform_vector_release): New.
2936 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
2937 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
2938 from unif.h, unif.c and extended to handle both the old and new
2939 uniform vectors.
2940
2941 * tags.h (scm_tc7_byvect): Commented out.
2942
2943 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
2944 the former to the latter.
2945 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
2946 srfi-4.h, srfi-4.c.
2947 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
2948 (scm_array_p, scm_array_rank, scm_array_dimensions,
2949 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
2950 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
2951 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
2952 vectors. Removed code for scm_tc7_byvect.
2953 (scm_dimensions_to_uniform_array): Fill array with 0 when
2954 prototype is #\nul.
2955 (scm_i_print_array_dimension, scm_i_legacy_tag,
2956 scm_i_print_array): New.
2957 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
2958 for scm_tc7_byvect.
2959
2960 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
2961 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
2962 uniform vectors. Removed code for scm_tc7_byvect
2963
2964 * print.c (iprin1): Removed code for scm_tc7_byvect.
2965 * objects.c (scm_class_of): Likewise.
2966 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
2967 * gc-card.c (scm_i_sweep_card): Likewise.
2968 * evalext.c (scm_self_evaluating_p): Likewise.
2969 * eq.c (scm_equal_p): Likewise.
2970
2971 * gh_data.c (gh_chars2byvect): Reimplemented with
2972 scm_make_s8vector.
2973 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
2974
2975 * srfi-4.c (take_uvec): New.
2976 (alloc_uvec): Use it.
2977 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
2978
2979 * random.c (vector_scale, vector_scale_x): Renamed former to the
2980 latter, since it modifies its argument.
2981 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
2982 Do not use scm_universal_vector_length for non-uniform vectors.
2983 Use scm_f64vector_elements to access innards of uniform vectors.
2984
2985 * convert.i.c: Convert srfi-4 style uniform vectors when
2986 requested.
2987 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
2988 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
2989
2990 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2991
2992 * numbers.h, numbers.c (scm_i_print_double): New.
2993
2994 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
2995 ../srfi/ but heavily modified.
2996 * Makefile.am: Add them in all the right places.
2997 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
2998 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
2999 '#u', and '#s'.
3000
3001 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3002 and made non-static. Changed all uses.
3003
3004 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3005
3006 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3007 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3008 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3009 scm_uintprint to print unsigned integers, raw heap words, and
3010 adresses, using a cast to scm_t_bits to turn pointers into
3011 integers.
3012
3013 * unif.c: Include "libguile/print.h".
3014
3015 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3016 scm_t_intmax values.
3017 (scm_uint2str): New, for scm_t_uintmax.
3018 (scm_iint2str): Argument type changed to scm_t_intmax,
3019 reimplemented in terms of scm_uint2str.
3020
3021 * print.c, print.h (scm_uintprint): New, for printing
3022 scm_t_uintmax values.
3023 (scm_intprint): Argument type changed to scm_t_intmax.
3024
3025 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3026 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3027 strategic places so that the loops can be interrupted.
3028
3029 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3030 "-I$(top_srcdir)/libguile-ltdl".
3031 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3032 "../libguile-ltdl/libguile-ltdl.a".
3033
3034 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3035 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3036 instead of <libguile-ltdl.h>.
3037
3038 2004-10-20 Marius Vollmer <mvo@zagadka.de>
3039
3040 * sort.c (quicksort): Copy pivot out of the array while
3041 constructing the partitions; it could get overwritten otherwise.
3042 Because of the ultimate insertion sort, this bug did not cause
3043 quicksort to fail, it just put all the burdon on the insertion
3044 sort and was thus very slow. Thanks to Rolan Orre for reporting
3045 the slowness!
3046
3047 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3048
3049 * numbers.c (scm_i_range_error): New.
3050 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3051 scm_out_of_range.
3052
3053 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
3054 endpos. State inclusiveness/exclusiveness of bounds in docstring.
3055
3056 * unif.c (scm_array_p): When no prototype is given, explicitely
3057 test for allowable types, do not simply return true. Thanks to
3058 Roland Orre for reporting this!
3059
3060 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3061
3062 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3063 segment to scm_max_segment_size.
3064
3065 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3066
3067 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3068
3069 * inline.h (scm_double_cell): abort if GC running.
3070 (scm_cell): idem.
3071
3072 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3073
3074 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3075 pos == 0.
3076
3077 Keywords no longer store a 'dash symbol'. Instead, they store a
3078 symbol with their real name.
3079
3080 * keywords.h, keywords.c, deprecated.h, deprecated.c
3081 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3082 terms of scm_is_keyword and scm_keyword_dash_symbol.
3083
3084 * keywords.h, keywords.c, discouraged.h, discouraged.c
3085 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3086 scm_c_make_keyword): Discouraged.
3087
3088 * keywords.h, keywords.c (scm_symbol_to_keyword,
3089 scm_keyword_to_symbol): Implemented in C.
3090 (scm_is_keyword, scm_from_locale_keyword,
3091 scm_from_locale_keywordn): New.
3092
3093 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3094
3095 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3096 scm_from_locale_keyword instead of scm_c_make_keyword.
3097
3098 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3099 better error message.
3100
3101 * deprecated.c: Include discouraged.h and keywords.h.
3102
3103 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3104 reading '#:' or ':'. See NEWS for consequences.
3105
3106 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3107
3108 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3109 literals are now read-write again (until SCM_STRING_CHARS is
3110 removed).
3111
3112 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3113 strings with an error message that blames SCM_STRING_CHARS.
3114
3115 * options.c (change_option_setting): Use scm_car instead of
3116 explicit type check plus SCM_CAR.
3117
3118 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3119 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3120 (scm_iprin1): Use them instead of the previoulsy hardcoded
3121 strings.
3122 (scm_init_print): Initialize them.
3123
3124 * backtrace.c (display_frame_expr): Do not remove control
3125 characters from the final string. Print it directly using
3126 scm_display.
3127
3128 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3129 Thanks to Roland Orre!
3130
3131 2004-09-29 Kevin Ryde <user42@zip.com.au>
3132
3133 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3134 be whole original string in match struct, not offsetted substring.
3135
3136 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3137
3138 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3139
3140 2004-09-24 Marius Vollmer <mvo@zagadka.de>
3141
3142 * Makefile.am (EXTRA_DIST): Added gettext.h.
3143
3144 * smob.c, smob.h (scm_assert_smob_type): New.
3145
3146 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
3147 Include GUILE_CFLAGS.
3148 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3149 now.
3150 (libpath.h): Put GUILE_CFLAGS in the build-info.
3151
3152 2004-09-23 Marius Vollmer <mvo@zagadka.de>
3153
3154 * print.h (scm_print_state): Added highlight_objects.
3155 * print.c (make_print_state, scm_free_print_state): Initialize it
3156 to SCM_EOL.
3157 (scm_iprin1): Wrap output in '{...}' when object is contained in
3158 highlight_objects.
3159
3160 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3161 scm_backtrace_with_highlights): New. Set highlight_objects of
3162 printstate.
3163
3164 * error.c (scm_error_scm): Document new meaning of data/rest
3165 argument for out-of-range and wrong-type-arg errors.
3166 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3167 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3168 exception so that it gets highlighted in the backtrace.
3169 Don't talk about "argument" when not giving a position.
3170
3171 * throw.c (handler_message): The rest argument is the fourth
3172 argument, not everything after the third. Call
3173 scm_display_backtrace_with_highlights, passing the rest argument
3174 when appropriate.
3175
3176 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3177
3178 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3179 <bruno@clisp.org>:
3180
3181 * i18n.c: Handle --disable-nls (thanks Bruno).
3182
3183 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3184 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3185
3186 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3187 LC categories.
3188 * posix.c (scm_setlocale): Use it.
3189
3190 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3191 scm_bind_textdomain_codeset): Make wrappers similar to C function
3192 they wrap.
3193
3194 * i18n.h: New file.
3195 * i18n.c: New file.
3196 * gettext.h: New file, taken from GNU gettext.
3197 * init.c: Include libguile/i18n.h.
3198 (scm_init_guile_1): Add call to scm_init_i18n().
3199 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3200 (DOT_X_FILES): Add i18n.x.
3201 (DOT_DOC_FILES): Add i18n.doc.
3202 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3203 (modinclude_HEADERS): Add i18n.h.
3204
3205 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3206
3207 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3208
3209 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3210 discouraged.h. Replaced all uses with scm_is_pair.
3211 (SCM_I_CONSP): New name for SCM_CONSP.
3212
3213 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3214 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3215 scm_cadr, etc): New.
3216 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3217 uses with scm_is_null.
3218
3219 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3220 instead of explicit code.
3221
3222 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3223
3224 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3225 Reworded logic a bit so that #f is returned immediately when s1 is
3226 too short to contain s2.
3227
3228 * regex-posix.c (scm_regexp_exec): Convert string to
3229 zero-terminated locale string before matching against it.
3230
3231 * strings.h, strings.c (scm_substring_read_only,
3232 scm_c_substring_read_only, scm_i_substring_read_only): New.
3233 (RO_STRING_TAG, IS_RO_STRING): New.
3234 (scm_i_string_writable_chars): Bail on read-only strings.
3235
3236 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3237 literals, thus making them read-only as specified by R5RS.
3238
3239 2004-09-22 Marius Vollmer <mvo@zagadka.de>
3240
3241 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3242 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3243
3244 2004-09-21 Marius Vollmer <mvo@zagadka.de>
3245
3246 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3247 numbers.c.
3248 (scm_to_mpz, scm_from_mpz): New.
3249 Thanks to Andreas Vögele!
3250
3251 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3252 just on a line of its own.
3253
3254 * srfi-13.c (scm_string_any, scm_string_every,
3255 scm_string_tabulate, string_upcase_x, string_down_case_x,
3256 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3257 size_t instead of int for indices into strings. Make sure that no
3258 over- or underflow occurs. Thanks to Andreas Vögele!
3259 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3260 indices, which can also be negative.
3261
3262 2004-09-20 Marius Vollmer <mvo@zagadka.de>
3263
3264 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3265
3266 * threads.c (scm_threads_mark_stacks): Call
3267 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3268 only used once.
3269
3270 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3271
3272 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3273 Bugfix: when subtracting unsigned values, make sure that result
3274 does not wrap.
3275
3276 2004-09-09 Kevin Ryde <user42@zip.com.au>
3277
3278 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3279 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
3280 by Andreas Vögele.
3281
3282 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3283
3284 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3285
3286 * eq.c (real_eqv): Pretend that all NaNs are equal.
3287
3288 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3289
3290 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3291
3292 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3293 use size_t for some locals instead of int.
3294
3295 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3296 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3297 (skip_scsh_block_comment): Use scm_input_error instead of
3298 scm_misc_error in case of EOF.
3299
3300 2004-09-07 Kevin Ryde <user42@zip.com.au>
3301
3302 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
3303 Bug report by Bill Schottstaedt.
3304
3305 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3306 column.
3307 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3308
3309 * posix.c (scm_access): Update docstring per manual.
3310
3311 * posix.c (scm_nice): Correction to error detection. Reported by
3312 Matthias Koeppe.
3313
3314 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3315 throw error before unlocking mutex with SCM_ALLOW_INTS.
3316
3317 2004-09-06 Kevin Ryde <user42@zip.com.au>
3318
3319 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3320 available. This also gets around CLK_TCK being absent when
3321 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3322
3323 2004-09-03 Stefan Jahn <stefan@lkcc.org>
3324
3325 * threads.c (scm_threads_mark_stacks): Fixed local variable
3326 definitions.
3327
3328 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
3329 local variable definitions.
3330
3331 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3332 MinGW32 because it conflicts with its pthread headers.
3333 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3334 (scm_strftime): Using scm_from_locale_string() instead of
3335 scm_makfrom0str().
3336
3337 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
3338 part.
3339
3340 * numbers.c (scm_init_numbers): Removed check_sanity() call
3341 inside GUILE_DEBUG. The function has been removed somewhen...
3342
3343 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3344 MinGW32 because it conflicts with its pthread headers.
3345
3346 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3347
3348 * strings.c (SCM_STRINGP): Accept all strings.
3349 (SCM_STRING_CHARS): Reject shared substrings here.
3350
3351 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3352 the Copyright years.
3353
3354 2004-08-27 Kevin Ryde <user42@zip.com.au>
3355
3356 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3357 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3358 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3359
3360 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3361
3362 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3363 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3364 scm_i_symbol_is_interned, scm_i_mem2symbol,
3365 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3366
3367 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3368
3369 * srfi-13.c: First cut at thread-safeness and proper use of
3370 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3371 been inserted. Made sure that no internal string pointer is used
3372 across a SCM_TICK or a possible GC.
3373
3374 * script.c (scm_compile_shell_switches): Use
3375 scm_from_locale_string instead of scm_makfrom0str.
3376
3377 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3378 always been.
3379
3380 2004-08-25 Marius Vollmer <mvo@zagadka.de>
3381
3382 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3383 strop.c.
3384
3385 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3386 * strop.h, strop.c: Removed, they are now empty.
3387 * Makefile.am: Updated for new and removed files.
3388
3389 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3390 to scm_string_to_symbol.
3391
3392 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3393 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3394 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3395 charset instead of libc functions.
3396
3397 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3398 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3399 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3400 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3401 instead of explicit code.
3402
3403 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3404 "srfi-13.h" instead of "strop.h".
3405
3406 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3407 scm_init_srfi_14. Do not call scm_init_strop.
3408
3409 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3410
3411 * numbers.c (scm_inf_p): Synced docstring back from manual.
3412
3413 2004-08-22 Marius Vollmer <mvo@zagadka.de>
3414
3415 * strings.c (get_str_buf_start): New helper function.
3416 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3417 scm_i_string_char, scm_i_string_writable_chars): Use it.
3418 (scm_i_substring_copy): Make START argument optional for C
3419 callers, for upcoming SRFI-13 integration.
3420
3421 2004-08-21 Marius Vollmer <mvo@zagadka.de>
3422
3423 From Richard Todd, Thanks!
3424
3425 * script.c (scm_compile_shell_switches): added '-L' switch to add
3426 to the %load-path.
3427
3428 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3429
3430 * eval.c (unmemoize_exprs): When dropping internal body markers
3431 from the output during unmemoization, also drop those that are not
3432 immediately at the beginning of a body.
3433
3434 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3435
3436 * eval.c (scm_lookupcar1): Report "Variable used before given a
3437 value" insetad of an "Unbound" one for variables that are found
3438 but still contain SCM_UNDEFINED.
3439
3440 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3441 expects a null-terminated string in the locale encoding, but
3442 scm_i_string_writable_chars doesn't give that. Fixed by letting
3443 mkstemp modify a locale version of the tmpl argument and copying
3444 the result back into tmpl.
3445
3446 * strop.c (scm_substring_move_x): Store into str2, not str1.
3447
3448 2004-08-20 Kevin Ryde <user42@zip.com.au>
3449
3450 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3451 to modify the input string.
3452
3453 2004-08-19 Marius Vollmer <mvo@zagadka.de>
3454
3455 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3456 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3457 scm_c_symbol_length.
3458
3459 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3460
3461 New string implementation, with copy-on-write strings and
3462 mutation-sharing substrings, and a new internal string API.
3463 Symbols can now share memory with strings.
3464
3465 * tags.h (scm_tc7_stringbuf): New tag.
3466
3467 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3468 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3469 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3470 uses.
3471 (scm_i_make_string, scm_c_make_string): New, to replace
3472 scm_allocate_string. Updated all uses.
3473 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3474 SCM_STRING_LENGTH): Deprecated.
3475 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3476 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3477 Discouraged. Replaced all uses with scm_from_locale_string or
3478 similar, as appropriate.
3479 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3480 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3481 scm_substring_shared, scm_substring_copy): New.
3482
3483 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3484 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3485 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3486 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3487 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3488 Deprecated.
3489 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3490 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3491 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3492 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3493 Updated all uses.
3494 (scm_gensym): Generate only the number suffix in the buffer, just
3495 string-append the prefix.
3496
3497 * error.c (scm_memory_error): Do not try to throw, just abort.
3498 Throwing will not work anyway.
3499
3500 * gh.h, gh-data.c (gh_set_substr): Made src const.
3501
3502 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3503 (scm_mode_bits): Use it.
3504 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3505 a vector normally and fill that instead of consing a list with a
3506 blocked GC.
3507
3508 * read.c (scm_i_casei_streq): New, for counted strings.
3509
3510 * threads.c (gc_section_count): Removed, thread-sleeping can not
3511 be nested.
3512 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3513 admin mutex so that we can be put to sleep by other threads while
3514 blocking on that mutex. Lock all the heap mutex of all threads,
3515 including ourselves.
3516 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3517 call scm_i_enter_guile.
3518 (scm_thread_mark_stacks): Expect all threads to be suspended.
3519
3520 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3521 scm_gc_mallocated, for now.
3522 (scm_init_storage): Initialize it.
3523 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3524
3525 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3526 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3527 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3528 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3529
3530 * strop.c (scm_string_copy): Use scm_c_substring to get a
3531 copy-on-write string.
3532
3533 2004-08-18 Kevin Ryde <user42@zip.com.au>
3534
3535 * arbiters.c (FETCH_STORE): New macro.
3536 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3537 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3538 scm_try_arbiter and scm_release_arbiter.
3539 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3540 for speed on i386, otherwise using mutex.
3541
3542 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3543 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3544 exact and inexact is #f.)
3545
3546 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3547 to get thread safety of scm_ttyname.
3548
3549 * ports.c (ttyname): Remove prototype, unused.
3550
3551 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
3552 Reported by Michael Tuexen.
3553
3554 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3555
3556 * load.c (scm_init_load_path): Do not pass NULL to
3557 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3558 not set. Thanks to Bill Schottstaedt.
3559
3560 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3561
3562 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3563 locale strings instead of accessing their internals.
3564 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3565 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3566 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3567
3568 * simpos.c (scm_system): Convert SCM strings to locale strings
3569 instead of accessing their internals.
3570
3571 * script.c (scm_compile_shell_switches): Convert version to locale
3572 string before printing it.
3573
3574 * rdelim.c (scm_read_delimited_x): Avoid
3575 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3576 of scm_from_long for the returned number of read characters.
3577
3578 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3579 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3580
3581 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3582 Use them instead of SCM_SYSCALL when one or two strings need to be
3583 converted into locale strings.
3584 (my_rename): New, gathers platform dependent code for renaming.
3585 (scm_rename): Use it.
3586 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3587 strings instead of accessing their internals.
3588 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3589 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3590 SCM_STRING_LENGTH.
3591
3592 * extensions.c (load_extension): Convert lib and init to locale
3593 strings instead of accessing the internals directly.
3594 (scm_c_load_extension): Use scm_from_locale_string instead of
3595 scm_makfrom0str.
3596
3597 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3598 scm_fdes_to_port, but take mode bits directly instead of as a C
3599 string.
3600 (scm_i_fdes_to_port): Implement using above.
3601 (scm_open_file): Use scm_i_fdes_to_port together with
3602 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3603 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3604 with scm_i_mode_bits to avoid accessing internals of SCM string
3605 from C.
3606
3607 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3608 SCM string as argument.
3609
3610 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3611 bits directly instead of C string.
3612 (scm_void_port): Implement using above.
3613 (scm_sys_make_void_port): Use scm_i_void_port together with
3614 scm_i_mode_bits to avoid accessing internals of SCM string.
3615
3616 * strings.h, strings.c (scm_i_get_substring_spec): New.
3617
3618 * socket.c, rw.c, deprecated.h, validate.h
3619 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3620 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3621 scm_to_locale_string, etc.
3622 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3623 above, plus scm_i_get_substring_spec.
3624
3625 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3626 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3627 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3628 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3629 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3630 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3631 with more explicit scm_remember_upto_here_1, etc, or introduced
3632 them in the first place.
3633
3634 * posix.c (WITH_STRING): New helper macro. Use it where one
3635 locale string is needed for a short piece of code.
3636 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3637 when one locale string is needed.
3638 (scm_mkstemp): Convert tmpl to a locale string.
3639 (scm_putenv): Rewritten to use only C strings.
3640 (scm_setlocale, scm_crpt): Convert argument strings to locale
3641 strings.
3642
3643 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3644
3645 * load.c (scm_primitive_load_path): Do not check for absolute
3646 filenames when scm_sys_search_load_path returns false, which will
3647 return absolute filenames unchanged.
3648
3649 2004-08-11 Marius Vollmer <mvo@zagadka.de>
3650
3651 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3652 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3653 of an alist. Thanks to Matthias Koeppe!
3654
3655 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3656
3657 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3658 Moved from string.h to deprecated.h.
3659
3660 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3661
3662 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
3663 SCM_I_MAKE_STRING_TAG, changed all uses.
3664 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3665 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3666 respectively. For a short time, the old names are still there as
3667 aliases. Not all uses have been changed yet, but the ones in
3668 strings.c have.
3669 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3670 SCM_T_BITS_MAX.
3671 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3672 scm_take_locale_string, scm_take_locale_stringn,
3673 scm_to_locale_string, scm_to_locale_stringn,
3674 scm_to_locale_stringbuf): New.
3675 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3676 deprecated.[hc]. Implemented in terms of the new functions above.
3677 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3678 scm_makfrom0str): Reimplemented in terms of the new functions from
3679 above. They will be discouraged shortly.
3680 (scm_substring): Do not use scm_mem2string.
3681 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3682 to replace similar code from posix.c, simpos.c, and dynl.c.
3683 (scm_string_append): Use memcpy instead of explicit loop. Do not
3684 use register keyword. Use plain 'char' instead of 'unsigned
3685 char'.
3686
3687 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3688 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3689
3690 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3691 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3692 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3693 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3694
3695 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3696 string. This avoids a conversion round-trip.
3697
3698 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3699 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3700 SCM_I_STRING_LENGTH, respectively.
3701 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3702
3703 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3704 of a string, call scm_display on the string itself.
3705
3706 * dynwind.c, dynwind.h (scm_frame_free): New.
3707
3708 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3709 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3710 Replaced uses of SCM_STRING_CHARS with proper uses of
3711 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3712 Replaced scm_mem2string with scm_from_locale_string.
3713
3714 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3715 Removed, replaced all uses with scm_i_allocate_string_pointers.
3716
3717 * load.h, load.c (scm_internal_parse_path): Removed.
3718 (scm_parse_path): Use scm_string_split to do the work.
3719 (scm_init_load_path): Use scm_parse_path instead of
3720 scm_internal_parse_path.
3721 (scm_search_path): Rewritten string handling part of the code in
3722 terms of scm_to_locale_stringbuf and so that it is thread safe.
3723
3724 * error.c (scm_error_scm): Throw directly instead of calling
3725 scm_error, this avoids the back and forth conversion of SUBR and
3726 MESSAGE and also plugs a memory leak.
3727 (scm_error): Call scm_error_scm.
3728
3729 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3730 (display_header): Print FNAME when it is true, not
3731 merely when it is a string.
3732
3733 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3734 unceremoniously. They were unused by Guile itself, and external
3735 use should stop immediately.
3736
3737
3738 2004-08-10 Marius Vollmer <mvo@zagadka.de>
3739
3740 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3741 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3742 deprecated versions installed in deprecated.h and deprecated.c.
3743 Changed all uses.
3744
3745 2004-08-06 Rob Browning <rlb@defaultvalue.org>
3746
3747 * net_db.c (scm_resolv_error): don't cause an exception while
3748 trying to throw an exception -- call scm_misc_error with correct
3749 arguments. The previous arguments needed a format escape that
3750 wasn't in any of the format strings.
3751
3752 2004-08-06 Kevin Ryde <user42@zip.com.au>
3753
3754 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3755 so as not to depend on signedness of plain char. For byvect range
3756 check, throw out-of-range rather than wrong-type-arg.
3757
3758 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3759 signed byte range checks by using scm_to_schar and scm_from_schar,
3760 don't want to depend on signedness of C char.
3761
3762 2004-08-05 Kevin Ryde <user42@zip.com.au>
3763
3764 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3765 SCM_DEFER_INTS.
3766 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3767 guaranteed if multiple threads compete to unlock.
3768 Update docstrings per doc/ref/api-scheduling.texi.
3769
3770 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3771 stat on the filename, to be certain a file rename can't mean we get
3772 info on one filesystem object but open another. This fstat usage is
3773 similar to Emacs copy-file.
3774
3775 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3776
3777 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3778 SIGINT and SIGQUIT, since those values are ints.
3779
3780 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3781
3782 * num2integral.i.c, num2float.i.c: Removed.
3783 * Makefile.am (noinst_HEADERS): Updated.
3784
3785 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3786 scm_i_make_ratio and made static, replaced uses with scm_divide.
3787 (scm_complex_p): New, export as "complex?" to Scheme.
3788 (scm_number_p): Export as "number?" to Scheme.
3789 (scm_is_complex, scm_is_number): New.
3790 (scm_c_make_rectangular, scm_c_make_polar): New.
3791 (scm_make_rectangular, scm_make_polar): Use above.
3792 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3793 New.
3794 (scm_make_complex): Discouraged by moving to discouraged.h and
3795 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3796
3797 * discouraged.h, discouraged.c, numbers.c, numbers.h
3798 (scm_is_rational): New.
3799 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3800 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3801 Removed prototypes.
3802 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3803 Discouraged by moving to discouraged.h and discouraged.c.
3804 Replaced all uses with scm_from_double.
3805 (scm_num2float, scm_num2double): Discouraged by moving prototype
3806 to discouraged.h and rewriting in terms of scm_to_double.
3807 Replaced all uses with scm_to_double.
3808 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3809 explicit code.
3810 (scm_from_double): Do not implement in terms of scm_make_real, use
3811 explicit code.
3812
3813 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3814
3815 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3816
3817 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3818 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3819
3820 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3821 Renamed to SCM_I_* in order to avoid collisions with the versions
3822 defined in deprecated.h.
3823
3824 * discouraged.h, discouraged.c: New files.
3825
3826 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
3827 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
3828 deprecated to being discouraged by moving to discouraged.h.
3829
3830 * numbers.h, numbers.c, discouraged.h, discouraged.c
3831 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
3832 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
3833 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
3834 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
3835 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
3836 scm_num2ulong_long): Discouraged by moving to discouraged.h and
3837 discouraged.c and reimplementing in terms of scm_from_* and
3838 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
3839 functions.
3840
3841 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
3842 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
3843 scm_i_size2big, scm_i_ptrdiff2big): Removed.
3844 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
3845 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
3846 explicit code.
3847
3848 2004-08-02 Kevin Ryde <user42@zip.com.au>
3849
3850 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
3851 and current usage and migration.
3852
3853 2004-07-31 Kevin Ryde <user42@zip.com.au>
3854
3855 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
3856 it's not thread safe.
3857 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
3858 advantage of this.
3859 * fports.c (scm_open_file): Use scm_strerror likewise.
3860 * filesys.c (scm_stat, scm_lstat): Ditto.
3861
3862 * filesys.c (scm_copy_file): Avoid fd leak when destination file
3863 cannot be opened.
3864
3865 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
3866 update, for thread safety.
3867 (gensym_counter): Move into scm_gensym which is its only user.
3868 (scm_init_symbols): No need to explicitly initialize gensym_counter.
3869
3870 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3871
3872 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
3873 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
3874 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
3875 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
3876 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
3877 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
3878 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
3879 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
3880 defined in terms of scm_to_signed_integer, etc, but in terms of
3881 scm_to_int8, etc.
3882
3883 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
3884
3885 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
3886 no longer used.
3887
3888 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
3889 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
3890
3891 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
3892 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
3893 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
3894 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
3895 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
3896 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
3897 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
3898
3899 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
3900 the functions below.
3901
3902 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
3903 conv-uinteger.i.c.
3904
3905 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
3906 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
3907 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
3908 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
3909 scm_from_uint64): Turned from macros into proper functions.
3910 (scm_to_signed_integer, scm_to_unsigned_integer,
3911 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
3912 conv-integer.i.c and conv-uinteger.i.c, as well.
3913
3914 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
3915 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
3916 the limits. Those are always defined.
3917
3918 2004-07-29 Kevin Ryde <user42@zip.com.au>
3919
3920 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
3921
3922 2004-07-28 Kevin Ryde <user42@zip.com.au>
3923
3924 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
3925 safety.
3926
3927 * unif.c (scm_array_set_x): For svect, use scm_num2short for
3928 consistency with other vector types and to get arg and func name into
3929 error message.
3930
3931 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3932
3933 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
3934 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
3935 scm_from_bool, respectively.
3936 (SCM_NINUMP): Added.
3937
3938 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
3939 deprecated.h. Replaced all uses with scm_is_eq.
3940
3941 2004-07-24 Kevin Ryde <user42@zip.com.au>
3942
3943 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
3944 * posix.c (scm_crypt): Use it to protect static data in crypt().
3945
3946 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3947
3948 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
3949 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
3950 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
3951 versions to deprecated.h and deprecated.c. Changed all uses to
3952 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
3953 scm_from_*, as appropriate.
3954
3955 * dynwind.c (scm_i_dowinds): Removed unused code that would call
3956 the unexisting scm_cross_dynwind_binding_scope for inums on the
3957 windlist.
3958
3959 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3960
3961 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
3962 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
3963 byte-wise address to a SCM integer. Changed all uses.
3964 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
3965 scm_to_ipv6 and added type and range checking, for converting from
3966 an IPv& byte-wise address to a SCM integer. Changed all uses.
3967 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
3968 is now done by scm_to_ipv6.
3969
3970 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
3971 not accept inexact integers.
3972
3973 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
3974 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
3975 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
3976 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
3977 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
3978 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
3979 fixnum/bignum distinction visible. Changed all uses to
3980 scm_to_size_t or similar.
3981
3982 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3983
3984 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
3985
3986 2004-07-10 Kevin Ryde <user42@zip.com.au>
3987
3988 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
3989 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
3990 such a size causes divide-by-zeros in scm_hasher.
3991
3992 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
3993 leak.
3994
3995 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3996
3997 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
3998 Rewritten using the same logic as scm_to_signed_integer and
3999 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4000 use CHAR_BIT instead of hardcoding 8.
4001 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4002 SCM_I_LLONG_MIN etc. instead.
4003
4004 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4005 SCM_I_MAKINUM and changed all uses.
4006 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4007
4008 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4009 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
4010 them by assuming twos-complement.
4011
4012 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4013
4014 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4015 configure now produces.
4016 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4017 definitions, giving the limits of the integer types defined by
4018 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4019 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4020
4021 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4022 SHORT_MIN.
4023 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4024 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4025 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4026 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4027 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4028 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4029 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4030 scm_from_uintmax): New.
4031
4032 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4033
4034 * tags.h (scm_is_eq): New.
4035
4036 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4037 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4038 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4039 scm_from_bool, and scm_is_bool, respectively.
4040
4041 * boolean.h (scm_is_bool): Fix bug in prototype.
4042 (scm_from_bool): The argument is "x" not "f", stupid.
4043
4044 * boolean.c (scm_is_bool): Fix typo.
4045
4046 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4047 scm_is_unsigned_integer, scm_to_signed_integer,
4048 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4049 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4050 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4051 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4052 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4053 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4054 New.
4055
4056 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4057
4058 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4059 scm_to_bool): New.
4060
4061 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4062
4063 * backtrace.c (display_expression, display_frame): Call
4064 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4065 single memoized expression.
4066
4067 * debug.c (memoized_print): Don't try to unmemoize the memoized
4068 object, since we can't know whether it holds a single expression
4069 or a body.
4070
4071 (scm_mem_to_proc): Removed check for lambda expression, since it
4072 was moot anyway. Whoever uses these functions for debugging
4073 purposes should know what they do: Creating invalid memoized code
4074 will cause crashes, independent of whether this check is present
4075 or not.
4076
4077 (scm_proc_to_mem): Take the closure's code as it is and don't
4078 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4079 memoized code should not be modified.
4080
4081 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4082 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4083 available as a guile internal function instead. However,
4084 scm_i_unmemoize_expr will only work on memoized objects that hold
4085 a single memoized expression. It won't work with bodies.
4086
4087 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4088 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4089 i. e. a list of expressions.
4090
4091 * eval.c (unmemoize_exprs): Drop internal body markers from the
4092 output during unmemoization.
4093
4094 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4095 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4096 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4097 as guile internal functions instead. scm_i_unmemoize_expr will
4098 only work on a single memoized expression, while
4099 scm_i_unmemocopy_body will only work on bodies.
4100
4101 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4102
4103 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4104
4105 (scm_cons_source, scm_primitive_eval): Prefer higher level
4106 predicate SCM_FALSEP over SCM_IMP.
4107
4108 2004-06-15 Rob Browning <rlb@defaultvalue.org>
4109
4110 * script.c (scm_shell_usage): minor phrasing change.
4111
4112 * gc_os_dep.c: update ifdefery for macosx.
4113 (scm_get_stack_base): separate result initialization from
4114 declaration to slience warnings with macosx and hp-ux using gcc
4115 3.3. Thanks to Andreas Vögele.
4116
4117 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4118
4119 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4120
4121 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4122
4123 * list.[ch] (scm_i_finite_list_copy): New internal function to
4124 copy lists that are known to be finite (though not necessarily
4125 proper).
4126
4127 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4128 a closure's argument list like an expression of a body.
4129
4130 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4131 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4132 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4133 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4134 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4135 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4136 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4137 unmemoize_builtin_macro): New static functions and symbols.
4138
4139 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4140 now has a slightly different meaning: The memoized form that is
4141 receives as its argument is now interpreted as a sequence of
4142 expressions from a body.
4143
4144 (unmemocar, scm_unmemocar): Since the whole functionality of
4145 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4146 has its old content back and is deprecated, while unmemocar has
4147 been removed.
4148
4149 (SCM_BIT7): Removed.
4150
4151 (CEVAL): For unmemoizing a single expression, call
4152 unmemoize_expression instead of scm_unmemocopy, which now expects
4153 a sequence of body expressions. Eliminated unnecessary empty
4154 environment frame when executing let* forms. Eliminated
4155 unmemoization step from evaluator.
4156
4157 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4158
4159 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4160 macroexp and made static. Added new version of scm_macroexp that
4161 emits a deprecation warning and then calls macroexp.
4162 (scm_m_undefine): Issue deprecation warning.
4163
4164 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4165
4166 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4167 Modified to make set! work on symbols that represent syntactic
4168 keywords.
4169
4170 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4171
4172 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4173 compound expression as lvalue errors.
4174
4175 2004-05-24 Marius Vollmer <mvo@zagadka.de>
4176
4177 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4178 WINDER_DATA to a SCM.
4179
4180 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4181
4182 * goops.c (compute_getters_n_setters, create_standard_classes,
4183 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4184 lambda expression rather than creating them with scm_closure.
4185
4186 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4187
4188 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4189 misplaced syntactic keywords. This will not work unless guile's
4190 defmacro feature is deprecated.
4191
4192 (scm_m_case): Fixed a bug that caused the list of labels to grow
4193 with every case form.
4194
4195 2004-05-19 Kevin Ryde <user42@zip.com.au>
4196
4197 * numbers.c (scm_round_number): For inum and big, just return x. For
4198 real, use scm_round for 2^54-1 etc problems covered there.
4199
4200 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4201 doesn't provide trunc. This was for when `truncate' was done as a
4202 scm_tc7_dsubr, no longer required.
4203
4204 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4205 to stack marking call, two parameters and no cast on t->base.
4206
4207 2004-05-18 Marius Vollmer <mvo@zagadka.de>
4208
4209 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4210 processed hashtables back into the weak_hashtables list. Thanks
4211 to Bill Schottstaedt!
4212
4213 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4214
4215 * eval.c (unmemoize_quote): New static function.
4216
4217 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4218 representation of 'quote' and '@slot-ref' to an improper list.
4219 This reduces execution time, the number of cells used to hold the
4220 memoized code, and thus also reduces garbage collection time.
4221
4222 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4223
4224 (SCM_CEVAL): Changed macro handling to also work with macros that
4225 return improper lists. Added an assertion, that the code returned
4226 by a macro transformer will not lead to cycles in the memoized
4227 code.
4228
4229 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4230
4231 No functional change, just rearrangements of functions within the
4232 file.
4233
4234 * eval.c (scm_ilookup, scm_unbound_variable_key,
4235 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4236 the definitions used for execution, since that's where they will
4237 belong to later.
4238
4239 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4240
4241 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4242 throughout guile, has not been part of an official release yet,
4243 and the concept of sloppy predicates has never been a good idea.
4244
4245 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4246 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4247 Simplified.
4248
4249 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4250
4251 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4252 to make explicit what happens.
4253
4254 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4255
4256 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4257 explicit what happens.
4258
4259 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4260 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4261
4262 2004-05-11 Marius Vollmer <mvo@zagadka.de>
4263
4264 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4265 is indeed a procedure when it isn't a number.
4266
4267 2004-05-10 Marius Vollmer <mvo@zagadka.de>
4268
4269 Convert floating point numbers into strings with an arbitrary
4270 radix. Thanks to Richard Todd!
4271
4272 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4273 fit.
4274 (fx): Removed.
4275 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4276 number_chars): New, to support variable radices.
4277 (idbl2str): Use above instead of the old base-10 only tables.
4278 (iflo2str): Pass on new RADIX argument to idbl2str.
4279 (scm_number_to_string): Pass radix to iflo2str.
4280 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4281 iflo2str.
4282 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4283 possible radices.
4284
4285 2004-05-10 Kevin Ryde <user42@zip.com.au>
4286
4287 * numbers.c (scm_logbit_p): Correction to test above the end of an
4288 inum. Reported by Jan Konecny.
4289
4290 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4291
4292 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4293 scm_t_bits. Updated all users.
4294 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4295 duplicating the code.
4296 (SCM_CELL_OBJECT_LOC): New.
4297 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4298 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4299
4300 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4301 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4302 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4303 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4304 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4305 SCM_SMOB_OBJECT_3_LOC): New.
4306 * smob.c (scm_i_set_smob_flags): New function.
4307
4308 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4309 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4310 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4311 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4312 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4313 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4314
4315 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4316 taking the address of SCM_CELL_WORD_1, the latter being no longer
4317 an lvalue.
4318
4319 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4320 of casting SCM_CELL_WORD_LOC.
4321
4322 2004-05-02 Kevin Ryde <user42@zip.com.au>
4323
4324 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
4325 --disable-deprecated. Reported by Andreas Vögele.
4326
4327 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
4328 particular on HP-UX). Reported by Andreas Vögele.
4329
4330 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4331 code has support for. Fixes building with AIX cc, which is ansi but
4332 doesn't define __STDC__. Reported by Keith Crane.
4333 (var_start): Remove macro, this variation no longer required.
4334 (scm_list_n): Use va_start directly.
4335
4336 2004-05-01 Kevin Ryde <user42@zip.com.au>
4337
4338 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
4339 is now gone. Reported by Andreas Vögele.
4340
4341 2004-04-28 Kevin Ryde <user42@zip.com.au>
4342
4343 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4344 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4345 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
4346 subscript. Reported by Andreas Vögele.
4347 Also cast through unsigned char to avoid passing negatives to those
4348 macros if input contains 8-bit values.
4349
4350 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4351 corrections to range check for signed numbers. Remove
4352 scm_remember_upto_here_1(num) from these checks, since num is used
4353 subsequently anyway.
4354
4355 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4356 avoid warning from gcc 3.4. Reported by Hyperdivision.
4357
4358 * numbers.c (scm_bit_extract): Use min instead of MIN.
4359 (MIN): Remove, this conflicts with similar macro defined by limits.h
4360 on HP-UX. Reported by Andreas Vögele.
4361
4362 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
4363 particular on HP-UX). Reported by Andreas Vögele.
4364
4365 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
4366 Reported by Andreas Vögele.
4367
4368 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4369 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
4370 by Andreas Vögele.
4371
4372 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4373
4374 * eval.c (s_macro_keyword): New static identifier.
4375
4376 (scm_m_define): Change order to first create binding and
4377 evaluating the expression afterwards.
4378
4379 (scm_m_set_x): Memoize complete set! expression. Only leave
4380 symbols if no binding exists at memoization time. Throw error if
4381 assigning to a syntactic keyword.
4382
4383 (lazy_memoize_variable): New function.
4384
4385 (CEVAL): When execution set!, perform lazy memoization if
4386 unmemoized symbol is detected.
4387
4388 * modules.c (module_variable): Return variables with unbound
4389 value.
4390
4391 * tags.h: Fix comment.
4392
4393 2004-04-25 Kevin Ryde <user42@zip.com.au>
4394
4395 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4396 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4397 in 8-bit locales, and ensures consistency with char-upper-case? and
4398 char-lower-case? which already use ctype.h.
4399 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4400 Remove.
4401 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4402
4403 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4404 call. Reported by Hyperdivision.
4405
4406 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4407 Reported by Hyperdivision.
4408
4409 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4410 Hyperdivision.
4411
4412 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4413
4414 Hide the implementation of ilocs and isyms in eval.c.
4415
4416 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4417 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4418 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4419 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4420 eval.h to eval.c.
4421
4422 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4423 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4424 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4425 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4426 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4427 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4428 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4429 renamed to ISYMNUM.
4430
4431 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4432 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4433 Extracted printing of ilocs and isyms to guile internal functions
4434 scm_i_print_iloc, scm_i_print_isym of eval.c.
4435
4436 2004-04-22 Kevin Ryde <user42@zip.com.au>
4437
4438 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4439
4440 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4441 rounding in x+0.5 when x is a big value already an integer. In
4442 certain hardware rounding cases x+0.5 can give an adjacent integer,
4443 leading to that as the result, when we really just wanted x itself.
4444
4445 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4446
4447 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4448
4449 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4450 added const qualifiers, cast intentionally unused expressions to
4451 void for emphasis, improved comment.
4452
4453 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4454
4455 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4456 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4457 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4458 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4459 Defined the tc8-tag for flags to be 0x04, which will mean that
4460 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4461 to the reduced number of bits and the simpler bit pattern for
4462 SCM_BOOL_F, certain machines may be able to use more efficient
4463 processor instructions to deal with SCM_BOOL_F.
4464
4465 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4466 never been defined in a released version, thus no need to
4467 deprecate them.
4468
4469 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4470 instead of tc9 tags.
4471
4472 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4473 of tc9 tags.
4474
4475 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4476 could have used this definition.
4477
4478 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4479 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4480 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4481 as isyms, as special isyms don't exist any more.
4482
4483 2004-04-18 Kevin Ryde <user42@zip.com.au>
4484
4485 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4486 safety.
4487
4488 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4489 explicit swapping code.
4490
4491 2004-04-15 Kevin Ryde <user42@zip.com.au>
4492
4493 * cpp_sig_symbols.in: Add SIGSYS.
4494
4495 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4496 recursion.
4497
4498 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4499 frac/big and frac/frac, use scm_less_p for exact comparison.
4500
4501 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4502 with big/inum.
4503
4504 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4505
4506 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4507
4508 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4509
4510 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4511 scm_c_{up,down}case.
4512 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4513 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4514
4515 2004-04-06 Kevin Ryde <user42@zip.com.au>
4516
4517 * numbers.c (scm_ash): Remove stray "}" in docstring.
4518
4519 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4520 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4521 calling mpz_cmp_ui in most cases.
4522
4523 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4524 for big == abs(most-negative-fixnum) special case.
4525 (abs_most_negative_fixnum): Remove, no longer used.
4526
4527 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4528 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4529 calling (sigaction NSIG).
4530
4531 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4532 and fork error cases to do this.
4533
4534 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4535
4536 * eval.c (CEVAL): Don't distinguish between short and long
4537 instructions when dispatching - just always dispatch on the
4538 instruction code, which is common for short and long instructions.
4539 Further, removed unnecessary goto statements and added comment.
4540
4541 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4542
4543 * eval.c (scm_unmemocopy): Don't distinguish between short and
4544 long instructions when dispatching - just always dispatch on the
4545 instruction code, which is common for short and long instructions.
4546 Further, removed unnecessary goto statements, fixed indentation
4547 and replaced SCM_IMP predicates by SCM_NULLP.
4548
4549 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4550
4551 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4552 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4553 'checkmacro'.
4554
4555 2004-03-31 Kevin Ryde <user42@zip.com.au>
4556
4557 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4558
4559 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4560
4561 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4562 SCM_DEBUGGINGP:
4563
4564 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4565 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4566 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4567 single interface that also matches the naming conventions.
4568 Probably scm_debug_mode_p should be part of the private interface
4569 anyway.
4570
4571 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4572 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4573 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4574 to scm_debug_mode_p.
4575
4576
4577 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4578
4579 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4580 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4581 from debug.h to eval.h.
4582
4583 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4584 more, just leave it with setting scm_debug_mode_p, which is
4585 equivalent for practical purposes.
4586
4587 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4588 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4589
4590 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4591
4592 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4593 static and renamed it to ceval throughout. Provide a new exported
4594 but deprecated function scm_ceval as a wrapper for backwards
4595 compatibility. The same is done for the deval/scm_deval pair of
4596 functions.
4597
4598 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4599 throughout. Defined CEVAL to ceval or deval, based on compilation
4600 phase.
4601
4602 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4603 to ceval and deval instead of calling *scm_ceval_ptr.
4604
4605 * eval.c (dispatching_eval): New deprecated static function.
4606
4607 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4608 to emulate its old behaviour as closely as possible.
4609
4610
4611 Change the evaluator such that only expressions for which pair? is
4612 true are passed to CEVAL, and such that all other expressions are
4613 evaluated outside of CEVAL:
4614
4615 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4616 expression that is assumed to be memoized already. All but
4617 expressions of the form '(<form> <form> ...)' are evaluated inline
4618 without calling an evaluator.
4619
4620 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4621 expressions of the form '(<form> <form> ...)' inline without
4622 calling an evaluator.
4623
4624 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4625 the special case of unmemoized symbols passed on the top level.
4626
4627 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4628 is known that the expression passed to CEVAL is of the form
4629 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4630 now it is known that the input expression of CEVAL is a pair.
4631
4632 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4633
4634 * eval.c (is_self_quoting_p): New static function.
4635
4636 (scm_m_quote): Use is_self_quoting_p.
4637
4638 (copy_tree): Corrected typo in comment.
4639
4640 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4641
4642 * eval.c (s_scm_copy_tree): idem.
4643
4644 * list.c (s_scm_filter): remove "pointer" from doc string.
4645
4646 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4647
4648 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4649
4650 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4651 (display_frame): idem.
4652 (display_backtrace_file_and_line): idem.
4653
4654 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4655 arguments.
4656
4657 2004-03-26 Kevin Ryde <user42@zip.com.au>
4658
4659 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4660
4661 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4662 big==0 since that never occurs.
4663
4664 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4665 scm_modular_expt, matching scheme level name `modulo-expt'.
4666
4667 * numbers.c (scm_modular_expt): Return a negative remainder for a
4668 negative divisor, the same as `modulo' does.
4669
4670 2004-03-26 Eric Hanchrow <offby1@blarg.net>
4671
4672 * numbers.c, numbers.h (scm_modular_expt): New function.
4673
4674 2004-03-25 Kevin Ryde <user42@zip.com.au>
4675
4676 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4677 return inexact as required by r5rs.
4678
4679 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4680
4681 * eval.c: Separated some definitions relevant for execution from
4682 the memoization part of the file.
4683
4684 (copy_tree): New static function
4685
4686 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4687 structures are detected now and will lead to an exception instead
4688 of forcing guile to run in an endless loop, using up all the
4689 system's memory. Second, arrays in the cdr of an improper list
4690 are now copied. See the new test cases in eval.test.
4691
4692 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4693
4694 * posix.c (scm_gethostname): Make sure len is initialised before
4695 it is used. Restructured to (hopefully) represent possible
4696 configurations more clearly in the code. Added unwind handler.
4697
4698 2004-03-23 Kevin Ryde <user42@zip.com.au>
4699
4700 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4701 MAXHOSTNAMELEN when available.
4702
4703 2004-03-21 Marius Vollmer <mvo@zagadka.de>
4704
4705 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4706 terminator. Rewritten the logic as a state machine, I must have
4707 been doing too much VHDL lately...
4708
4709 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4710 themselves. Thanks to Han-Wen Nienhuys!
4711
4712 * list.c: Changed docstrings so that they no longer talk about
4713 returning 'pointers' to something.
4714
4715 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4716
4717 * gc.c: remove set_debug_cell_accesses! when
4718 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4719 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4720 debugging conditionally.
4721
4722 2004-03-21 Kevin Ryde <user42@zip.com.au>
4723
4724 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4725
4726 2004-03-20 Kevin Ryde <user42@zip.com.au>
4727
4728 * posix.c (scm_gethostname): Preserve errno across free() call.
4729
4730 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4731
4732 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4733 free cells.
4734
4735 2004-03-14 Kevin Ryde <user42@zip.com.au>
4736
4737 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4738 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4739
4740 2004-03-07 Kevin Ryde <user42@zip.com.au>
4741
4742 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4743 than "GMT" always.
4744 (filltime): Make zname parameter "const".
4745
4746 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4747
4748 * threads.c, threads.h (scm_c_scm2thread): New function.
4749
4750 2004-02-29 Kevin Ryde <user42@zip.com.au>
4751
4752 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4753 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4754 particular don't assume "defined (__alpha__) && ! defined (linux)"
4755 means OSF. Remove "SCO" code, which was not really SCO specific and
4756 which John W. Eaton advises should be long past being needed.
4757
4758 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4759 error throw.
4760
4761 2004-02-24 Kevin Ryde <user42@zip.com.au>
4762
4763 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4764
4765 2004-02-22 Kevin Ryde <user42@zip.com.au>
4766
4767 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4768 complex, same as for two args. (Handle only inum, big, real, frac).
4769
4770 2004-02-21 Kevin Ryde <user42@zip.com.au>
4771
4772 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4773 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
4774 Reported by Andreas Voegele.
4775
4776 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4777
4778 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4779 validation.
4780
4781 * read.c (scm_lreadparen): Removed.
4782 (scm_lreadparen1): Renamed scm_i_lreadparen.
4783
4784 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4785
4786 * list.c (scm_list_n): validate non-immediate arguments;
4787 this will catch forgotten a SCM_UNDEFINED.
4788
4789 2004-02-18 Marius Vollmer <mvo@zagadka.de>
4790
4791 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4792 Thanks to Bill Schottstaedt!
4793
4794 * socket.h (scm_gethost): Removed prototype it is already in
4795 "net_db.h". Thanks to Bill Schottstaedt!
4796
4797 2004-02-18 Kevin Ryde <user42@zip.com.au>
4798
4799 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4800 order parameter to mpz_import, in fact with just one word there's no
4801 order to worry about at all.
4802
4803 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4804 and frac==complex, make an exact comparison rather than converting
4805 with fraction2double.
4806
4807 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4808 shared library, since environ is not directly available there.
4809
4810 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4811 standard.
4812
4813 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4814 errno EINVAL in case localtime and gmtime don't set it.
4815 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4816 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4817
4818 2004-02-16 Kevin Ryde <kevin@swox.se>
4819
4820 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4821 which were permitted in the past for these.
4822
4823 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
4824 previous change to numbers.c.
4825
4826 * script.c (scm_shell_usage): Print bug-guile email address, as per
4827 GNU standard. Reported by Han-Wen Nienhuys.
4828
4829 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4830
4831 * unif.c (scm_make_uve): Removed local variable and simplified
4832 code in order to avoid compiler used uninitialized warnings.
4833
4834 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
4835 scm_hash_map.
4836 (scm_hash_fold): Use scm_call_3 directly in the call to
4837 scm_internal_hash_fold instead of going via fold_proc (which is
4838 now removed).
4839 (scm_hash_for_each): Use a trampoline +
4840 scm_internal_hash_for_each_handle.
4841 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
4842 functions.
4843
4844 2004-02-12 Kevin Ryde <user42@zip.com.au>
4845
4846 * ports.c (scm_port_line): In docstring, note first line is 0.
4847 (scm_set_port_line_x): In docstring, note first line is 0.
4848 (scm_port_column): In docstring, there's no default to current input
4849 port, and remove shared port-line @defun.
4850 (scm_set_port_column_x): In docstring, there's no default to current
4851 input port, note first column is 0, remove shared set-port-line!
4852 @defun.
4853
4854 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
4855 convert args the same way that array-set! does.
4856
4857 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
4858 for dvect.
4859 (scm_array_p): Add missing "break"s in switch, fix llvect test look
4860 for "l" not "s", fix dvect to be false for singp(prot) since such a
4861 value is for fvect.
4862 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
4863 (exactly_one_third): New variable.
4864 (scm_init_unif): Initialize it.
4865
4866 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
4867
4868 * read.c (scm_read_opts): Change `escaped-parens' to
4869 `elisp-strings'.
4870
4871 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
4872
4873 * read.c (scm_read_opts): New opts `elisp-vectors' and
4874 `escaped-parens'.
4875 (s_vector): New.
4876 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
4877 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
4878 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
4879 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
4880 `escaped-parens' option set.
4881 (scm_read_token): If elisp vector syntax active, disallow [ and ]
4882 in tokens.
4883 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
4884 (scm_lreadparen1): New.
4885
4886 * read.h: Remove conditionally compiled last arg to
4887 scm_lreadparen.
4888 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
4889
4890 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
4891
4892 * eval.c (m_expand_body): remove stray variable new_body.
4893
4894 2004-01-22 Marius Vollmer <mvo@zagadka.de>
4895
4896 * eval.c (m_expand_body): Rewrite the expression in place (by
4897 overwriting FORMS) also when a letrec is constructed, not only
4898 when no definitions are found. Do not return rewritten expression
4899 to emphasize the in-place rewriting. Changed all users.
4900
4901 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
4902
4903 * gc.c: add protected_object_count, a number that is dumped from
4904 gc_stats()
4905
4906 2004-01-11 Marius Vollmer <mvo@zagadka.de>
4907
4908 * dynwind.h, dynwind.c (scm_frame_unwind,
4909 scm_frame_unwind_handler): Renamed and changed all uses.
4910 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
4911
4912 2004-01-11 Kevin Ryde <user42@zip.com.au>
4913
4914 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
4915 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
4916 changes made to scheme-compound.texi.
4917
4918 2004-01-10 Marius Vollmer <mvo@zagadka.de>
4919
4920 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
4921 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
4922
4923 * guile-snarf.in: Use mkdir to create a unique temporary directory
4924 that we can safely use. Thanks to Stefan Nordhausen!
4925
4926 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4927
4928 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
4929 argument since it is always zero now. Changed all callers.
4930 Removed code for handling fluids.
4931
4932 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
4933 the wind chain explicitely. Use scm_c_with_fluid for the common
4934 case of only one fluid.
4935 (scm_with_fluid): New.
4936 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
4937
4938 * fluids.h, fluids.c (scm_frame_fluid): New.
4939 (scm_with_fluid): New.
4940 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
4941
4942 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
4943 do the unwinding directly. It is simple enough.
4944
4945 * dynwind.h, dynwind.c: Did the following renamings:
4946 scm_begin_frame -> scm_frame_begin,
4947 scm_end_frame -> scm_frame_end,
4948 scm_on_unwind -> scm_frame_unwind,
4949 scm_on_rewind -> scm_frame_rewind,
4950 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
4951 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
4952 Changed all uses.
4953
4954 * aync.h, async.c: Did the follwing renamings:
4955 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
4956 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
4957 Changed all uses.
4958
4959 * ports.h, ports.c: Did the follwing renamings:
4960 scm_with_current_input_port -> scm_frame_current_input_port,
4961 scm_with_current_output_port -> scm_frame_current_output_port,
4962 scm_with_current_error_port -> scm_frame_current_error_port.
4963 Changed all uses.
4964
4965 2004-01-07 Kevin Ryde <user42@zip.com.au>
4966
4967 * numbers.c (s_bignum): Remove, not used since gmp bignums.
4968 Reported by Richard Todd.
4969
4970 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
4971 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
4972
4973 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
4974 traversing the args list, fixes segv if an improper list is given.
4975 Reported by Rouben Rostamian.
4976
4977 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4978
4979 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
4980 swap_data on stack, use a 'malloc obj'.
4981
4982 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
4983 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
4984 scm_i_... since they are internal. Changed all uses.
4985
4986 * dynwind.c (frame_print): Removed, use the default printer.
4987 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
4988 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
4989 to protect SCM values.
4990
4991 * dynwind.h (SCM_F_WIND_EXPLICITELY,
4992 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
4993 Changed all uses.
4994 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
4995
4996 2004-01-05 Marius Vollmer <mvo@zagadka.de>
4997
4998 * ports.h, ports.c (scm_with_current_input_port,
4999 scm_with_current_output_port, scm_with_current_error_port): New.
5000
5001 * async.h, async.c (scm_with_blocked_asyncs,
5002 scm_with_unblocked_asyncs): New.
5003
5004 2004-01-03 Marius Vollmer <mvo@zagadka.de>
5005
5006 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5007 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5008 New.
5009 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5010 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5011 function when the outermost wind point has been reached. The
5012 latter is used to copy a continuation stack at the right time.
5013 scm_dowinds remains available.
5014 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5015 tc16_guard, guards_print): Removed.
5016 (scm_internal_dynamic_wind): Reimplemented using frames.
5017
5018 * continuations.c (copy_stack): New, do only the stack copying
5019 part of copy_stack_and_call.
5020 (copy_stack_and_call): Copy the stack after unwinding and before
5021 rewinding.
5022 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5023 copy_stack_and_call.
5024
5025 2004-01-04 Kevin Ryde <user42@zip.com.au>
5026
5027 * numbers.c (scm_less_p): Don't convert frac to float for compares,
5028 can give bad results due to rounding.
5029
5030 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5031 setzone/restorezone protection for DOS.
5032
5033 2003-12-26 Marius Vollmer <mvo@zagadka.de>
5034
5035 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5036 and scm_t_uintmax to be defined in scmconfig.h
5037
5038 2003-12-03 Kevin Ryde <user42@zip.com.au>
5039
5040 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5041
5042 * numbers.c (scm_make_ratio): Check for numerator equal to
5043 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5044 giving integer -1.
5045
5046 * numbers.c (scm_real_part): Return fraction unchanged rather than
5047 converting to flonum.
5048
5049 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5050
5051 * modules.c (module_variable): Fixed (and thus simplified) the
5052 definition of SCM_BOUND_THING_P to reflect the fact that since
5053 after the 1.4 series of guile, obarrays only hold variable
5054 objects.
5055
5056 2003-11-30 Marius Vollmer <mvo@zagadka.de>
5057
5058 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5059
5060 From Paul Jarc:
5061
5062 * read.c (scm_lreadr): Signal an error for invalid escape
5063 sequences in strings. Code cleanups too.
5064
5065 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5066 writing control characters in strings.
5067
5068 2003-11-21 Marius Vollmer <mvo@zagadka.de>
5069
5070 * ports.c (scm_drain_input): Bug fix: only access the port after
5071 checking that it indeed is one.
5072
5073 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5074
5075 * eval.c (s_bad_define): New static identifier.
5076
5077 (m_body): Fixed comment.
5078
5079 (scm_m_define): Don't generate memoized code for definitions that
5080 are not on the top level. As a consequence, no memoized code at
5081 all is generated for definitions any more: Top level definitions
5082 are executed immediately during memoization and internal
5083 definitions are handled separately in m_expand_body.
5084
5085 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5086 definitions. Consequently, there is no unmemoizing code any more
5087 that might modify the environment. Thus, the old scm_unmemocopy
5088 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5089
5090 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5091 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5092 over SCM_NIMP in places, where the argument is known to be part of
5093 a proper list.
5094
5095 2003-11-21 Kevin Ryde <user42@zip.com.au>
5096
5097 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5098 for bignums.
5099
5100 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5101 to share some shifting.
5102
5103 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5104 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5105 since gc does this.
5106
5107 2003-11-19 Marius Vollmer <mvo@zagadka.de>
5108
5109 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5110 structure. Previously, not all cases with a negative denominator
5111 were covered.
5112
5113 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5114 scm_divide2real when forming the fractional part. This allows
5115 "#e1.2" to yield 6/5.
5116
5117 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5118 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5119 fractions were equal to each other regardless of value. Ooops.
5120
5121 * numbers.c (scm_rationalize): Return an inexact result when given
5122 inexact arguments.
5123
5124 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5125 non-numbers.
5126
5127 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5128
5129 Support for exact fractions from Bill Schottstaedt! Thanks!
5130
5131 * print.c (scm_iprin1): Handle fractions.
5132
5133 * objects.h (scm_class_fraction): New.
5134 * objects.c (scm_class_fraction): New.
5135 (scm_class_of): Handle fractions.
5136
5137 * hash.c (scm_hasher): Handle fractions.
5138
5139 * numbers.c: New code for handling fraction all over the place.
5140 (scm_odd_p, scm_even_p): Handle inexact integers.
5141 (scm_rational_p): New function, same as scm_real_p.
5142 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5143 New exact functions that replace the inexact 'dsubr'
5144 implementations.
5145 (scm_numerator, scm_denominator): New.
5146
5147 * numbers.h (SCM_NUMP): Recognize fractions.
5148 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5149 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5150 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5151 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5152 SCM_FRACTION_REDUCED): New.
5153 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5154 New prototypes.
5155 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5156 scm_rational_p): New prototypes.
5157 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5158 scm_i_print_fraction): New prototypes.
5159
5160 * goops.c (create_standard_classes): Create "<fraction>" class.
5161
5162 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5163
5164 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5165 case in the switch, but do nothing for now.
5166
5167 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5168 to doubles when calling 'dsubr' functions.
5169
5170 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5171
5172 2003-11-18 Rob Browning <rlb@defaultvalue.org>
5173
5174 * gen-scmconfig.c (main): remove public definition of
5175 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5176 direct typedef of long_long and ulong_long inside deprecated block
5177 when appropriate.
5178
5179 * deprecated.h: move long_long and ulong_long definitions to
5180 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5181 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5182
5183 2003-11-17 Marius Vollmer <mvo@zagadka.de>
5184
5185 * hash.c (scm_string_hash): New hashing algorithm that takes the
5186 complete string into account.
5187
5188 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5189 is a list. This allows (@ ...) to work with set!.
5190 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5191 SCM_ASSYNT.
5192
5193 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5194 the "-e" option instead of scm_str2symbol. This allows things
5195 like (@ ...) to be specified for the entry point.
5196
5197 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5198
5199 * eval.c (scm_m_letstar): Create memoized code in place to
5200 minimize consing.
5201
5202 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5203
5204 * eval.c (s_splicing): Commented and reformulated.
5205
5206 (lookup_global_symbol, lookup_symbol): New static functions.
5207
5208 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5209
5210 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5211 creating a temporary pair for scm_lookupcar.
5212
5213 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5214 created deprecated wrapper function scm_unmemocar.
5215
5216 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5217 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5218 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5219 undefineds, sym_three_question_marks): Moved around without
5220 modifications.
5221
5222 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5223
5224 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5225
5226 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5227 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5228 No further modifications.
5229
5230 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5231
5232 * eval.c (s_mixed_body_forms): New static identifier.
5233
5234 (canonicalize_define, scm_m_define): The check for a bad
5235 expression is performed in canonicalize_define now.
5236
5237 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5238 static helper functions for m_expand_body.
5239
5240 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5241 expand user defined macros. Fixed handling of the definition/
5242 expression boundary. Fixed handling of definitions grouped with
5243 'begin. Use canonicalize_define to expand definitions.
5244
5245 2003-11-13 Marius Vollmer <mvo@zagadka.de>
5246
5247 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5248 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5249
5250 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5251 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5252 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5253 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5254 New macros from Paul Jarc. Thanks!
5255
5256 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5257 return NULL when the machine type is unknown. Previously,
5258 gc_os_dep.c would refuse to compile.
5259
5260 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5261
5262 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5263 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5264 scm_m_body to m_body.
5265
5266 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5267
5268 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5269 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5270 scm_m_expand_body to m_expand_body and made it static. Added
5271 deprecated wrapper scm_m_expand_body.
5272
5273 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5274 of scm_m_expand_body.
5275
5276 2003-11-09 Kevin Ryde <user42@zip.com.au>
5277
5278 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5279 argument. Reported by Mike Gran.
5280
5281 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5282
5283 * eval.c (s_missing_body_expression): New static identifier.
5284
5285 (s_body): Removed.
5286
5287 (scm_m_expand_body): Fixed core dump when passing a body with
5288 defines, but without expressions (see additions to syntax.test).
5289 Use ASSERT_SYNTAX to signal syntax errors.
5290
5291 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5292
5293 * eval.c (canonicalize_define): New static helper function.
5294
5295 (memoize_define, canonicalize_define): Extract handling of
5296 function currying to canonicalize_define.
5297
5298 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5299
5300 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5301 Make sure that error checking in debug mode is not worse than in
5302 standard mode.
5303
5304 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5305
5306 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5307 handled in scm_m_body any more, but rather in scm_m_lambda.
5308
5309 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5310 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5311 calling functions of scm_m_body.
5312
5313 (scm_m_lambda): Avoid unnecessary consing when creating the
5314 memoized code.
5315
5316 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5317
5318 * eval.c (s_expression): Added comment.
5319
5320 (s_empty_combination, error_unbound_variable): New static
5321 identifiers.
5322
5323 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5324 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5325 signal syntax errors.
5326
5327 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5328 scheme objects.
5329
5330 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5331
5332 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5333 Grouped together with unmemocopy, without modifications.
5334
5335 (build_binding_list, unmemocopy): Renamed names of list arguments
5336 and variables to reflect the actual order of the list elements.
5337
5338 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5339
5340 * eval.c (s_defun): New static identifier.
5341
5342 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5343 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5344 when creating the memoized code.
5345
5346 2003-10-19 Kevin Ryde <user42@zip.com.au>
5347
5348 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5349
5350 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5351 in accordance with R5RS, which just mpz_get_d doesn't really give.
5352
5353 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5354
5355 * eval.c (s_bad_slot_number): New static identifier.
5356
5357 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5358 signal syntax errors. Avoid unnecessary consing when creating the
5359 memoized code.
5360
5361 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5362
5363 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5364 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5365 errors. Avoid unnecessary consing when creating the memoized
5366 code.
5367
5368 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5369 standard case. Make sure line and file information are copied to
5370 every created expression.
5371
5372 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5373
5374 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5375 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5376 when creating the memoized code.
5377
5378 (scm_m_atbind): Reversed the order, in which the init expressions
5379 are stored and executed. The order of execution is now equal to
5380 the order in which the initializers of the let-forms are executed.
5381 Use check_bindings and transform_bindings.
5382
5383 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5384 !SCM_NULLP. Added some comments.
5385
5386 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5387
5388 * eval.c: Sorted include files alphabetically.
5389
5390 (scm_m_begin): Added comment.
5391
5392 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5393 unnecessary consing when creating the memoized code.
5394
5395 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5396 syntax errors. Be more specific about the kind of error that was
5397 detected.
5398
5399 (scm_m_quote, unmemocopy): As an optimization, vector constants
5400 are now inserted unquoted into the memoized code. During
5401 unmemoization the quotes are added again to provide syntactically
5402 correct code.
5403
5404 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5405
5406 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5407 scm_m_expand_body, check_bindings): Extracted syntax checking of
5408 bindings to new static function check_bindings.
5409
5410 (scm_m_let, memoize_named_let): Extracted handling of named let to
5411 new static function memoize_named_let.
5412
5413 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5414 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5415 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5416 unnecessary consing when creating the memoized code.
5417
5418 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5419
5420 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5421 static identifiers.
5422
5423 (s_clauses, s_formals, s_duplicate_formals): Removed.
5424
5425 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5426 specific about the kind of error that was detected. Prepare for
5427 easier integration of changes for separated memoization.
5428
5429 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5430
5431 * eval.c (s_duplicate_binding): New static identifier.
5432
5433 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5434
5435 (scm_m_define): Added comment about how we check for duplicate
5436 formals.
5437
5438 (scm_m_do): Added check for duplicate bindings.
5439
5440 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5441 unnecessary consing when creating the memoized code.
5442
5443 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5444 scm_c_improper_memq to c_improper_memq, since it is not exported.
5445
5446 (transform_bindings): Call scm_c_memq rather than
5447 scm_c_improper_memq.
5448
5449 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5450
5451 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5452
5453 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5454 static identifiers.
5455
5456 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5457 specific about the kind of error that was detected. Avoid use of
5458 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5459 code, this way also making sure that file name, line number
5460 information etc. remain available.
5461
5462 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5463
5464 * eval.c (memoize_as_thunk_prototype): New static function.
5465
5466 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5467 Avoid unnecessary consing when creating the memoized code.
5468
5469 2003-10-12 Kevin Ryde <user42@zip.com.au>
5470
5471 * list.c (scm_append): Track argument number and use in error.
5472
5473 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5474
5475 * eval.c (s_missing_expression, s_bad_variable): New static
5476 identifiers.
5477
5478 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5479 R5RS terminology for the naming of variables. Be more specific
5480 about the kind of error that was detected. Make sure file name,
5481 line number etc. are added to all freshly created expressions.
5482 Avoid unnecessary consing when creating the memoized code.
5483
5484 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5485
5486 * eval.c (s_extra_expression, s_misplaced_else_clause,
5487 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5488
5489 (s_extra_case_clause): Removed.
5490
5491 (scm_m_case, scm_m_cond): If a clause appears after an else
5492 clause, report a misplaced else clause.
5493
5494 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5495 specific about the kind of error that was detected. Handle bound
5496 'else and '=>. Avoid unnecessary consing when creating the
5497 memoized code.
5498
5499 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5500 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5501 syntactic keyword '=>.
5502
5503 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5504
5505 * eval.c (scm_m_case): Allow empty lists of case labels.
5506
5507 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5508
5509 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5510
5511 * print.c (scm_isymnames): Add names for the new memoizer codes.
5512
5513 * eval.c (s_missing_clauses, s_bad_case_clause,
5514 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5515 literal_p): New static identifiers.
5516
5517 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5518 specific about the kind of error that was detected. Check for
5519 duplicate case labels. Handle bound 'else. Avoid unnecessary
5520 consing when creating the memoized code.
5521
5522 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5523 the syntactic keyword 'else.
5524
5525 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5526
5527 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5528 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5529
5530 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5531 unnecessary consing when creating the memoized code.
5532
5533 2003-10-09 Kevin Ryde <user42@zip.com.au>
5534
5535 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5536 cast gives for values bigger than a long, or for nan or inf.
5537
5538 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5539
5540 * smob.h (scm_make_smob_type): Made the declaration match the
5541 definition.
5542
5543 2003-10-07 Marius Vollmer <mvo@zagadka.de>
5544
5545 * goops.c, objects.h, smob.c, smob.h: Make type names char
5546 const * instead of char *. Thanks to Paul Jarc!
5547
5548 2003-10-02 Kevin Ryde <user42@zip.com.au>
5549
5550 * strports.c (scm_call_with_output_string): scm_get_output_string
5551 rather than scm_strport_to_string, so as to guard against the port
5552 having been closed by the called procedure. Reported by Nic Ferrier.
5553
5554 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5555
5556 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5557
5558 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5559 tags.h to deprecated.h.
5560
5561 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5562
5563 This set of patches introduces a new tc7 code scm_tc7_number for
5564 numbers. Bignums, reals and complex numbers are turned from smobs
5565 into subtypes of scm_tc7_number.
5566
5567 * tags.h (scm_tc7_number): New.
5568
5569 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5570 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5571 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5572 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5573 (scm_class_of), print.c (scm_iprin1), smob.c
5574 (scm_smob_prehistory): Don't handle bignums, reals and complex
5575 numbers as subtypes of scm_tc7_smob any more.
5576
5577 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5578 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5579
5580 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5581
5582 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5583 sizeof (scm_t_complex) to determine the memory size of the
5584 malloc'd area for complex numbers.
5585
5586 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5587
5588 * numbers.c (scm_bigequal): Fixed.
5589
5590 2003-09-16 Marius Vollmer <mvo@zagadka.de>
5591
5592 * stime.c (scm_current_time): 'time' does not set errno so don't
5593 use SCM_SYSERROR for reporting errors.
5594
5595 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5596
5597 This set of patches eliminates the dependency between the
5598 implementation of evaluator specific memoization codes and special
5599 constants like #f, '() etc. ('flags'), which are not evaluator
5600 specific. The goal is to remove definitions of evaluator
5601 memoization codes completely from the public interface. This will
5602 make it possible to experiment more freely with optimizations of
5603 guile's internal representation of memoized code.
5604
5605 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5606
5607 * print.c (iflagnames): New array, holding the printed names of
5608 guile's special constants ('flags').
5609
5610 (scm_isymnames): Now holds only the printed names of the
5611 memoization codes.
5612
5613 (scm_iprin1): Separate the handling of memoization codes and
5614 guile's special constants.
5615
5616 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5617 SCM_IFLAGNUM): new
5618
5619 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5620 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5621 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5622 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5623 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5624 values.
5625
5626 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5627
5628 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5629 tc9 macros and scm_tc9_flag.
5630
5631 2003-09-15 Marius Vollmer <mvo@zagadka.de>
5632
5633 * posix.c (scm_setgroups): Check that the gid list is not too
5634 long. Thanks to Paul Jarc!
5635
5636 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5637
5638 * tags.h: Reduced the number of short instructions from 14 to 13.
5639 The typecode of the former 14th short instruction is now used to
5640 represent long instructions. Changed some comments to reflect
5641 this fact.
5642
5643 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5644 previously used by SCM_IM_DEFINE.
5645
5646 (SCM_IM_DEFINE): Turned into a long instruction.
5647
5648 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5649 instruction.
5650
5651 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5652 code that is separate from all instructions, one level of dispatch
5653 for long instructions can be eliminated.
5654
5655 * print.c (scm_isymnames): Removed some commented code.
5656
5657 2003-09-12 Marius Vollmer <mvo@zagadka.de>
5658
5659 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5660 compiler on IA64.
5661
5662 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5663
5664 * modules.c (scm_module_reverse_lookup): Check that the obarray
5665 really is a hashtable and do nothing if not.
5666
5667 * inline.h: Use "extern inline" only with GCC. Use "static
5668 inline" else.
5669
5670 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5671
5672 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5673 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5674
5675 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5676 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5677 deprecated.h.
5678
5679 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5680
5681 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5682 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5683
5684 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5685 0.0==some_expression to some_expression==0.0. The latter is
5686 better readable. The former is preferred by some people, since it
5687 leads to a compiler error when confusing == with =. However, when
5688 using gcc, a warning will be issued if in an if-statement an
5689 assigment appears. Since many Guile developers are using gcc,
5690 such errors will not remain unnoticed anyway. We can therefore
5691 focus on better readability.
5692
5693 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5694
5695 * tags.h: Added description of Guile's type system. Removed some
5696 old and misleading comments.
5697
5698 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5699
5700 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5701 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5702
5703 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5704
5705 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5706
5707 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5708 respective SLOPPY macro.
5709
5710 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5711
5712 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5713 type string, not SCM_TYP7S.
5714
5715 2003-09-03 Kevin Ryde <user42@zip.com.au>
5716
5717 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5718 2s-complement.
5719
5720 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5721 current timezone requiring SCM_DEFER_INTS.
5722
5723 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5724
5725 * script.c (scm_compile_shell_switches): Make -s switch optional
5726 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5727 VanDevender for the patch!)
5728
5729 2003-08-30 Kevin Ryde <user42@zip.com.au>
5730
5731 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5732 and to have non-integer types rejected as per other logical funcs.
5733
5734 2003-08-28 Kevin Ryde <user42@zip.com.au>
5735
5736 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5737
5738 2003-08-23 Kevin Ryde <user42@zip.com.au>
5739
5740 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5741 thread safe, and could take a long time too.
5742
5743 2003-08-22 Kevin Ryde <user42@zip.com.au>
5744
5745 * numbers.c (scm_difference): Correction to bignum - negative inum.
5746
5747 2003-08-14 Kevin Ryde <user42@zip.com.au>
5748
5749 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5750 [__GNUC__]: Use volatile asm macros rather than a function call.
5751 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5752 macros while defining functions.
5753
5754 * simpos.c (getenv): Use <stdlib.h> for prototype.
5755 (scm_system): In docstring, refer to status:exit-val rather than
5756 "functions above".
5757
5758 2003-08-09 Kevin Ryde <user42@zip.com.au>
5759
5760 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5761 list set by source-properties! rather than an SRCPROPS object,
5762
5763 2003-07-29 Kevin Ryde <user42@zip.com.au>
5764
5765 * properties.c (scm_primitive_property_ref): In docstring, note
5766 parameters to not-found-proc, use hyphens rather than underscores for
5767 that parameter name.
5768 (scm_primitive_property_set_x): In docstring, VAL is the value
5769 parameter not CODE.
5770
5771 2003-07-27 Marius Vollmer <mvo@zagadka.de>
5772
5773 * print.c (scm_print_symbol_name): handle more weird characters by
5774 escaping the symbol name properly. Thanks to Paul Jarc!
5775
5776 * posix.h (scm_setgroups): New prototype.
5777 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5778 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5779 Don't use SCM_WRITABLE_VELTS.
5780
5781 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5782 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5783 Matthias Koeppe!
5784
5785 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5786 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5787 compiles when SCM_C_INLINE is undefined.
5788
5789 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5790
5791 * __scm.h: Reformulated the architecture and compiler properties
5792 in terms of properties of scm_t_bits and SCM variables rather than
5793 in terms of c standard types. This is since it is not known which
5794 of the standard types scm_t_bits and SCM variables will be defined
5795 to.
5796
5797 2003-07-24 Kevin Ryde <user42@zip.com.au>
5798
5799 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5800 and real.
5801
5802 2003-07-18 Kevin Ryde <user42@zip.com.au>
5803
5804 * numbers.c (scm_product): In complex * bignum, correction to
5805 REAL/IMAG fetch, x is the complex, not y.
5806
5807 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5808
5809 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5810 scm_inf_p test as Scheme values.
5811 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5812 and a positive inum.
5813 Use GNU indentation style.
5814
5815 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5816
5817 * values.c (scm_values): Build lists of length 1 by using
5818 scm_list_1 instead of using scm_cons.
5819
5820 2003-07-10 Kevin Ryde <user42@zip.com.au>
5821
5822 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5823 * list.c (scm_list_n): Ditto.
5824
5825 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
5826
5827 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
5828
5829 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
5830 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
5831 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
5832 the other using intptr_t.
5833
5834 2003-07-08 Kevin Ryde <user42@zip.com.au>
5835
5836 * numbers.c (scm_make_polar): Use sincos, when available.
5837 (scm_magnitude): Use hypot.
5838
5839 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
5840 @footnote since it doesn't go through to guile-procedures.txt.
5841
5842 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
5843 outside @var to quieten makeinfo, and use @code.
5844
5845 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5846
5847 * gc-malloc.c (decrease_mtrigger): new function
5848 (increase_mtrigger): new function, separate debug registering and
5849 mtrigger administration.
5850 (scm_gc_realloc): bugfix: do mtrigger administration before the
5851 actual realloc, for the realloc might invalidate a GC-d segment of
5852 memory. Thanks to Sam Hocevar for pointing this out.
5853 (scm_gc_realloc): use scm_malloc_reregister instead of
5854 unregistering and registering in sequence.
5855
5856 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5857
5858 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
5859
5860 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5861
5862 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
5863 clauses.
5864
5865 2003-06-29 Marius Vollmer <mvo@zagadka.de>
5866
5867 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
5868 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
5869 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
5870 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
5871 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
5872 the release_1_6 branch.
5873
5874 2003-06-25 Stefan Jahn <stefan@lkcc.org>
5875
5876 * continuations.c: Redeclaration of getcontext() via the
5877 __asm__ ("getcontext") directive.
5878
5879 * continuations.h: Include <ucontext.h> instead of
5880 <sys/ucontext.h>.
5881
5882 2003-06-21 Kevin Ryde <user42@zip.com.au>
5883
5884 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
5885 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
5886 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
5887 available.
5888 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
5889 (isfinite): Remove, conflicts with C99 isfinite().
5890
5891 2003-06-19 Marius Vollmer <mvo@zagadka.de>
5892
5893 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
5894 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
5895 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
5896 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
5897 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
5898 the release_1_6 branch.
5899
5900 2003-06-14 Stefan Jahn <stefan@lkcc.org>
5901
5902 * threads.h: Redefined scm_getspecific() and scm_setspecific()
5903 to be functions instead of macros.
5904
5905 * threads.c: Conditionalized inclusion of <sys/time.h> and
5906 <unistd.h>.
5907 (scm_getspecific, scm_setspecific): Made these two function
5908 real part of the API.
5909
5910 * posix.c (s_scm_putenv): Added some code to make a
5911 (putenv "FOO="), i.e. setting an empty string, work also on
5912 Win32 systems. Thanks to Kevin Ryde for the proposal.
5913
5914 2003-06-12 Kevin Ryde <user42@zip.com.au>
5915
5916 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
5917 freebsd to comment about need to use unsetenv.
5918
5919 2003-06-02 Marius Vollmer <mvo@zagadka.de>
5920
5921 * ports.c (scm_peek_char): Safe the column of the port around the
5922 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
5923
5924 2003-06-07 Kevin Ryde <user42@zip.com.au>
5925
5926 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
5927 and friends required by scm_t_bits setups.
5928
5929 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5930
5931 * tags.h (scm_tc2_int): Added.
5932
5933 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
5934 scm_tc2_int.
5935
5936 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
5937 scm_tcs_closures): Hard coded values replaced by symbolic ones.
5938
5939 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5940
5941 * eval.c: Partially undid my patch from 2003-05-31. This patch
5942 caused the segfault referenced in the previous changelog entry.
5943
5944 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5945
5946 * tags.h: Fixed comment about the immediate type code layout.
5947
5948 * eval.c: Fixed handling of non-special instructions. Without
5949 this patch, guile will segfault on (#\0) and similar instructions.
5950
5951 2003-06-05 Kevin Ryde <user42@zip.com.au>
5952
5953 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
5954 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
5955
5956 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
5957 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
5958
5959 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5960
5961 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
5962 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
5963 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
5964 generalized it to apply not only to C level functions but also to
5965 scheme level functions.
5966
5967 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
5968 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
5969 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
5970 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
5971 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
5972 respectively.
5973
5974 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
5975 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
5976 eval.h into eval.c and a copy is placed into deprecated.h.
5977
5978 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
5979 into eval.c. This definition was not part of the API in any
5980 officially released version of guile and thus does not need to go
5981 through a phase of deprecation.
5982
5983 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5984
5985 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
5986 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
5987 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
5988 definitions are make static and renamed from scm_s_xxx to s_xxx.
5989 In deprecated.c the original definitions are copied.
5990
5991 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
5992 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
5993 eval.h into eval.c and a copy (slightly modified to work in user
5994 code) is placed into deprecated.h.
5995
5996 * eval.c: Use the local static s_xxx definitions instead of the
5997 scm_s_xxx definitions throughout.
5998
5999 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6000
6001 This set of patches separates the representation of the cxr family
6002 of functions (car, cdr etc.) from the dsubr family of functions
6003 (i. e. functions that take a double precision floating point
6004 argument). Further, the algorithm for handling the cxr function
6005 is improved.
6006
6007 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6008 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6009 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6010 cosh, tanh), objects.c (scm_class_of), procprop.c
6011 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6012 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6013 typecode for the dsubr family of functions.
6014
6015 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6016 ramap_dsubr.
6017
6018 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6019 (scm_init_pairs): Make use of the (now usable) second cell element
6020 of a scm_tc7_cxr function to implement the cxr family of functions
6021 more efficiently.
6022
6023 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6024
6025 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6026 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6027 end of an if-else-if-sequence of checks.
6028
6029 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6030
6031 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6032 execution. Generalize apply_closure to apply_proc and use that
6033 for call-with-values.
6034
6035 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6036
6037 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6038 a non closure.
6039
6040 2003-05-30 Stefan Jahn <stefan@lkcc.org>
6041
6042 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6043 appropriately for mingw32 hosts.
6044
6045 * numbers.h: Defining copysign(), isnan() and finite() to
6046 be prefixed by a single '_' for mingw32 hosts.
6047
6048 2003-05-30 Kevin Ryde <user42@zip.com.au>
6049
6050 * numbers.c (z_negative_one): New variable.
6051 (scm_init_numbers): Initialize it.
6052 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6053
6054 2003-05-29 Stefan Jahn <stefan@lkcc.org>
6055
6056 * win32-dirent.c: Use malloc() instead of scm_malloc().
6057
6058 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6059 warning.
6060
6061 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6062 mingw32 build.
6063
6064 * modules.c (s_scm_module_import_interface): Renamed local
6065 variable interface to _interface. Seems like 'interface'
6066 is a special compiler directive for the mingw32 compiler.
6067
6068 * mkstemp.c: Provide prototype to avoid compiler warning.
6069
6070 * load.c (s_scm_search_path): Fixed absolute and relative
6071 path detections for native Windows platforms.
6072
6073 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6074 to build on mingw32).
6075
6076 * gc-freelist.c ("s_scm_map_free_list",
6077 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6078
6079 * fports.c (fport_fill_input): Disable use of
6080 fport_wait_for_input() on Win32 platforms.
6081
6082 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6083
6084 * Makefile.am: Modified some rules for cross compiling.
6085
6086 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6087
6088 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6089 proper function object and the correct number of arguments are now
6090 performed in the application part of SCM_CEVAL.
6091
6092 (scm_badformalsp): Removed.
6093
6094 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6095
6096 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6097
6098 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6099
6100 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6101 always being false by inserting preprocessor conditional. (Thanks
6102 to Bruce Korb.)
6103
6104 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6105 (void *) in order to avoid an aliasing warning; thanks to Bruce
6106 Korb.)
6107
6108 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6109
6110 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6111 SCM_STACK_PTR.
6112
6113 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6114 thread->base --> t->base.
6115
6116 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6117
6118 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6119
6120 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6121 scm_variable_set_name_hint, scm_builtin_variable,
6122 scm_internal_with_fluids, scm_make_gsubr,
6123 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6124 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6125 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
6126 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6127 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6128 scm_make_subr_with_generic, scm_make_subr_opt,
6129 scm_call_catching_errors, scm_make_smob_type_mfpe,
6130 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6131 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6132 branch. Some have been slightly rewritten.
6133 (scm_i_object_chars, scm_i_object_length): New, to support
6134 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6135
6136 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6137
6138 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6139 names and inits in the memoized code of do.
6140
6141 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6142
6143 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6144 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6145 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6146 a compilation error if error-on-warning is enabled).
6147
6148 2003-05-17 Marius Vollmer <mvo@zagadka.de>
6149
6150 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6151 removes preprocessor directives from the snarfage that might
6152 otherwise confuse us. These directives appear when compiling with
6153 "-g3", for example.
6154
6155 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6156
6157 * ChangeLog: add my surname
6158
6159 * srcprop.c (scm_finish_srcprop): use
6160 scm_gc_register_collectable_memory()
6161 (scm_make_srcprops): idem.
6162
6163 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6164
6165 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6166 wrap-around for scm_mtrigger
6167 (scm_gc_register_collectable_memory): abort on overflowing
6168 scm_mallocated().
6169
6170 2003-05-13 Kevin Ryde <user42@zip.com.au>
6171
6172 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6173 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6174
6175 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6176
6177 * backtrace.c (scm_display_error_message): Introduced fancy
6178 printing with max level 7 and length 10. (Purpose: avoid printing
6179 gigantic objects in error messages.)
6180
6181 * print.c, print.h (scm_i_port_with_print_state): New function.
6182
6183 * print.c (scm_iprin1, scm_printer_apply,
6184 scm_port_with_print_state): Use scm_i_port_with_print_state.
6185 (scm_simple_format): Modified not to destroy print states.
6186 (print_state_mutex): New mutex.
6187 (scm_make_print_state, scm_free_print_state, scm_prin1):
6188 Lock/unlock print_state_mutex.
6189
6190 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6191 Use current names in definitions.
6192
6193 2003-05-10 Kevin Ryde <user42@zip.com.au>
6194
6195 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6196
6197 * numbers.c (scm_integer_length): On negative bignums, adjust
6198 mpz_sizeinbase to account for it looking at absolute value where we
6199 want ones-complement.
6200
6201 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6202 since we're only using the ulong return value, and x might not fit.
6203
6204 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6205
6206 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6207 read. This will allow to make the definition in read.c static.
6208
6209 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6210
6211 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6212 from evalext to eval. This will allow to make some of the
6213 definitions in eval.c static.
6214
6215 2003-05-06 Kevin Ryde <user42@zip.com.au>
6216
6217 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6218 (scm_logcount): Use mpz_com, not mpz_neg.
6219
6220 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6221
6222 The purpose of this patch is to make guile's internal memoizers
6223 distinguishable from memoizing macros created on the scheme level
6224 or from user provided primitive memoizing macros. The reason is,
6225 that the internal memoizers are the only ones that are allowed to
6226 transform their scheme input into memoizer byte code, while all
6227 other memoizing macros may only transform scheme code into new
6228 scheme code.
6229
6230 To achieve this, a new macro type 'builtin-macro!' is introduced.
6231 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6232 this will change when the memoizer and executor are separated.
6233
6234 * macros.[ch] (scm_i_makbimacro): New.
6235
6236 * macros.h (SCM_BUILTIN_MACRO_P): New.
6237
6238 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6239
6240 * eval.c, goops.c: All of guile's primitive memoizing macros are
6241 primitive builtin-macros now.
6242
6243 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6244 builtin-macros are handled equally to memoizing macros.
6245
6246 2003-05-04 Marius Vollmer <mvo@zagadka.de>
6247
6248 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6249 work around a bug in GCC 2.95.2 but is now a bug in itself.
6250
6251 2003-05-02 Marius Vollmer <mvo@zagadka.de>
6252
6253 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6254 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6255 scm_tcs_symbols): New.
6256
6257 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6258
6259 * deprecated.h, deprecated.c (scm_protect_object,
6260 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6261 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6262 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6263 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6264 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6265 scm_ptob_descriptor, scm_port_rw_active,
6266 scm_close_all_ports_except): New.
6267
6268 * ports.c (scm_c_port_for_each): New function, mostly copied from
6269 scm_port_for_each.
6270 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6271 * ports.h (scm_c_port_for_each): New prototype.
6272
6273 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6274
6275 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6276 macro was introduced in anticipation of GOOPS method compilation
6277 code.)
6278
6279 * goops.c: Removed binding of @dispatch.
6280
6281 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6282
6283 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6284 instructions that bind the macros on the scheme level back to
6285 goops.c in order to make sure again that the bindings go into the
6286 (oop goops) module and are not visible from the outside.
6287
6288 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6289
6290 * eval.c: Non functional change: Separated R5RS and non-R5RS
6291 macros into different sections of the file and ordered the
6292 memoizers alphabetically.
6293
6294 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6295
6296 * eval.c (scm_ilookup): Rewritten to improve readability.
6297
6298 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6299
6300 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6301 Partially reverted patch from 2003-04-23 in oder to find a better
6302 compromise between readability and debuggability.
6303
6304 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6305
6306 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6307 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6308 definitions of the special goops memoizers from goops.[ch] to
6309 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6310 throughout guile.
6311
6312 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6313
6314 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6315
6316 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6317
6318 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6319
6320 * ioext.c (scm_fdes_to_ports): Ditto.
6321
6322 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6323 lock/unlock scm_i_port_table_mutex.
6324
6325 * strports.c (scm_mkstrport): Ditto.
6326
6327 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6328
6329 * fports.c (scm_fdes_to_port): Ditto.
6330
6331 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6332
6333 This set of patches contains no functional changes, only debatable
6334 minor stylistic ones. Still, in order to prepare a patch between
6335 my local copy and the CVS version, I decided to submit the changes
6336 below. Then, the patch will hopefully only contain relevant
6337 modifications :-)
6338
6339 * eval.c (iqq): Added const specifier.
6340
6341 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6342 Use NULL instead of 0 to indicate that a pointer is returned.
6343 Removed some misleading 'fall through' comments.
6344
6345 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6346 Split up long expressions into smaller ones to be more debugging
6347 friendly.
6348
6349 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6350
6351 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6352 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6353 rather than casting to SCM.
6354
6355 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6356
6357 * sort.c, pairs.h: Removed unnecessary includes.
6358
6359 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6360
6361 * sort.c: Replaced hand-made trampline code by the new official
6362 mechanism from eval.c. This fixes a segfault in the new test file
6363 sort.test.
6364
6365 (quicksort, compare_function, scm_restricted_vector_sort_x,
6366 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6367 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6368 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6369 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6370 eval.c.
6371
6372 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6373 cmp_fun_t): Removed.
6374
6375 (compare_function): Added.
6376
6377 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6378 arithmetics with index arithmetics. Changed quicksort to work on
6379 an array of SCM values instead of an array of characters. Avoid
6380 bytewise copying of SCM elements. Avoid allocating memory on the
6381 stack with alloca. Fixed some comments.
6382
6383 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6384
6385 * eval.c (EXTEND_ENV): Eliminated.
6386
6387 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6388 EXTEND_ENV.
6389
6390 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6391
6392 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6393
6394 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6395 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6396
6397 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6398 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6399 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6400 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6401 functions such that they check if the object is a non-immediate.
6402 Further, renamed identifiers to use the scm_dbg_ prefix and made
6403 their inclusion into the lib dependent of the
6404 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6405
6406 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6407
6408 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6409 debug option.
6410
6411 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6412
6413 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
6414 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6415 any calls to SCM_NCONSP any more.
6416
6417 * unif.c (l2ra): Eliminate redundant check.
6418
6419 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6420
6421 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6422 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6423 SCM_NNULLP. Now, guile itself does not include any calls to
6424 SCM_NNULLP any more.
6425
6426 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6427
6428 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6429 scm_copy_tree): Place assignment expressions which are part of
6430 other expressions into an expression of their own.
6431
6432 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6433
6434 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6435 compare SCM values with !=.
6436
6437 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6438
6439 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6440 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6441 and definition of the memoizer for the generalized set! macro from
6442 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6443 define the macro object.
6444
6445 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6446 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6447 eval.c, it is made static and renamed to s_set_x.
6448
6449 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6450 over SCM_N<foo>.
6451
6452 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6453
6454 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6455 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6456 to undefineds and registered the object as a permanent object.
6457
6458 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6459 static in eval.c, renamed it to f_apply and registered the object
6460 as a permanent object.
6461
6462 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6463
6464 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
6465 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6466
6467 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6468
6469 * numbers.c (scm_logtest): Fixed argument bug in the call to
6470 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6471
6472 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6473
6474 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6475 type errors that showed up when compiling with SCM_DEBUG defined.
6476
6477 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6478
6479 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6480 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6481 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6482 fix compile errors with --disable-deprecated.
6483
6484 2003-04-17 Rob Browning <rlb@defaultvalue.org>
6485
6486 * numbers.c (scm_integer_expt): fix case where we were declaring
6487 vars in the middle of a statement block. Thanks to Thamer
6488 Al-Harbash.
6489
6490 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6491
6492 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6493 change.
6494
6495 * eq.c (scm_eqv_p): Turned into a primitive generic.
6496
6497 2003-04-16 Rob Browning <rlb@defaultvalue.org>
6498
6499 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6500 Thanks to Boyd Gerber.
6501 Added check for __arm__ in addition to arm for LINUX and copied
6502 __s390__ defines from upstream libgc. Thanks to James Treacy for
6503 reporting the problems.
6504
6505 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6506
6507 * socket.c: use SCM_CHAR_BIT.
6508
6509 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6510
6511 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6512
6513 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6514
6515 * feature.c (scm_init_feature): Always add threads feature.
6516
6517 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6518
6519 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6520 scm_at_assert_bound_ref. (We don't want the unbound check. See
6521 oop/goops/active-slot.scm.)
6522
6523 2003-04-14 Rob Browning <rlb@defaultvalue.org>
6524
6525 * tags.h: scm_t_intptr should have been intptr_t.
6526
6527 2003-04-13 Rob Browning <rlb@defaultvalue.org>
6528
6529 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6530 test. Instead use
6531 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6532 as gc_os_dep.c suggests is appropriate.
6533
6534 * goops.c (prep_hashsets): make static to match prototype.
6535 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6536 Chin.
6537
6538 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6539 Albert Chin.
6540
6541 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6542 Klausner.
6543
6544 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6545
6546 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6547 indicated through extra fields in getters-n-setters.
6548 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6549 (Thanks to Andy Wingo.)
6550
6551 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6552
6553 * gc-segment.c: add comment
6554
6555 2003-04-07 Rob Browning <rlb@defaultvalue.org>
6556
6557 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6558 clash.
6559
6560 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6561 and add regression test to standalone/.
6562
6563 2003-04-06 Rob Browning <rlb@defaultvalue.org>
6564
6565 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6566 Thanks to Dale P. Smith.
6567
6568 * random.c: #include gmp.h.
6569 (scm_c_random_bignum): normalize result on return.
6570
6571 * init.c: #include gmp.h.
6572
6573 * numbers.h: remove the gmp.h #include (not needed now).
6574
6575 * posix.h: change occurences of "id" to something else so we don't
6576 cause trouble when included via objective-c (can't hurt, might
6577 help). Still have usage in debug.h, though.
6578
6579 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6580
6581 * random.c (scm_c_random_bignum): Don't generate a random number
6582 equal to m (the second argument of scm_c_random_bignum); only
6583 generate numbers in the range 0 <= r < m.
6584 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6585 scm_var_random_state.
6586
6587 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6588 clause.
6589
6590 2003-04-05 Rob Browning <rlb@defaultvalue.org>
6591
6592 * modules.c (scm_module_import_interface): move declaration of
6593 uses before any code.
6594
6595 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6596
6597 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6598 not top_srcdir.
6599
6600 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6601 processing it in order to avoid an infinite loop.
6602
6603 * print.c (scm_prin1): Remember old state of pstate->writingp.
6604
6605 2003-04-05 Marius Vollmer <mvo@zagadka.de>
6606
6607 * Changed license terms to the plain LGPL thru-out.
6608
6609 2003-04-04 Rob Browning <rlb@defaultvalue.org>
6610
6611 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6612 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6613 rewrite to handle GMP bignums.
6614
6615
6616 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6617
6618 * ports.c (scm_getc): minor tweak.
6619
6620 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6621 rewrite to handle GMP bignums.
6622
6623 * numbers.c: rewrite *many* functions to handle GMP bignums.
6624
6625 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6626 handle GMP bignums.
6627
6628 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6629
6630 * init.c (check_config): remove SCM_BIGDIG conditionals.
6631 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6632
6633 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6634
6635 * eval.c: remove SCM_BIGDIG conditionals.
6636
6637 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6638
6639 2003-03-31 Rob Browning <rlb@defaultvalue.org>
6640
6641 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6642 to Kevin Ryde.)
6643
6644 2003-03-27 Rob Browning <rlb@defaultvalue.org>
6645
6646 * threads.h: fix various preprocessor usages of new public
6647 symbols to expect 0 or 1 values rather than 1 or undefined.
6648 i.e. change #ifdef to #if, etc.
6649
6650 * threads.c: fix various preprocessor usages of new public
6651 symbols to expect 0 or 1 values rather than 1 or undefined.
6652 i.e. change #ifdef to #if, etc.
6653
6654 * tags.h: fix various preprocessor usages of new public
6655 symbols to expect 0 or 1 values rather than 1 or undefined.
6656 i.e. change #ifdef to #if, etc.
6657
6658 * stacks.c: fix various preprocessor usages of new public
6659 symbols to expect 0 or 1 values rather than 1 or undefined.
6660 i.e. change #ifdef to #if, etc.
6661
6662 * stackchk.h: fix various preprocessor usages of new public
6663 symbols to expect 0 or 1 values rather than 1 or undefined.
6664 i.e. change #ifdef to #if, etc.
6665
6666 * stackchk.c: fix various preprocessor usages of new public
6667 symbols to expect 0 or 1 values rather than 1 or undefined.
6668 i.e. change #ifdef to #if, etc.
6669
6670 * sort.c: fix various preprocessor usages of new public
6671 symbols to expect 0 or 1 values rather than 1 or undefined.
6672 i.e. change #ifdef to #if, etc.
6673
6674 * read.c: fix various preprocessor usages of new public
6675 symbols to expect 0 or 1 values rather than 1 or undefined.
6676 i.e. change #ifdef to #if, etc.
6677
6678 * random.c: fix various preprocessor usages of new public
6679 symbols to expect 0 or 1 values rather than 1 or undefined.
6680 i.e. change #ifdef to #if, etc.
6681
6682 * print.c: fix various preprocessor usages of new public
6683 symbols to expect 0 or 1 values rather than 1 or undefined.
6684 i.e. change #ifdef to #if, etc.
6685
6686 * objects.c: fix various preprocessor usages of new public
6687 symbols to expect 0 or 1 values rather than 1 or undefined.
6688 i.e. change #ifdef to #if, etc.
6689
6690 * numbers.h: fix various preprocessor usages of new public
6691 symbols to expect 0 or 1 values rather than 1 or undefined.
6692 i.e. change #ifdef to #if, etc.
6693
6694 * null-threads.c: fix various preprocessor usages of new public
6695 symbols to expect 0 or 1 values rather than 1 or undefined.
6696 i.e. change #ifdef to #if, etc.
6697
6698 * lang.c: fix various preprocessor usages of new public
6699 symbols to expect 0 or 1 values rather than 1 or undefined.
6700 i.e. change #ifdef to #if, etc.
6701
6702 * lang.h: fix various preprocessor usages of new public
6703 symbols to expect 0 or 1 values rather than 1 or undefined.
6704 i.e. change #ifdef to #if, etc.
6705
6706 * iselect.h: fix various preprocessor usages of new public
6707 symbols to expect 0 or 1 values rather than 1 or undefined.
6708 i.e. change #ifdef to #if, etc.
6709
6710 * init.c: fix various preprocessor usages of new public
6711 symbols to expect 0 or 1 values rather than 1 or undefined.
6712 i.e. change #ifdef to #if, etc.
6713
6714 * gh_data.c: fix various preprocessor usages of new public
6715 symbols to expect 0 or 1 values rather than 1 or undefined.
6716 i.e. change #ifdef to #if, etc.
6717
6718 * gh.h: fix various preprocessor usages of new public
6719 symbols to expect 0 or 1 values rather than 1 or undefined.
6720 i.e. change #ifdef to #if, etc.
6721
6722 * gen-scmconfig.c: change most new public symbols to be defined to
6723 0 or 1 rather than being either 1 or undefined.
6724
6725 * gc_os_dep.c: fix various preprocessor usages of new public
6726 symbols to expect 0 or 1 values rather than 1 or undefined.
6727 i.e. change #ifdef to #if, etc.
6728 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6729
6730 * gc.h: fix various preprocessor usages of new public
6731 symbols to expect 0 or 1 values rather than 1 or undefined.
6732 i.e. change #ifdef to #if, etc.
6733
6734 * gc-card.c: fix various preprocessor usages of new public
6735 symbols to expect 0 or 1 values rather than 1 or undefined.
6736 i.e. change #ifdef to #if, etc.
6737
6738 * gc-mark.c: fix various preprocessor usages of new public
6739 symbols to expect 0 or 1 values rather than 1 or undefined.
6740 i.e. change #ifdef to #if, etc.
6741
6742 * feature.c: fix various preprocessor usages of new public
6743 symbols to expect 0 or 1 values rather than 1 or undefined.
6744 i.e. change #ifdef to #if, etc.
6745
6746 * evalext.c: fix various preprocessor usages of new public
6747 symbols to expect 0 or 1 values rather than 1 or undefined.
6748 i.e. change #ifdef to #if, etc.
6749
6750 * eval.h: fix various preprocessor usages of new public
6751 symbols to expect 0 or 1 values rather than 1 or undefined.
6752 i.e. change #ifdef to #if, etc.
6753
6754 * eval.c: fix various preprocessor usages of new public
6755 symbols to expect 0 or 1 values rather than 1 or undefined.
6756 i.e. change #ifdef to #if, etc.
6757
6758 * eq.c: fix various preprocessor usages of new public
6759 symbols to expect 0 or 1 values rather than 1 or undefined.
6760 i.e. change #ifdef to #if, etc.
6761
6762 * coop.c: fix various preprocessor usages of new public
6763 symbols to expect 0 or 1 values rather than 1 or undefined.
6764 i.e. change #ifdef to #if, etc.
6765
6766 * coop-threads.c: fix various preprocessor usages of new public
6767 symbols to expect 0 or 1 values rather than 1 or undefined.
6768 i.e. change #ifdef to #if, etc.
6769
6770 * coop-pthreads.c: fix various preprocessor usages of new public
6771 symbols to expect 0 or 1 values rather than 1 or undefined.
6772 i.e. change #ifdef to #if, etc.
6773
6774 * coop-defs.h: fix various preprocessor usages of new public
6775 symbols to expect 0 or 1 values rather than 1 or undefined.
6776 i.e. change #ifdef to #if, etc.
6777
6778 * convert.i.c: fix various preprocessor usages of new public
6779 symbols to expect 0 or 1 values rather than 1 or undefined.
6780 i.e. change #ifdef to #if, etc.
6781
6782 * continuations.c: fix various preprocessor usages of new public
6783 symbols to expect 0 or 1 values rather than 1 or undefined.
6784 i.e. change #ifdef to #if, etc.
6785
6786 * _scm.h: fix various preprocessor usages of new public symbols to
6787 expect 0 or 1 values rather than 1 or undefined. i.e. change
6788 #ifdef to #if, etc.
6789
6790 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6791
6792 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6793
6794 * deprecated.c, deprecated.h: New files, to collect deprecated
6795 things in one place.
6796 * Makefile.am: Added them in all the right places.
6797
6798 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6799 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6800 builds work.
6801 (DOT_X_FILES): Removed "iselect.x".
6802 (DOT_DOC_FILES): Removed "iselect.doc".
6803
6804 2003-03-25 Rob Browning <rlb@defaultvalue.org>
6805
6806 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6807 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6808
6809 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6810
6811 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6812
6813 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6814 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6815
6816 * threads.h: replace usage of struct timespect with
6817 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6818 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6819 favor of scm_t_timespec from scmconfig.h.
6820
6821 * threads.c: move libguile/_scm.h include to the top so we pick up
6822 any critical defines like _GNU_SOURCE early. Replace usage of
6823 struct timespect with scm_t_timespec. Replace usage of
6824 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
6825 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
6826
6827 * threads-plugin.h: replace usage of struct timespect with
6828 scm_t_timespec.
6829
6830 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
6831 usage of struct timespect with scm_t_timespec.
6832
6833 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
6834 HAVE_INTTYPES_H handling to scmconfig.h. #include
6835 "libguile/__scm.h". Rework handling for scm_t_bits,
6836 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
6837 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
6838 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
6839 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
6840 SCM_HAVE_ARRAYS.
6841
6842 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
6843
6844 * struct.c: #include <config.h> if HAVE_CONFIG_H.
6845
6846 * strports.c: #include <config.h> if HAVE_CONFIG_H.
6847
6848 * strop.c: #include <config.h> if HAVE_CONFIG_H.
6849
6850 * stime.h: move handling of time related headers to scmconfig.h.
6851
6852 * stime.c: #include <config.h> if HAVE_CONFIG_H.
6853
6854 * stacks.c: replace usage of STACK_GROWS_UP with
6855 SCM_STACK_GROWS_UP.
6856
6857 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6858 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6859
6860 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6861 of uint32 and HAVE_UINT_32 with scm_t_int32.
6862
6863 * smob.c: #include <config.h> if HAVE_CONFIG_H.
6864
6865 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
6866
6867 * script.c: #include <config.h> if HAVE_CONFIG_H.
6868
6869 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
6870
6871 * scmconfig.h.top: new file -- preamble for scmconfig.h.
6872
6873 * rw.c: #include <config.h> if HAVE_CONFIG_H.
6874
6875 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
6876
6877 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6878
6879 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
6880
6881 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6882 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
6883 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
6884 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6885
6886 * ramap.c: replace usage of HAVE_LONG_LONGS with
6887 "SCM_SIZEOF_LONG_LONG != 0".
6888
6889 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
6890 "libguile/scmconfig.h".
6891
6892 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
6893
6894 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6895 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6896
6897 * posix.c: #include <config.h> if HAVE_CONFIG_H.
6898
6899 * ports.c: #include <config.h> if HAVE_CONFIG_H.
6900
6901 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6902
6903 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
6904 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
6905 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
6906 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
6907 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
6908 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
6909 "SCM_SIZEOF_LONG_LONG != 0".
6910
6911 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6912 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
6913 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
6914 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
6915
6916 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
6917
6918 * null-threads.h: replace usage of struct timespect with
6919 scm_t_timespec.
6920
6921 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
6922
6923 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
6924 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
6925 scm_t_uint64 and rename usages.
6926
6927 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
6928
6929 * load.c: #include <config.h> if HAVE_CONFIG_H.
6930
6931 * iselect.h: move handling of time related headers to scmconfig.h.
6932 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
6933 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
6934 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
6935
6936 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6937 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6938 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
6939
6940 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
6941
6942 * inline.h: #include "libguile/__scm.h" at the top. Change code
6943 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
6944 what to do instead of creating a new public #define. Rename usage
6945 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6946 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
6947 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
6948
6949 * inline.c: rearrange handling -- now we just #define
6950 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
6951 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
6952 appropriate, and we use that in inline.h along with the above
6953 define to determine how to respond.
6954
6955 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6956 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6957
6958 * guile.c: #include <config.h> if HAVE_CONFIG_H.
6959
6960 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6961 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6962
6963 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6964
6965 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
6966
6967 * gen-scmconfig.c: new file -- see comments in file for details.
6968
6969 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
6970
6971 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
6972 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
6973
6974 * gc.h: replace usage of SIZEOF_LONG with
6975 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
6976 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
6977 since we handle that in scmconfig.h now.
6978
6979 * gc.c: #include <config.h> if HAVE_CONFIG_H.
6980
6981 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6982 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
6983 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6984
6985 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
6986
6987 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6988 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6989
6990 * fports.c: #include <config.h> if HAVE_CONFIG_H.
6991
6992 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
6993
6994 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6995 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
6996
6997 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
6998
6999 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7000 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7001
7002 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7003 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7004 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7005 with "SCM_SIZEOF_LONG_LONG != 0".
7006
7007 * error.c: #include <config.h> if HAVE_CONFIG_H.
7008
7009 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7010 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7011 with "SCM_SIZEOF_LONG_LONG != 0".
7012
7013 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7014
7015 * coop.c: replace usage of struct timespect with scm_t_timespec.
7016 #include <config.h> if HAVE_CONFIG_H.
7017
7018 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7019 usage of struct timespect with scm_t_timespec. Replace usage of
7020 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7021
7022 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7023 usage of struct timespect with scm_t_timespec. Replace usage of
7024 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7025
7026 * coop-defs.h: move handling of time related headers to
7027 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7028 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7029 timespect with scm_t_timespec.
7030
7031 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7032
7033 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7034
7035 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7036 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7037
7038 * continuations.c: move libguile/_scm.h include to the top so we
7039 pick up any critical defines like _GNU_SOURCE early.
7040
7041 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7042
7043 * async.c: #include <config.h> if HAVE_CONFIG_H.
7044
7045 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7046
7047 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7048 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7049
7050 * __scm.h: move libguile/scmconfig.h include up to the top, so
7051 we're sure to pick up any critical defines like _GNU_SOURCE early.
7052 #include <limits.h> removed in favor of scmconfig.h inclusion when
7053 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7054 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7055 scmconfig.h inclusion when appropriate. Various Win32 related
7056 definitions removed in favor of scmconfig.h inclusion when
7057 appropriate.
7058 (HAVE_UINTPTR_T): definition removed (see NEWS).
7059 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7060 (HAVE_LONG_LONGS): definition removed (see NEWS).
7061 (HAVE_LONG_LONG): definition removed (see NEWS).
7062 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7063
7064 * Makefile.am: scmconfig.h is now generated by building and
7065 running gen-scmconfig.h and capturing its output. gen-scmconfig
7066 uses config.h and the configure.in generated gen-scmconfig.h to
7067 decide what to output. See gen-scmconfig.c for details.
7068 (noinst_PROGRAMS): add gen-scmconfig.
7069 (gen_scmconfig_SOURCES): new variable.
7070 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7071 cross-compiling right.
7072 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7073 (BUILT_SOURCES): add scmconfig.h.
7074
7075 2003-03-19 Marius Vollmer <mvo@zagadka.de>
7076
7077 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7078 Adrian Bunk. Thanks!
7079
7080 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7081
7082 * goops.c (make_class_from_template): New fourth arg:
7083 applicablep.
7084 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7085 cpls.
7086
7087 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7088
7089 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7090 second arg: applicablep.
7091 (scm_i_inherit_applicable): New function.
7092
7093 * goops.c, goops.h (scm_class_applicable,
7094 scm_class_extended_accessor): New classes.
7095
7096 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7097
7098 * procs.c (scm_procedure_documentation): Removed redundant
7099 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7100 predicates.
7101
7102 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7103
7104 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7105
7106 * modules.c (scm_module_import_interface): New function.
7107
7108 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7109 scm_class_accessor.
7110 (scm_class_accessor): New class.
7111
7112 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7113
7114 * goops.c (scm_primitive_generic_generic): Enable primitive
7115 generic if not enabled.
7116 (scm_sys_goops_loaded): Setup unextended primitive generics.
7117
7118 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7119
7120 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7121 snarf macros.
7122
7123 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7124 testing example. All uses of SCM_GPROC should be converted.)
7125
7126 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7127 scm_assoc.
7128
7129 * eq.c (scm_equal_p): Turned into a primitive generic.
7130
7131 2003-02-27 Rob Browning <rlb@defaultvalue.org>
7132
7133 * Makefile.am (scmconfig.h): new target -- generate file from
7134 ../config.h.
7135 (modinclude_HEADERS): remove version.h.
7136 (nodist_modinclude_HEADERS): add version.h.
7137
7138 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7139
7140 This fixes a serious GC bug, introduced during the latest
7141 reorganization of the GC, which disabled freeing of structs and
7142 GOOPS objects:
7143
7144 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7145 SCM_EOL.
7146 (scm_struct_prehistory): Move scm_free_structs to
7147 scm_before_mark_c_hook.
7148
7149 * gc-card.c (sweep_card): Check that we haven't swept structs on
7150 this card before. That can happen if scm_i_sweep_all_segments has
7151 been called from some other place than scm_igc.
7152
7153 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7154
7155 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7156 (since hash tables now adapt their size).
7157
7158 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7159 (current number of prehistory bindings; hashtable code will select
7160 a prime which is greater than this value).
7161
7162 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7163 (current number of initial symbols).
7164
7165 * properties.c (scm_init_properties): Don't specify size of
7166 scm_properties_whash.
7167
7168 * objprop.c (scm_init_objprop): Don't specify size of
7169 scm_object_whash.
7170
7171 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7172
7173 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7174
7175 The following changes introduce the use of resizable hash tables
7176 throughout Guile. It also renames the old *-hash-table* functions
7177 to *-alist-vector* and places them, together with the rest of the
7178 weak vector support, in the module (ice-9 weak-vector). We should
7179 probably introduce a new, better, API for weak references, for
7180 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7181 look like and are used like ordinary pairs.)
7182
7183 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7184 leaf_environment_fold, obarray_remove_all): Use hashtable
7185 accessors.
7186
7187 * gc.c (scm_init_storage): Moved hook initialization to
7188 scm_storage_prehistory.
7189 (scm_storage_prehistory): New function.
7190 (scm_igc): Added commentary about placement of
7191 scm_after_sweep_c_hook.
7192
7193 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7194 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7195 SCM_WVECT_WEAK_VALUE_P.
7196
7197 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7198 functions.
7199 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7200 Removed.
7201 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7202 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7203
7204 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7205 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7206
7207 * modules.c (module-reverse-lookup): Use hashtable accessors.
7208
7209 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7210
7211 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7212 scm_make_weak_value_alist_vector,
7213 scm_make_doubly_weak_alist_vector): New functions.
7214
7215 * weaks.c (scm_init_weaks_builtins): New function.
7216
7217 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7218 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7219 SCM_WVECT_NOSCAN_P): New macros.
7220
7221 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7222 and SCM_WVECT_WEAK_VALUE_P.
7223
7224 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7225 allocate_weak_vector and exported.
7226
7227 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7228
7229 * hashtab.c: Undid thread safety. (We decided that it's better to
7230 let the user explicitly protect the tables (or not) according what
7231 is suitable for the application.)
7232
7233 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7234
7235 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7236 thread safe and handle resizing tables.
7237 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7238 SCM_DEFER/ALLOW_INTS.
7239
7240 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7241
7242 * hashtab.c (scm_vector_to_hash_table,
7243 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7244 functions.
7245 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7246 safe and handle resizing tables.
7247
7248 * weaks.c (scm_make_weak_key_hash_table,
7249 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7250 Size argument made optional. Return resizable table if not
7251 specified.
7252
7253 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7254
7255 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7256 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7257
7258 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7259
7260 * debug.c (scm_procedure_source): Handle all objects for which
7261 procedure? is #t. (Thanks to Bill Schottstaedt.)
7262
7263 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7264
7265 * futures.c (mark_futures): Don't need to mark data of recycled
7266 futures.
7267 (scan_futures, cleanup_undead): Be smarter about marking
7268 futures---avoid unnecessary passes through future lists.
7269
7270 * futures.h, futures.c: New files; Introduced recycling of
7271 futures. For fine-grained threading this lifts performance to
7272 another level. We can now use parallelization in inner loops of
7273 Guile programs without impossible overhead.
7274
7275 * threads.h, threads.c: Moved futures to their own file.
7276
7277 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7278 (DOT_X_FILES): Added futures.x.
7279 (DOT_DOC_FILES): Added futures.doc.
7280 (modinclude_HEADERS): Added futures.h.
7281
7282 * threads.c, threads.h (scm_i_create_thread): Renamed from
7283 create_thread and made global.
7284
7285 * futures.c (scm_make_future): New procedure.
7286
7287 * eval.c: #include "libguile/futures.h".
7288
7289 * init.c: #include "futures.h"
7290 (scm_init_guile_1): Call scm_init_futures.
7291
7292 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7293
7294 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7295
7296 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7297 functions.
7298
7299 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7300
7301 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7302
7303 * threads.c (create_thread): Don't unwind dynwind chain of parent
7304 thread before creation. Just start the new thread with an empty
7305 dynwind chain.
7306
7307 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7308
7309 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7310
7311 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7312
7313 * threads.c (scm_timed_wait_condition_variable): Support timed
7314 waiting also for simple condition variables.
7315
7316 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7317 of calling the procedure change-object-class.
7318
7319 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7320
7321 * ramap.c (scm_ramapc): Typo in error message.
7322
7323 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7324
7325 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7326 slots with instance allocation.
7327
7328 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7329 class.
7330 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7331
7332 * goops.c (scm_generic_function_methods): Support extended
7333 generic functions.
7334
7335 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7336
7337 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
7338 Thanks to Neil for pointing this out!
7339
7340 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7341
7342 * lang.h: Remove declarations matching definitions removed from
7343 lang.c (just below).
7344
7345 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7346
7347 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7348 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7349 and already commented out.
7350
7351 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7352 scm_lreadparen): Support reading vectors with Elisp syntax if
7353 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7354 is not currently defined, and there isn't even a configure switch
7355 to enable it yet.)
7356
7357 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7358
7359 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7360 builds work.
7361 (EXTRA_DIST): Added version.h.in.
7362
7363 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7364
7365 This change makes it possible for one thread to do lazy sweeping
7366 while other threads are running. Now only the mark phase need to
7367 have all threads asleep. We should look further into this issue.
7368 Presently, I've put the locking of scm_i_sweep_mutex at
7369 "conservative" places due to my current lack of knowledge about
7370 the garbage collector. Please feel free to restrict these regions
7371 further to allow for maximal parallelism!
7372
7373 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7374
7375 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7376 scm_gc_register_collectable_memory): Substitute locking of
7377 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7378 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7379 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7380 the single-thread section (which now only contains the mark
7381 phase).
7382 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7383 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7384
7385 * threads.c (gc_section_mutex): Removed.
7386
7387 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7388
7389 * threads.c (create_thread): Clear parent field in root state in
7390 order not to unnecessarily remember dead threads.
7391
7392 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7393 (scm_trampoline_1, scm_trampoline_2): Use them.
7394
7395 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7396
7397 Partial introduction of real plugin interface.
7398
7399 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7400 (EXTRA_DIST): Added threads-plugin.c.
7401
7402 * threads-plugin.h, threads-plugin.c: New files.
7403
7404 * threads.h: #include "libguile/threads-plugin.h".
7405
7406 * threads.c: #include "libguile/threads-plugin.c".
7407
7408 * pthread-threads.c: Temporarily remove debugging functions.
7409
7410 * threads.c, threads.h (scm_yield): Added back.
7411
7412 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7413
7414 * threads.c (really_launch): Detach before unlocking
7415 thread_admin_mutex in order not to risk being joined.
7416 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7417 thread_admin_mutex locked during GC.
7418
7419 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7420 functions.
7421
7422 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7423
7424 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7425 support for debugging mutex operations.
7426
7427 * threads.c (scm_thread): Removed filed joining_threads.
7428 (thread_print): Print thread number as well as address of thread
7429 structure.
7430 (scm_join_thread): Bugfix.
7431 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7432 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7433 scm_broadcast_condition_variable): Use the low-level API.
7434 (scm_all_threads): Return copy of thread list (to prevent
7435 unintended destruction).
7436 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
7437
7438 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7439 pthread "native" recursive mutex support.
7440
7441 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7442
7443 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7444 Simply lock a thread C API recursive mutex.
7445 (SCM_NONREC_CRITICAL_SECTION_START,
7446 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7447 SCM_REC_CRITICAL_SECTION_END): Removed.
7448
7449 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7450 direct calls to scm_rec_mutex_lock / unlock around the three calls
7451 to scm_m_expand_body.
7452
7453 * eval.c, eval.h (promise_free): New function.
7454 (scm_force): Rewritten; Now thread-safe; Removed
7455 SCM_DEFER/ALLOW_INTS.
7456
7457 * pthread-threads.h: Added partially implemented plugin interface
7458 for recursive mutexes. These are, for now, only intended to be
7459 used internally within the Guile implementation.
7460
7461 * pthread-threads.c: New file.
7462
7463 * threads.c: Conditionally #include "pthread-threads.c".
7464
7465 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7466 thread-safe;
7467
7468 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7469 SCM_GLOBAL_REC_MUTEX): New macros.
7470
7471 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7472 macros---use mutexes instead.
7473
7474 * tags.h (SCM_IM_FUTURE): New tag.
7475
7476 * eval.c (scm_m_future): New primitive macro.
7477 (SCM_CEVAL): Support futures.
7478 (unmemocopy): Support unmemoization of futures.
7479
7480 * print.c (scm_isymnames): Name of future isym.
7481
7482 * version.c: Unmade some changes to my private copy that got
7483 committed by mistake.
7484
7485 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7486
7487 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7488 2002-12-10.
7489
7490 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7491
7492 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7493 logical place.
7494
7495 * threads.c (create_thread): Remember root object until the handle
7496 of the new thread is on all_threads list.
7497
7498 * root.c (scm_make_root): Moved copying of fluids until after
7499 creation of root handle so that the fluids are GC protected. Also
7500 removed the critical section.
7501
7502 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7503
7504 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7505
7506 * gc-malloc.c (malloc_mutex): New mutex.
7507 (scm_gc_malloc_prehistory): Initialize it.
7508 (scm_realloc): Serialize call to realloc
7509 (scm_calloc): Same for calloc.
7510 Thanks to Wolfgang Jaehrling!
7511 (Now we have to make sure all calls to malloc/realloc are made
7512 through scm_malloc.)
7513
7514 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7515
7516 * threads.c (really_launch): Release heap (to prevent deadlock).
7517 (create_thread): Release heap before locking thread admin mutex.
7518
7519 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7520
7521 * threads.c (scm_i_thread_invalidate_freelists): New
7522 function.
7523
7524 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7525
7526 * modules.c (scm_export): Inserted a return statement.
7527
7528 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7529
7530 * modules.c (scm_export): new function
7531
7532 * gc-card.c: add a note about malloc()/free() overhead.
7533
7534 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7535
7536 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7537 in srcdir.
7538
7539 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7540
7541 These changes remove scm_ints_disabled (which hasn't has any
7542 effect in Guile for quite some time).
7543
7544 * async.c, error.h (scm_ints_disabled): Removed.
7545
7546 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7547 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7548 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7549 (old_ints): Removed.
7550
7551 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7552 critical section.
7553 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7554 SCM_ALLOW_INTS.
7555
7556 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7557
7558 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7559 Removed accidental #if 0 around these functions.
7560
7561 These changes are the start of support for preemptive
7562 multithreading. Marius and I have agreed that I commit this code
7563 into the repository although it isn't thoroughly tested and surely
7564 introduces many bugs. The bugs should only be exposed when using
7565 threads, though. Signalling and error handling for threads is
7566 very likely broken. Work on making the implementation cleaner and
7567 more efficient is needed.
7568
7569 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7570 (SCM_NONREC_CRITICAL_SECTION_START,
7571 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7572 SCM_REC_CRITICAL_SECTION_END): New macros.
7573 (SCM_CRITICAL_SECTION_START/END): Defined here.
7574
7575 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7576 the three calls to scm_m_expand_body.
7577
7578 * gc.h: #include "libguile/pthread-threads.h";
7579 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7580
7581 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7582 scm_t_key;
7583
7584 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7585 access.
7586
7587 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7588
7589 * gc-freelist.c, threads.c (really_launch): Use
7590 SCM_FREELIST_CREATE.
7591
7592 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7593
7594 * gc.c (scm_i_expensive_validation_check, scm_gc,
7595 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7596 heap administration so that those pieces of code are executed
7597 single-threaded. We might consider rewriting these code sections
7598 in terms of a "call_gc_code_singly_threaded" construct instead of
7599 calling the pair of scm_i_thread_put_to_sleep () and
7600 scm_i_thread_wake_up (). Also, we would want to have as many of
7601 these sections eleminated.
7602
7603 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7604
7605 * inline.h: #include "libguile/threads.h"
7606
7607 * pthread-threads.h: Macros now conform more closely to the
7608 pthreads interface. Some of them now take a second argument.
7609
7610 * threads.c, threads.h: Many changes.
7611
7612 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7613
7614 * Makefile.am (version.h): Changed $^ --> $< in rule for
7615 version.h.
7616
7617 2002-12-08 Rob Browning <rlb@defaultvalue.org>
7618
7619 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7620 (SCM_MINOR_VERSION): use @--@ substitution now.
7621 (SCM_MICRO_VERSION): use @--@ substitution now.
7622 (scm_effective_version): new function prototype.
7623
7624 * version.c (scm_effective_version): new function, also add
7625 effective-version.
7626
7627 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7628 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7629 SCM_LIBRARY_DIR.
7630 (version.h): generate this here rather than configure.in. This
7631 approach tracks source edits better (i.e. more immediately).
7632 Might be worth considering for other .in files too.
7633
7634 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7635
7636 Reorganized thread package selection. A thread package now only
7637 implements a small set of pthread like functions and Guile
7638 implements the rest on top of that. Guile's implementation is
7639 what the "coop-pthreads" package has been previously. Support for
7640 "coop" threads has been removed until I get time to add it again.
7641
7642 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7643 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7644 null-threads.c, coop-pthreads.c.
7645 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7646 pthread-threads.h.
7647
7648 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7649
7650 * threads.h: Do not include "libguile/coop-defs.h". Include
7651 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7652 (previously deprecated) C level thread API prototypes. They are
7653 now in the thread package specific headers, "null-threads.h" and
7654 "pthread-threads.h".
7655 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7656 New.
7657 (scm_threads_init): Removed.
7658 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7659 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7660 SCM_I_THREAD_SWITCH_COUNT): Define here.
7661 (scm_single_thread_p): Removed.
7662 (scm_call_with_new_thread): Take two args directly instead of list
7663 of two args.
7664 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7665 SCM_SET_THREAD_LOCAL_DATA): Define here.
7666
7667 * threads.c: Merged with "coop-pthreads.c".
7668
7669 * null-threads.h: Implement pthread-like API as a set of macros.
7670
7671 * pthread-threads.h: New, implement pthread-like API by deferring
7672 to pthread itself.
7673
7674 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7675 has been lost in the reorganization.
7676
7677 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7678
7679 The following change makes it possible to move procedure
7680 application dispatch outside inner loops. The motivation was
7681 clean implementation of efficient replacements of R5RS primitives
7682 in SRFI-1.
7683
7684 The semantics is clear: scm_trampoline_N returns an optimized
7685 version of scm_call_N (or NULL if the procedure isn't applicable
7686 on N args).
7687
7688 Applying the optimization to map and for-each increases efficiency
7689 noticeably. For example, (map abs ls) is 8 times faster than
7690 before.
7691
7692 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7693
7694 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7695
7696 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7697 (map, for-each): Handle also application on two args as a special
7698 case; Use trampolines.
7699
7700 Other changes:
7701
7702 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7703 (subr2oless): Removed.
7704 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7705 vector GC protected.
7706
7707 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7708 scm_out_of_range.
7709
7710 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7711
7712 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7713
7714 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7715
7716 * debug.c (scm_make_iloc): Added missing "return".
7717
7718 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7719
7720 * strports.c (scm_eval_string_in_module): Validate second arg to
7721 be a module. Thanks to Arno Peters!
7722
7723 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7724
7725 * .cvsignore: remove goops.c
7726
7727 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7728
7729 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7730 module_variable, scm_module_lookup_closure,
7731 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7732 scm_system_module_env_p): Don't compare SCM values with C
7733 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7734 over SCM_NFALSEP.
7735
7736 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7737
7738 * eval.h (SCM_MAKE_ILOC): New macro.
7739
7740 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7741 the iloc bitpattern here.
7742
7743 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7744
7745 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7746 part of the API, otherwise it's difficult to write Guile
7747 extensions using non-blocking I/O => moved #include
7748 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7749
7750 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7751 s_unlock_mutex.
7752
7753 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7754
7755 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7756 are defined in configure.in.
7757
7758 * threads.c: Removed SCM_API from function definitions. SCM_API
7759 is only for declarations.
7760
7761 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7762
7763 * coop-pthreads.h: Added support for thread specific data to the
7764 generic C API for the coop-pthreads case.
7765
7766 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7767 change.
7768 (scm_cond_broadcast): Added missing function.
7769
7770 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7771
7772 * coop.c (coop_next_runnable_thread): Removed, wich should have
7773 happened when GUILE_ISELECT was hard-wired.
7774
7775 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7776
7777 * Makefile.am (libguile_la_SOURCES): Added threads.c
7778 (DOT_DOC_FILES): Added threads.doc.
7779 (DOT_X_FILES): Added threads.x.
7780 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7781 (noinst_HEADERS): Added coop-pthreads.c.
7782 (modinclude_HEADERS): Added coop-pthreads.h.
7783
7784 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7785 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7786
7787 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7788 Thanks to Bill Schottstaedt!
7789
7790 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7791
7792 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7793 SCM_COPT_THREADS is defined.
7794 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7795 is defined.
7796
7797 * coop-pthreads.c: Some harmless renamings of internal stuff.
7798 (create_thread): New, generalized version of
7799 scm_call_with_new_thread.
7800 (scm_call_with_new_thread): Use it.
7801 (scm_spawn_thread): New, use create_thread.
7802
7803 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7804
7805 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7806 start testing it now.
7807
7808 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7809 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7810 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7811 is defined.
7812
7813 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7814
7815 * scmsigs.c (signal_cell_handlers, install_handler_data,
7816 scm_delq_spine_x, really_install_handler, install_handler): New
7817 scheme for triggering signal handlers, to simplify take_signal.
7818 (take_signal): Simplified, to avoid race conditions.
7819 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7820 hasn't exited yet.
7821
7822 * async.c (scm_async_click): Reset pending_asyncs, handle
7823 signal_asyncs. Don't set cdr of a non-signal async to #f.
7824 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
7825 always. Set pending_asyncs.
7826 (scm_system_async_mark_for_thread): Check that thread has not
7827 exited.
7828 (scm_unmask_signals, decrease_block): Call scm_async_click after
7829 block_asyncs becomes zero.
7830
7831 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
7832 active_asyncs.
7833
7834 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
7835 fields.
7836 * root.c (root_mark): Mark them.
7837 (make_root): Initialize them.
7838
7839 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
7840 USE_COOP_THREADS.
7841 (scm_internal_select): Define one version for USE_COOP_THREADS and
7842 one for USE_NULL_THREADS.
7843 (scm_init_iselect): Likewise.
7844
7845 * inline.h (scm_cell, scm_double_cell): Also allow
7846 USE_COPT_THREADS to not protect the slot initializers.
7847
7848 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
7849 because threads need to be initialized before the stack, but
7850 gsubrs such as scm_timed_condition_variable_wait can only be
7851 created later.
7852
7853 * threads.h: Include "coop-pthreads.h" when requested.
7854 (scm_threads_make_mutex, scm_threads_lock_mutex,
7855 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
7856 not implemented anyway.
7857 (scm_init_thread_procs, scm_try_mutex,
7858 scm_timed_condition_variable_wait,
7859 scm_broadcast_condition_variable, scm_c_thread_exited_p,
7860 scm_thread_exited_p): New prototypes.
7861 (struct timespec): Define if not already defined.
7862 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7863 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7864 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7865 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
7866 deprecated.
7867
7868 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
7869 requested.
7870 (scm_thread_exited_p): New.
7871 (scm_try_mutex, scm_broadcast_condition_variable): Newly
7872 registered procedures.
7873 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
7874 Use the latter as the procedure for "wait-condition-variable",
7875 thus offering a optional timeout parameter to Scheme.
7876 (scm_wait_condition_variable): Implement in terms of
7877 scm_timed_wait_condition_variable.
7878 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7879 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
7880 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7881 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
7882 scm_make_mutex, etc, and deprecate.
7883 (scm_init_threads): Do not create smobs, leave this to
7884 scm_threads_init. Do not include "threads.x" file.
7885 (scm_init_thread_procs): New, include "threads.x" here.
7886
7887 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
7888 scm_null_mutex_lock, scm_null_mutex_unlock,
7889 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
7890 scm_null_condvar_wait, scm_null_condvar_signal,
7891 scm_null_condvar_destroy): Removed.
7892 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
7893 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
7894 scm_cond_destory): Do not define, they are now deprecated and
7895 handled by threads.{h,c}.
7896
7897 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
7898 (scm_threads_init): Create smobs here, using the appropriate
7899 sizes.
7900 (block): Removed, now unused.
7901 (scm_c_thread_exited_p): New.
7902 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
7903 scm_null_mutex_destroy, scm_null_condvar_init,
7904 scm_null_condvar_wait, scm_null_condvar_signal,
7905 scm_null_condvar_destroy): Removed and updated users to do their
7906 task directly.
7907 (scm_try_mutex, timeval_subtract,
7908 scm_timed_wait_condition_variable,
7909 scm_broadcast_condition_variable): New.
7910 (scm_wait_condition_variable): Removed.
7911
7912 * coop-defs.h (coop_m): Added 'level' field.
7913 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7914 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7915 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7916 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
7917 define.
7918 (coop_condition_variable_broadcast): New.
7919
7920 * coop-threads.c (scm_threads_init): Create smobs here, using the
7921 appropriate sizes.
7922 (scm_c_thread_exited_p, scm_try_mutex,
7923 scm_timed_wait_condition_variable,
7924 scm_broadcast_condition_variable): New.
7925 (scm_wait_condition_variable): Removed.
7926
7927 * coop.c (coop_new_mutex_init): Initialize level.
7928 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
7929 level.
7930 (coop_condition_variable_signal): Renamed to
7931 coop_condition_variable_broadcast and reimplemented in terms of
7932 that. Thus...
7933 (coop_condition_variable_broadcast): New.
7934
7935 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
7936
7937 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
7938
7939 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
7940
7941 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
7942 of system headers.
7943
7944 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
7945 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
7946 give better error messages. Thanks to Bill Schottstaedt!
7947
7948 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
7949
7950 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
7951 scm_definedp to scm_defined_p and deprecated scm_definedp.
7952
7953 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
7954
7955 * async.h, async.c (scm_system_async): Fixed deprecation to work
7956 correctly when deprecated features are excluded.
7957
7958 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7959
7960 * async.c (scm_system_async_mark_for_thread): Validate thread
7961 argument.
7962
7963 * coop-threads.c (scm_i_thread_root): Do not validate argument.
7964
7965 * feature.c (scm_init_feature): Don't add 'threads' for
7966 USE_NULL_THREADS.
7967
7968 * inline.h (scm_cell, scm_double_cell): Also allow
7969 USE_NULL_THREADS to not protect the slot initializers.
7970
7971 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
7972 "USE_THREAD".
7973
7974 * Makefile.am (noinst_HEADERS): Added null-threads.c.
7975 (modinclude_HEADERS): Added null-threads.h.
7976
7977 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
7978 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
7979 (scm_init_threads): Use generic type names scm_t_mutex and
7980 scm_t_cond instead of coop_m and coop_c.
7981
7982 * null-threads.c, null-threads.h: New files.
7983
7984 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
7985
7986 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
7987 This is to support makes that know about "$<" only in pattern
7988 rules, like Sun's make.
7989
7990 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
7991
7992 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
7993 substitution. Thanks to David Allouche!
7994
7995 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7996
7997 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
7998 !SCM_ENABLE_DEPRECATED.
7999
8000 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8001
8002 * async.c (scm_system_async_mark_for_thread): Only call
8003 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8004 otherwise.
8005
8006 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8007 USE_THREADS is defined. Use scm_root otherwise.
8008 (scm_sigaction_for_thread): Ignore THREAD argument when
8009 USE_THREADS is not defined. Also, move THREAD argument defaulting
8010 out of HAVE_SIGACTION section, which was a bug.
8011
8012 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8013
8014 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8015 signal_handlers, not the closure that is used as the async.
8016 The closure is stored in signal_handler_cells, as previously.
8017
8018 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8019
8020 * root.h (scm_root_state): Added 'block_async' slot.
8021 (scm_active_asyncs): Removed abbrev.
8022 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8023
8024 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8025 abbrev.
8026
8027 * async.h (scm_call_with_blocked_asyncs,
8028 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8029 scm_c_call_with_unblocked_asyncs): New prototypes.
8030 (scm_mask_signals, scm_unmask_signals): Deprecated.
8031 (scm_mask_ints): Turned into a macro.
8032 * async.c (scm_mask_ints): Removed.
8033 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8034 this should not be necessary.
8035 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8036 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8037 deprecation warning and check for errornous use. Set block_asyncs
8038 instead of scm_mask_ints.
8039 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8040 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8041 scm_c_call_with_unblocked_asyncs): New.
8042
8043 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8044 Asyncs are enabled by default.
8045
8046 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8047
8048 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8049 6th element: an input waiting thunk.
8050 (sf_input_waiting): New.
8051
8052 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8053
8054 * root.c (root_mark): Mark active_asyncs slot.
8055
8056 * async.c (scm_async_click): Set the cdr of a executed handler
8057 cell to SCM_BOOL_F, not SCM_EOL.
8058 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8059 and only if the handler procedure is not already present.
8060 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8061 with SCM_BOOL_F.
8062 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8063
8064 2002-10-04 Rob Browning <rlb@defaultvalue.org>
8065
8066 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8067
8068 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8069 scm_lt_dlopenext, and scm_lt_dlerror.
8070 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8071 and scm_lt_dlerror.
8072 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8073 and scm_lt_dlerror.
8074 (sysdep_dynl_init): switch to scm_lt_dlinit();
8075
8076 * Makefile.am (libguile_la_LIBADD): switch to use
8077 libguile-ltdl.la.
8078
8079 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
8080
8081 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8082
8083 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8084 * scmsigs.c (got_signal): Removed.
8085 (signal_handler_cells, signal_handler_threads): New.
8086 (take_signal): Queue the cell of the signal for the specified
8087 thread. Reset the signal handler on systems that don't have
8088 sigaction.
8089 (sys_deliver_signals): Removed.
8090 (close_1): New.
8091 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8092 extended to also set the thread of a signal and allocate a cell
8093 for it. Keep the Scheme name "sigaction". Check that signum is
8094 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8095 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8096 (scm_init_scmsigs): Allocate signal_handler_cells and
8097 signal_handler_threads vectors.
8098
8099 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8100 that system asnycs and user asyncs are separated. Reimplemented
8101 system asyncs to work per-thread.
8102
8103 * gc.c (scm_init_gc): Do not use scm_system_async.
8104
8105 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8106 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8107 Removed prototypes.
8108 (scm_i_queue_async_cell): New.
8109
8110 * __scm.h (scm_asyncs_pending_p): Removed.
8111 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8112 scm_asyncs_pending_p.
8113
8114 * async.h (scm_system_async_mark_for_thread): New prototype.
8115
8116 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8117
8118 * root.h (scm_root_state): Added new "active_asyncs" slot.
8119 * root.c (scm_make_root): Initialize it to SCM_EOL.
8120
8121 * coop-defs.h (coop_t): Added new "handle" slot.
8122 * coop-threads.c (all_threads, scm_current_thread,
8123 scm_all_threads, scm_i_thread_root): New.
8124 (scm_threads_init): Add main thread to all_threads.
8125 (scheme_launch_thread): Remove thread from all_threads when it
8126 terminates.
8127 (scm_call_with_new_thread): Initialize handle slot of coop_t
8128 structure and add new thread to all_threads.
8129 (scm_spawn_thread): Likewise.
8130
8131 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8132 * threads.c (scm_current_thread, scm_all_threads): Register as
8133 primitives.
8134
8135 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8136
8137 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8138
8139 * script.c (scm_compile_shell_switches): Fix bad spelling of
8140 `explicitly' in comment.
8141
8142 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8143
8144 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8145 Refer to provided? in doc string rather than deprecated feature?.
8146
8147 2002-09-24 Gary Houston <ghouston@arglist.com>
8148
8149 * inline.h (scm_double_cell): prevent reordering of statements
8150 with any following code (for GCC 3 strict-aliasing).
8151 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8152 the earlier version of the reordering prevention.
8153
8154 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8155
8156 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8157
8158 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8159
8160 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8161 protection.
8162
8163 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8164
8165 * inline.h: include stdio.h
8166
8167 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8168
8169 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8170
8171 * gc-segment.c (scm_i_make_initial_segment): check user settings
8172 for sanity.
8173
8174 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8175 sanity.
8176
8177 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8178
8179 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8180
8181 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
8182 these won't ever wrap around with high memory usage. Thanks to
8183 Sven Hartrumpf for finding this.
8184
8185 * gc-freelist.c: include <stdio.h>
8186
8187 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8188
8189 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8190
8191 * vectors.h (SCM_VECTOR_REF): New.
8192
8193 * snarf.h (SCM_DEFINE_PUBLIC): New.
8194
8195 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8196
8197 * socket.c (scm_addr_vector): Added size of address to arguments.
8198 Use it to avoid accessing a non-existent path in a sockaddr_un.
8199 Changed all callers.
8200
8201 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8202
8203 * gc.h: remove DOUBLECELL card flags.
8204
8205 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8206 scm_realloc().
8207
8208 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8209 init loop; handle this from scm_init_card_freelist()
8210
8211 * gc-card.c (scm_init_card_freelist): init bit vector here.
8212
8213 * numbers.c (scm_make_real): prevent reordering of statements
8214 num2float.i.c (FLOAT2NUM): idem
8215
8216 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8217
8218 * eval.h: prepend libguile/ to include path
8219
8220 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8221
8222 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
8223 years. Thanks to Martin Grabmüller!
8224
8225 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8226
8227 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8228 unsigned numbers for computing minimum heap increment. This
8229 prevents weird results when a a negative minimum increment is
8230 computed.
8231
8232 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8233
8234 * gc_os_dep.c: When we have __libc_stack_end, use that directly
8235 instead of the old tricks.
8236
8237 * guile-snarf.in: Do not expect the input file to be the first
8238 argument after the optional "-o" option, just pass everything to
8239 the pre-processor without extracting the input file name.
8240
8241 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8242
8243 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8244 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8245
8246 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8247
8248 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8249 Bill Schottstaedt for the bug report
8250
8251 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8252
8253 * print.c (scm_iprin1): Print primitives generics always as
8254 "primitive-generic" even when they have no primitive methods yet.
8255
8256 2002-08-17 Gary Houston <ghouston@arglist.com>
8257
8258 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8259 call.
8260
8261 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8262
8263 * ports.c (scm_add_to_port_table): small bugfix.
8264
8265 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8266 malloc.
8267
8268 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8269 only use SCM_MIN_HEAP_SEG_SIZE.
8270
8271 * ports.c (scm_add_to_port_table): add backwards compatibility
8272 function
8273
8274 * ports.h: use scm_i_ prefix for port table and port table size.
8275
8276 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8277
8278 * vports.c (scm_make_soft_port): Initialize pt variable.
8279
8280 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8281
8282 * strports.h (scm_c_eval_string_in_module,
8283 scm_eval_string_in_module): New prototypes.
8284 * strports.c (scm_eval_string_in_module): New, but use
8285 "eval-string" as the Scheme name and make second parameter
8286 optional.
8287 (scm_eval_string): Implement using scm_eval_string_in_module.
8288 (scm_c_eval_string_in_module): New.
8289 Thanks to Ralf Mattes for the suggestion!
8290
8291 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8292
8293 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8294 message and abort.
8295
8296 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8297
8298 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8299 stead of scm_t_port*. The function now takes a tag argument.
8300
8301 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8302
8303 * gc.h: add scm_debug_cells_gc_interval to public interface
8304
8305 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8306
8307 * gc.c (scm_i_expensive_validation_check): separate expensive
8308 validation checks from cheap ones.
8309
8310 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8311
8312 * read.c (scm_input_error): new function: give meaningful error
8313 messages, and throw read-error
8314
8315 * gc-malloc.c (scm_calloc): add scm_calloc.
8316
8317 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8318
8319 * tags.h: remove GC bits documentation from the tags table.
8320
8321 * read.c (INPUT_ERROR): Prepare for file:line:column error
8322 messages for errors in scm_lreadr() and friends.
8323
8324 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8325
8326 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8327 implementation).
8328 (scm_gc_calloc): new function
8329
8330 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8331
8332 * ports.c (scm_new_port_table_entry): init port entry to 0
8333 completely.
8334
8335 * ports.c (scm_new_port_table_entry): change function from
8336 scm_add_to_port_table. This prevents cells with null-pointers from
8337 being exposed to GC.
8338
8339 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
8340 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
8341
8342 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
8343 to gc-stats.
8344
8345 * numbers.c (big2str): return "0" for 0 iso. ""
8346
8347 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8348 private-gc.h: new file
8349
8350 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8351 sweeping. More documentation in workbook/newgc.text
8352
8353 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8354
8355 * random.c (rstate_free): Return zero.
8356
8357 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8358
8359 * environments.c (remove_key_from_alist): Removed.
8360
8361 (obarray_remove): Simplified.
8362
8363 2002-07-24 Stefan Jahn <stefan@lkcc.org>
8364
8365 * continuations.h: ia64: Include <signal.h> before
8366 <sys/ucontext.h>.
8367
8368 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8369
8370 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8371
8372 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8373
8374 * goops.c (scm_compute_applicable_methods): use
8375 scm_remember_upto_here_1 iso scm_remember_upto_here
8376
8377 * macros.c: include deprecation.h
8378
8379 * vectors.c (scm_vector_move_right_x): remove side effect in
8380 macro arg.
8381 (scm_vector_move_left_x): idem.
8382
8383 * net_db.c, posix.c, socket.c: variable naming: change ans to
8384 result.
8385
8386 * sort.c (scm_merge_vector_x): accept vector as argument
8387 iso. SCM*. This is needed for full GC correctness.
8388
8389 * gc.h: undo previous undocumented changes related to #ifdef
8390 GENGC.
8391
8392 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8393
8394 * *.c: add space after commas everywhere.
8395
8396 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8397 Document cases where SCM_WRITABLE_VELTS() is used.
8398
8399 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8400 SCM_VELTS() return a const pointer
8401 (SCM_VECTOR_SET): add macro.
8402
8403 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8404
8405 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8406 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8407 Deprecated the special kind of built-in dynamic syntax transformer
8408 that was inaccurately named "macro". Note: The built-in syntax
8409 transformers that are named "mmacro" or "memoizing-macro" still
8410 exist, and it is these which come much closer to what one would
8411 call a macro.
8412
8413 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8414
8415 * eval.c (unmemocopy): Fix for
8416 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8417 with internal definitions and local-eval).
8418
8419 2002-07-12 Gary Houston <ghouston@arglist.com>
8420
8421 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8422 defined. They don't do anything useful, especially since the
8423 only case where DYNAMIC_LINKING is undefined seems to be
8424 when --with-modules=no is given to configure, which is basically
8425 requesting that the "dynamic linking module" be omitted.
8426
8427 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8428 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8429
8430 * extensions.c (load_extension): check DYNAMIC_LINKING for
8431 scm_dynamic_call.
8432 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8433 scm_init_dynamic_linking.
8434
8435 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8436
8437 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8438 check for Cygwin when including <winsock2.h>, this is already
8439 check for by configure. Thus, revert change from 2002-07-07.
8440
8441 2002-07-10 Gary Houston <ghouston@arglist.com>
8442
8443 * eq.c: include <string.h>
8444 * dynl.c: docstring editing.
8445
8446 2002-07-09 Gary Houston <ghouston@arglist.com>
8447
8448 * dynl.c (scm_dynamic_call): docstring editing.
8449
8450 2002-07-08 Rob Browning <rlb@defaultvalue.org>
8451
8452 * gc_os_dep.c: HURD fixes.
8453
8454 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8455
8456 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8457
8458 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8459 this should be compiled for BUILD host.
8460 Override default rule for
8461 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8462 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8463 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8464
8465 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8466 <winsock2.h> on Cygwin even when we have it.
8467
8468 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8469
8470 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8471 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8472 the code. Full number of arguments checking of closures is
8473 mandatory now. However, the option to disable the checking has
8474 most probably not been used anyway.
8475
8476 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8477
8478 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8479 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8480 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8481 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8482 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8483 (scm_source_properties, scm_set_source_properties_x,
8484 scm_source_property): Removed compile time option SCM_RECKLESS to
8485 clean up the code. Full number of arguments checking of closures
8486 is mandatory now. However, the option to disable the checking has
8487 most probably not been used anyway.
8488
8489 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8490 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8491
8492 2002-06-30 Gary Houston <ghouston@arglist.com>
8493
8494 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8495 do anything useful. Added a comment about need for a mutex if
8496 pre-emptive threading is supported.
8497
8498 * posix.c (scm_convert_exec_args), dynl.c
8499 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8500 allocate_string_pointers. 2) simplified: don't reallocate the
8501 strings, just make an array of pointers 3) avoid memory leaks on
8502 error 4) let the procedure report errors in its own name.
8503 Consequences: 1) the procedures now assume that SCM strings are
8504 nul-terminated, which should always be the case. 2) Since strings
8505 are not reallocated, it's now possible for strings passed to
8506 dynamic-args-call to be mutated.
8507
8508 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8509
8510 * __scm.h, eval.c, eval.h: Removed compile time option
8511 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8512 variable positions during memoization is mandatory. However, the
8513 option to disable the caching has most probably not been used
8514 anyway.
8515
8516 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8517
8518 * print.c (scm_simple_format): Print missing part of format before
8519 ~% control. Thanks to Daniel Skarda!
8520
8521 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8522
8523 * mkstemp.c: Added exception notice to license statement.
8524
8525 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8526
8527 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8528 it is represented as a floating point value so that we can change
8529 its sign.
8530
8531 From John W. Eaton <jwe@bevo.che.wisc.edu>
8532
8533 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8534
8535 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8536
8537 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
8538 in addition to `i386'. Thanks to Dale P. Smith.
8539
8540 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8541
8542 * eq.c (real_eqv): New.
8543 (scm_eqv_p): Use it when comparing reals and complexes.
8544
8545 * numbers.c: Include <string.h>, for strncmp.
8546 (mem2complex): Do not create negative NaNs.
8547 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8548 NaN.
8549 (scm_inexact_to_exact): Signal error when converting a NaN.
8550
8551 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8552
8553 * posix.c (scm_putenv): Handle removing variables explicitely by
8554 calling unsetenv.
8555
8556 From John W. Eaton.
8557
8558 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8559 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8560 and scm_nan.
8561 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8562 [SCO && ! HAVE_ISINF] (isinf): New function.
8563 (xisinf, xisnan): New functions.
8564 (IS_INF): Delete.
8565 (isfinite): Define in terms of xisinf.
8566 (scm_inf_p, scm_nan_p): New functions.
8567 (guile_Inf, guile_NaN): New file-scope vars.
8568 (guile_ieee_init): New function.
8569 (scm_inf, scm_nan): New functions.
8570 (idbl2str): Handle Inf and NaN. Remove funny label and
8571 corresponding gotos.
8572 (ALLOW_DIVIDE_BY_ZERO): New macro.
8573 (scm_divide): Allow division by zero to occur if
8574 ALLOW_DIVIDE_BY_ZERO is defined.
8575 Handle bignums and ints as special cases.
8576
8577 Additional stuff by me:
8578
8579 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8580 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8581 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8582 NaN. They will provide their own sign.
8583 (scm_divide): Only allow divides by inexact zeros. Dividing by
8584 exact zeros still signals an errors.
8585
8586 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8587
8588 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
8589 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
8590 (scm_slot_exists_p): Rename from scm_slots_exists_p.
8591 Thanks to Andreas Rottmann.
8592
8593 2002-04-20 Gary Houston <ghouston@arglist.com>
8594
8595 * removal of unused fields in root state (thanks to Christopher
8596 Cramer for pointing out the disuse.)
8597 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
8598 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
8599
8600 * root.c (root_mark): don't mark them.
8601 (scm_make_root): don't set them to #f.
8602 * init.c (scm_init_standard_ports): don't initialise with the
8603 default ports.
8604
8605 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8606
8607 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8608 cpp_sig_symbols.c.
8609
8610 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8611
8612 * guile-snarf.in: Do not clean input file. This would write to
8613 the $(srcdir) during a VPATH build, which is not allowed. It also
8614 isn't needed since it only works when an output filename has been
8615 specified and in that case we don't need to clean the input file
8616 because the output file will already exist.
8617
8618 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8619
8620 * guile-snarf: Install the trap for removing $cleanfile only when
8621 the value of $cleanfile is actually known.
8622
8623 2002-04-10 Rob Browning <rlb@defaultvalue.org>
8624
8625 * .cvsignore: add versiondat.h and *.c.clean.c.
8626
8627 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8628
8629 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8630 function, replaces macro SRCBRKP.
8631
8632 (SRCBRKP): Deprecated.
8633
8634 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8635 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8636 temporary variable.
8637
8638 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8639
8640 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8641 CHECK_EXIT and removed all references to them.
8642
8643 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8644
8645 * debug.h (scm_ready_p, debug_print): Removed declarations.
8646
8647 * eval.c (EVALCELLCAR): Removed.
8648
8649 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8650 operation from condition.
8651
8652 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8653
8654 * guile-snarf.in: When the output filename is "-", write to
8655 stdout. When no "-o" option is given, use "-" as the output
8656 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8657 output file on error when the output file name is not "-". Define
8658 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8659
8660 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8661
8662 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8663
8664 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8665 and the corresponding goto statements. Removed redundant code.
8666
8667 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8668
8669 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8670 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8671 Re-enabled handing of rpsubrs and asubrs.
8672
8673 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8674
8675 * eval.c (SIDEVAL): Removed.
8676
8677 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8678 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8679 argument checking order for set! to locals, variables and symbols.
8680 Improvements to control structure. Removed some uses of arg1 and
8681 arg2 as temporary variables.
8682
8683 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8684
8685 * guile-snarf.in: Remove "--compat=1.4" support.
8686 Add "-d" and "-D" support.
8687
8688 (deprecated_list): New var.
8689 (compat_mode_clean_xxx): Delete.
8690 (grep_deprecated): New func.
8691 ("main"): If "-d" or "-D", call `grep_deprecated'.
8692
8693 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8694
8695 * hooks.h: Change scm_t_c_hookype_t everywhere to
8696 scm_t_c_hook_type.
8697
8698 Docstring fixes:
8699
8700 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8701
8702 * ports.c (scm_sys_make_void_port): Use `@file'.
8703
8704 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8705 than `else'.
8706
8707 * macros.c (scm_makmacro): Don't say that the form replaces its
8708 source, because it doesn't.
8709 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8710
8711 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8712 scm_select, scm_basename), goops.c (scm_method_generic_function),
8713 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8714 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8715 spelling mistakes.
8716
8717 * debug.c (scm_debug_options), eval.c
8718 (scm_eval_options_interface), read.c (scm_read_options): Change
8719 incorrect @var in docstring to @code.
8720
8721 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8722
8723 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8724
8725 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8726 guile-snarf can remove trailing non-init code.
8727
8728 * guile-snarf.in (modern_snarf): Remove everything following and
8729 including "^:^" from the output.
8730
8731 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8732
8733 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8734
8735 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8736
8737 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8738
8739 * guile-snarf.in: Update copyright.
8740 Rewrite to internalize error handling.
8741 Add "--compat=1.4" handling.
8742 Add commentary.
8743
8744 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8745 (snarfcppopts): New var.
8746 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8747 (.c.doc): Use $(snarfcppopts).
8748
8749 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8750 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8751 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8752 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8753 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8754 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8755 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8756 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8757 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8758 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8759 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8760 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8761 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8762 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8763
8764 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8765
8766 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8767 The next step will be to remove the union 't' and simplify the
8768 code of SCM_CEVAL that way.
8769
8770 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8771
8772 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8773 rreadfds, rwritefds, rexceptfds): Made static.
8774
8775 * gc.c (terminating), fports.c (terminating): Renamed
8776 scm_i_terminating.
8777
8778 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8779
8780 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8781 potential overflow problems. Thanks to John W Eaton!
8782
8783 * strop.c (string_capitalize_x): Treat characters as unsigned so
8784 that 8-bit chars work. Thanks to David Pirotte!
8785
8786 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8787
8788 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8789 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8790 proc as temporary variables. Introduced temporary variables with
8791 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8792 by a more explicit predicate in some places.
8793
8794 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8795
8796 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8797 Added lots of comments regarding the implementation of #@dispatch.
8798 Changed intra-procedure communication to use t.arg1 instead of
8799 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8800 variables. Introduced temporary variables with hopefully
8801 descriptive names for clarification. Replaced SCM_N?IMP by a more
8802 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8803 of computing the expression explicitly. Eliminate now unused
8804 label nontoplevel_cdrxbegin.
8805
8806 * goops.h (SCM_INSTANCE_HASH): New macro.
8807
8808 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8809
8810 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8811
8812 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8813 "guile-snarf" moved back from `noinst_SCRIPTS'.
8814
8815 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8816
8817 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8818 exists when adding a source property other than those that are
8819 handled explicitly, add the new property to the SRCPROPS obj's
8820 plist.
8821
8822 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8823 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
8824
8825 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
8826 debug.status. It isn't needed, and it can overflow the bits
8827 reserved for it (which may lead to a segv or a GC abort).
8828
8829 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8830
8831 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
8832 side-effecting operations from conditions and macro calls.
8833 Replaced SCM_N?IMP by a more explicit predicate in some places.
8834 Minimized the scope of some variables.
8835
8836 2002-03-02 Stefan Jahn <stefan@lkcc.org>
8837
8838 * convert.i.c: Fixed int <-> long conversions which would have
8839 failed if their sizes were different.
8840
8841 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8842
8843 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
8844 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
8845 as temporary variables. Removed side-effecting operations from
8846 conditions and macro calls. Introduced temporary variables with
8847 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8848 by a more explicit predicate in some places. Removed code that
8849 was conditionally compiled if SICP was defined - which it never
8850 is.
8851
8852 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8853
8854 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
8855 Removed some uses of t.arg1 and proc as temporary variables.
8856 Removed side-effecting operations from conditions and macro calls.
8857 Introduced temporary variables with hopefully descriptive names
8858 for clarification. Replaced SCM_N?IMP by a more explicit
8859 predicate in some places.
8860
8861 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8862
8863 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
8864 explicit predicate in some places.
8865
8866 (CHECK_EQVISH): Removed.
8867
8868 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
8869 variables. Removed side-effecting operations from conditions and
8870 macro calls. Introduced temporary variables for clarification.
8871 Sorted if-else-if check for the type of the last form in a list by
8872 frequency. Avoided some unnecessary tail-recursion calls.
8873
8874 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8875
8876 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
8877 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
8878 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
8879 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
8880 scm_cell and all its uses to scm_t_cell in accordance to Guile's
8881 naming scheme for types.
8882
8883 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
8884 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
8885 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
8886 (scm_make_environment), eval.c (scm_closure), fports.c
8887 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
8888 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
8889 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
8890 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
8891 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
8892 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
8893 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
8894 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
8895 scm_alloc_cell to scm_cell.
8896
8897 * environments.c (core_environments_observe), gc.c
8898 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
8899 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
8900 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
8901 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
8902 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
8903 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
8904 (allocate_weak_vector): Renamed scm_alloc_double_cell to
8905 scm_double_cell.
8906
8907 2002-02-27 Stefan Jahn <stefan@lkcc.org>
8908
8909 * convert.i.c, convert.c: Better range checking.
8910
8911 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
8912
8913 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
8914 Windows (MinGW).
8915
8916 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
8917
8918 * Makefile.am: Update path to pre-inst-guile automake frag.
8919
8920 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8921
8922 * gc.c (scm_gc_sweep): Make it compile even when deprecated
8923 features are excluded.
8924
8925 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8926
8927 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
8928
8929 2002-02-25 Gary Houston <ghouston@arglist.com>
8930
8931 * convert.c: include <string.h> for convert_i.c.
8932
8933 2002-02-24 Rob Browning <rlb@defaultvalue.org>
8934
8935 * .cvsignore: add stamp-h1.
8936
8937 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
8938
8939 * unif.c (scm_array_to_list): Correct name, which had been
8940 accidentally changed to scm_t_arrayo_list!
8941
8942 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
8943
8944 * gc.c (scm_gc_sweep): Print an error message when aborting due to
8945 underflowing scm_mallocated.
8946
8947 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8948
8949 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
8950 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
8951 Reimplemented using the new scm_gc_malloc, etc., functions and
8952 deprecated.
8953
8954 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
8955
8956 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
8957 to `noinst_PROGRAMS'.
8958 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
8959 (noinst_PROGRAMS, noinst_SCRIPTS): New.
8960
8961 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8962
8963 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
8964 non-zero is returned from a port or smob free function.
8965 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
8966 scm_gc_register_collectable_memory,
8967 scm_gc_unregister_collectable_memory, scm_gc_malloc,
8968 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
8969
8970 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
8971 debug-malloc.c, dynl.c, environments.c, environments.h,
8972 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
8973 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
8974 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
8975 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
8976 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
8977 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
8978 appropriate. Return zero from smob and port free functions.
8979
8980 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
8981
8982 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
8983 messages while the GC is running.
8984 (scm_c_issue_deprecation_warning_fmt): New.
8985
8986 * fports.c (scm_setvbuf): Reset read buffer to saved values when
8987 it is pointing to the putback buffer.
8988
8989 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8990
8991 * gsubr.c (create_gsubr): On "too many args" error,
8992 also display arg count and name. Thanks to Bill Schottstaedt.
8993
8994 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
8995
8996 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
8997
8998 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
8999 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9000 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9001
9002 * guile-snarf-docs-texi.in: Bye bye.
9003
9004 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9005
9006 * symbols.c (scm_make_symbol): Fix typo in docstring.
9007
9008 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9009 scm_make_symbol): New prototypes.
9010
9011 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9012
9013 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9014 (SCM_SYMBOL_INTERNED_P): New.
9015 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9016 SCM_MAKINUM since hash values can well be bignums.
9017 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9018 This signals a interned symbol.
9019 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9020 scm_make_symbol): New.
9021
9022 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9023
9024 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9025
9026 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9027 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
9028 Thanks to Dave Love.
9029
9030 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9031
9032 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
9033 This might help to make unintended clashes less likely.
9034 (scm_string_to_symbol): Protect the string until the symbols is
9035 created.
9036
9037 2002-01-31 Stefan Jahn <stefan@lkcc.org>
9038
9039 * convert.c, convert.h, convert.i.c: New files containing C
9040 array to Scheme conversion helpers meant to be replacement
9041 functions for the deprecated gh interface.
9042
9043 * Makefile.am: Setup rules for new `convert.*' files.
9044
9045 2002-01-28 Stefan Jahn <stefan@lkcc.org>
9046
9047 * symbols.c (scm_c_symbol2str): New function, replacement for
9048 `gh_scm2newsymbol()'.
9049
9050 * strings.c (scm_c_substring2str): New function. Proper
9051 replacement for `gh_get_substr()'.
9052
9053 * socket.c: Include `stdint.h' if available for the `uint32_t'
9054 declaration.
9055
9056 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
9057 compiler warning).
9058
9059 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9060
9061 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
9062
9063 Other changes unrelated to Elisp...
9064
9065 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9066 "if".
9067 (comments): Fix a few typos.
9068 (scm_for_each): Add parentheses around oddly unparenthesized
9069 if/while conditions.
9070
9071 * read.c (scm_read_opts): Add full stop at end of doc for
9072 `keywords' option.
9073
9074 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9075 instead of gh_symbol2scm.
9076
9077 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9078 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9079
9080 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9081 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9082
9083 First batch of changes for Elisp support...
9084
9085 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9086 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9087 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9088
9089 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9090 conditionalize compilation and initialization of Elisp support
9091 function.
9092
9093 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9094 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9095 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9096 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9097 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9098 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9099 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
9100 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9101 options.c (change_option_setting, scm_options), posix.c
9102 (environ_list_to_c), print.c (scm_iprlist), throw.c
9103 (scm_exit_status), vectors.c (scm_vector), weaks.c
9104 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
9105
9106 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9107 just SCM_FALSEP.
9108
9109 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9110 of just SCM_BOOLP.
9111
9112 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9113 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9114 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9115 (scm_m_atfop): Support function aliasing. Support both function
9116 args, which need transformation, and macro args, which do not.
9117 Add explanatory comments.
9118 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9119 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9120 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9121 SCM_NULLP || SCM_NILP instead of checks against (removed)
9122 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9123 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9124
9125 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9126 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9127 these, but I don't want to remove them yet, just in case.
9128 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9129 Elisp nil value.
9130
9131 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9132 against (removed) scm_lisp_nil.
9133 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9134 (SCM_NULL_OR_NIL_P): New.
9135
9136 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9137 SCM_VALIDATE_NULL.
9138
9139 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9140 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9141 value).
9142
9143 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9144 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9145 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9146 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9147
9148 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9149 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9150 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9151 Numbering shifted down accordingly.
9152 (SCM_ELISP_NIL): New IFLAG.
9153
9154 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
9155
9156 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9157
9158 * eval.c: Removed outdated references to "everr". Improved some
9159 comments.
9160
9161 (scm_deval_args, deval_args): Renamed scm_deval_args to
9162 deval_args, since it is not part of the interface.
9163
9164 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9165 use references to debug.vect[0] before it exists. Add parentheses
9166 to switch statement.
9167
9168 * goops.h: Added local emacs variables.
9169
9170 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9171
9172 * eval.[ch] (scm_deval_args): Made static.
9173
9174 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9175 test.
9176
9177 * strings.c (scm_c_string2str): Clarified comment. Replaced
9178 THINKME by FIXME for uniformness. Removed question about whether
9179 arguments need to be protected from garbage collection: Arguments
9180 must be protected as any other variable.
9181
9182 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9183
9184 * procs.h (SCM_CLOSURE_BODY): New Macro.
9185
9186 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9187 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9188 get_slot_value, set_slot_value), procs.c
9189 (scm_procedure_documentation), sort.c (closureless), stacks.c
9190 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9191 SCM_CLOSURE_BODY.
9192
9193 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9194
9195 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9196
9197 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9198 use "cp" instead.
9199
9200 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9201
9202 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9203 everywhere.
9204
9205 * continuations.c (scm_make_continuation): Do not retain the
9206 throw_value when the continuation is invoked.
9207
9208 2001-12-08 Stefan Jahn <stefan@lkcc.org>
9209
9210 * strings.c (scm_c_string2str): New function. Converts a
9211 given Scheme string into a C string. Also put in two
9212 THINKME's regarding the malloc policy for the missing converter
9213 routines.
9214
9215 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9216
9217 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9218 gh_symbol2scm.
9219
9220 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9221
9222 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9223 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9224
9225 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9226 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9227 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9228 macros.
9229
9230 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9231
9232 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9233 SCM_GC_CELL_* macros when accessing free cells.
9234
9235 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9236
9237 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
9238 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
9239 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9240 * strings.h (SCM_MAKE_STRING_TAG): New.
9241 * procs.h (SCM_MAKE_CCLO_TAG): New.
9242 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9243
9244 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9245 !SCM_ENABLE_DEPRECATED.
9246
9247 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9248 New.
9249
9250 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9251 signal handlers are allowed to divert the flow of control. Call
9252 scm_system_async_mark_from_signal_handler instead of
9253 scm_system_async_mark.
9254
9255
9256 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9257 scm_alloc_double_cell in their place.
9258
9259 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9260 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9261 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9262 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9263 scm_deprecated_newcell and scm_deprecated_newcell2.
9264
9265 gc.c (scm_tc16_allocated): Only define when including deprecated
9266 features.
9267 (scm_debug_newcell, scm_debug_newcell2): Removed.
9268 (scm_init_storage): Do not initialize scm_tc16_allocated.
9269 (scm_init_gc): Do it here.
9270 (allocated_mark): New, from old code.
9271 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9272
9273 * inline.c, inline.h: New files.
9274 * Makefile.am: Added them in all the right places.
9275
9276 * _scm.h: Include "libguile/inline.h".
9277
9278 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9279 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9280 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9281 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9282 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9283 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9284 scm_alloc_double_cell, respectively.
9285
9286 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9287
9288 * modules.c (scm_c_use_module): Adapt to changes to
9289 `process-use-modules'.
9290
9291 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9292
9293 * numbers.c (scm_divide): Fix more division by zero errors.
9294
9295 2001-11-21 Gary Houston <ghouston@arglist.com>
9296
9297 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9298 obsolete. autogen.sh says:
9299 invalid unused variable name: `OMIT_DEPENDENCIES'
9300
9301 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9302
9303 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9304 reporting the bug.
9305
9306 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9307
9308 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9309 Thanks to Eric Gillespie, Jr!
9310
9311 2001-11-21 Stefan Jahn <stefan@lkcc.org>
9312
9313 * win32-socket.c (getservent, setservent, endservent,
9314 getprotoent, setprotoent, endprotoent): New functions.
9315 Appropriate replacements for M$-Windows.
9316
9317 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9318 these definitions for GUILE_DEBUG.
9319
9320 * net_db.c: Include "win32-socket.h" if compiling with a native
9321 M$-Windows compiler. Include some pieces of code (protoent and
9322 servent interface) protected by HAVE_* macros when using a
9323 native M$-Windows compiler.
9324
9325 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9326
9327 * modules.c (scm_c_export): Do nothing when the first argument is
9328 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9329
9330 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9331
9332 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9333 also include `buildstamp'.
9334
9335 2001-11-18 Rob Browning <rlb@defaultvalue.org>
9336
9337 * version.c
9338 (s_scm_major_version): use SCM_MAJOR_VERSION.
9339 (s_scm_minor_version): use SCM_MINOR_VERSION.
9340 (s_scm_micro_version): use SCM_MICRO_VERSION.
9341 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9342 SCM_MICRO_VERSION.
9343
9344 * version.h.in
9345 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9346 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9347 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9348
9349 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9350
9351 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9352 Rewrite docstrings without reference to substring-move-left/right,
9353 since the latter no longer exist.
9354
9355 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9356
9357 * eval.c: Removed bogus comment about acros.
9358
9359 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9360 Minimize scope of local variable. Eliminate dependency on
9361 macro DEBUG_EXTENSIONS.
9362
9363 (s_splicing): New error message string.
9364
9365 (scm_m_body): Issue 'bad body' message rather than 'missing
9366 expression' message.
9367
9368 (scm_m_quote): Eliminate unnecessary copying.
9369
9370 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9371 checking of the body to scm_m_body.
9372
9373 (scm_m_do): Move comment to function header. Rename arg1 to
9374 binding. Made the code a bit easier to read.
9375
9376 (evalcar): Removed.
9377
9378 (iqq): Added a comment. Changed the depth parameter to
9379 unsigned. Use size_t for vector lengths. Make sure vector object
9380 is gc protected as long as its contents are read. Add some syntax
9381 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9382 control structure a bit.
9383
9384 (scm_m_delay): Added comment about the implementation of
9385 scm_m_delay.
9386
9387 (scm_m_define): Add comment about guile's currying define
9388 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9389 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9390
9391 (scm_m_letrec1): Removed. Part of the functionality is taken
9392 over by the new function 'transform_bindings'.
9393
9394 (transform_bindings): New function. Takes over some of the
9395 functionality of removed function 'scm_m_letrec1', namely to split
9396 a list of bindings into a reversed list of variables and a list of
9397 initializers.
9398
9399 (scm_m_letrec): Call 'transform_bindings'.
9400
9401 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9402 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9403 test. Use 'transform_bindings'. Fixed scoping error with named
9404 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9405 Jerram for suggesting the fix). Cleaned up the control structure
9406 a bit.
9407
9408 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9409 unnecessary consing. Eliminated unnecessary
9410 SCM_DEFER/ALLOW_INTS.
9411
9412 (SCM_CEVAL): Un-obfuscated some loops.
9413
9414 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9415
9416 * gc.h (scm_unhash_name): Old declaration removed.
9417
9418 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9419 @code{primitive-eval}.
9420
9421 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9422 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9423 Change @deffnx lines in docstrings to say {Scheme Procedure}
9424 rather than primitive or procedure.
9425
9426 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9427 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9428 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9429 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9430 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9431 (scm_string_split, scm_string_ci_to_symbol), strings.c
9432 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9433 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9434 Docstring fixes and improvements reflecting edits that have been
9435 made in the reference manual source.
9436
9437 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9438 scm_object_property, scm_set_object_property_x): Remove invalid
9439 @deffnx lines for corresponding procedure property primitives.
9440
9441 These changes add a @deffnx C function declaration and function
9442 index entries for each Guile primitive to the copy of the doc
9443 snarf output that is used for reference manual synchronization.
9444 Online help is unchanged.
9445
9446 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9447 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9448 name to SCM_SNARF_DOCS.
9449
9450 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9451 snarf-check-and-output-texi.
9452
9453 * Makefile.am (guile-procedures.texi): New rule.
9454 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9455 Changed so that the last stage of doc snarfing is now performed
9456 twice, once to produce guile-procedures.txt for online help, and
9457 once to produce guile.texi for reference manual synchronization.
9458
9459 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9460
9461 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9462 safely usable as a single statement followed by a ';', for example
9463 in an if statement.
9464
9465 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9466
9467 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9468
9469 * random.c (scm_random_solid_sphere_x,
9470 scm_random_hollow_sphere_x): Correct "shere" typos.
9471
9472 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9473
9474 * version.c (scm_version): Update docstring to include
9475 `micro-version'.
9476
9477 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9478
9479 * modules.c (scm_c_export): Call va_end after collecting the
9480 symbols.
9481
9482 * strop.h, strop.c (scm_substring_move_left_x,
9483 scm_substring_move_right_x): Removed.
9484
9485 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9486 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9487 configure does.
9488
9489 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9490
9491 * numbers.c: Document macros to define when including
9492 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9493 now rely on SIZEOF_ macros that have been figured out at
9494 configure time.
9495
9496 * num2integral.i.c: Adapt to new interface.
9497 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9498 target type by casting it and checking whether it is still the
9499 same. Do not try to handle bignums for integral types that are
9500 smaller than fixnums. When handling bignums, collect the
9501 magnituse first into a unsigned type, and correctly check for
9502 overflow.
9503 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9504 only -MIN_VALUE can still be negative of all negative numbers (in
9505 twos-complement).
9506
9507 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
9508
9509 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9510 HAVE_LONG_LONG depending on whether their size is non-zero.
9511
9512 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9513
9514 * strop.c (scm_string_null_p): Docfix; nfc.
9515 Thanks to Scott Lenser.
9516
9517 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9518
9519 * extensions.c (scm_load_extension): Canonicalize docstring
9520 whitespace.
9521
9522 * unif.c (scm_uniform_array_write), ports.c
9523 (scm_current_output_port, scm_force_output), dynwind.c
9524 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9525 filesys.c (scm_open, scm_lstat), struct.c
9526 (scm_make_struct_layout), random.c (scm_random,
9527 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9528 (scm_i_index): Remove superfluous whitespace from end of docstring
9529 lines.
9530
9531 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9532 strings.c (scm_make_string), variable.c (scm_make_variable,
9533 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9534 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9535 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9536 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9537 newline at end of docstrings.
9538
9539 * modules.c (scm_set_current_module): Add missing newline to
9540 docstring.
9541
9542 2001-11-07 Stefan Jahn <stefan@lkcc.org>
9543
9544 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9545 and makes them available through Guile. That is because the
9546 Winsock-API does not store its errors in `errno' and thus cannot
9547 return error messages via `strerror (errno)'.
9548
9549 * socket.c (scm_init_socket): Initialize `win32-socket' part
9550 here under M$-Windows.
9551
9552 * numbers.h: Added missing declaration of
9553 `scm_sys_check_number_conversions()'.
9554
9555 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9556 and use in `(strerror)' and `(system-error)'.
9557
9558 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
9559 `win32-socket.[ch]' to extra source and header files.
9560
9561 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9562
9563 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9564 a call to turn-on-debugging when --debug has been given instead of
9565 turning it on directly. Also, handle new `--no-debug' option,
9566 which might suppress the call to turn-on-debugging.
9567
9568 2001-11-05 Stefan Jahn <stefan@lkcc.org>
9569
9570 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9571
9572 2001-11-04 Stefan Jahn <stefan@lkcc.org>
9573
9574 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
9575 here (was at guile_LDADD) which describes the dependency
9576 correctly and allows a clean build on Win32.
9577
9578 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
9579 into FOO.
9580
9581 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9582 import macros for external libraries (libcrypt, libqthreads,
9583 libreadline and libregex).
9584
9585 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9586
9587 * posix.c (flock): Added support for flock() in M$-Windows.
9588
9589 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9590 of __SCM_IMPORT__.
9591
9592 * fports.c (getflags): Differentiate reading and writing pipes
9593 descriptors.
9594
9595 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9596 M$-Windows.
9597
9598 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9599 conditionalized error code if `ETIMEDOUT' is not available.
9600 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9601 timeout'.
9602
9603 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9604 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9605 each inclusion of `num2integral.i.c'.
9606 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9607
9608 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9609
9610 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9611 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9612
9613 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9614
9615 * print.c (scm_iprin1): Mark print state as revealed when
9616 dispatching to generic write or display.
9617
9618 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9619
9620 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9621
9622 Support for native Win32. Thanks to Stefan Jahn!
9623
9624 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9625 and win32-dirent.h to extra source and header files. These
9626 include the uname() and the POSIX dirent interface implementation
9627 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9628 linkers which do not allow unresolved symbols inside shared
9629 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9630 dependency.
9631
9632 * __scm.h: Defined SCM_API. This macro gets prepended to all
9633 function and data definitions which should be exported or imported
9634 in the resulting dynamic link library in the Win32 port.
9635
9636 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
9637 chars.h, continuations.h, coop-defs.h, coop-threads.h,
9638 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9639 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9640 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9641 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9642 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
9643 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
9644 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9645 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9646 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9647 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9648 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9649 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9650 vports.h, weaks.h:
9651 Prefixed each each exported symbol with SCM_API.
9652
9653 * continuations.c: Added comment about the use of the extern
9654 declarations of {get,set}context() functions used in the ia64 port.
9655
9656 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9657 is meant to be a `unsigned long *'.
9658
9659 * filesys.c: Include `direct.h' if possible. Use local
9660 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9661 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9662 able to differentiate between sockets and other file descriptors.
9663 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9664 `scm_dirname()'.
9665
9666 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9667 statement block in `scm_fport_buffer_add()'.
9668 Some corrections in `getflags()'.
9669
9670 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9671
9672 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9673 build on Win32. Disable preloaded symbols on Win2 platforms.
9674
9675 * ioext.c, ports.c: Include `io.h' is possible.
9676
9677 * mkstemp.c: Include `process.h' is possible.
9678
9679 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9680 too.
9681 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9682
9683 * posix.c: Remove unnecessary dirent includes and defines. Include
9684 local `win32-uname.h' for MinGW. Extern declaration of
9685 `mkstemp()' for systems where it does not exists. Make
9686 `getlogin()' available on M$-Windows.
9687
9688 * scmsigs.c: Made `usleep()' avalable on MinGW.
9689
9690 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9691
9692 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9693
9694 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9695
9696 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9697
9698 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9699 Don't apply scm_uniform_vector_length on arrays.
9700
9701 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9702
9703 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9704 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9705 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9706 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9707 scm_list_<n> over scm_cons[2]?.
9708
9709 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9710 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9711 SCM_C[AD][AD]R instead of explicit form.
9712
9713 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9714 comparison parameters.
9715
9716 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9717 !SCM_NULLP instead of SCM_NIMP.
9718
9719 (scm_m_case): Don't copy the form. Renamed proc to clause and
9720 minimized its scope. Renamed x to clauses. Removed side
9721 effecting operation from macro call.
9722
9723 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9724 minimized its scope. Renamed x to clauses. Minimized the scope
9725 of variable 'len'. Make sure the else clause is treated specially
9726 even in case of '=>' occurences. Don't change the else to #t in
9727 order to be able to distinguish this case in the evaluator. Leave
9728 type checking of the recipient to the evaluator.
9729
9730 (scm_c_improper_memq): Made the comment somewhat clearer.
9731
9732 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9733 test for SCM_IM_LET at the place of the formal parameters.
9734 Simplified the formal parameter checking.
9735
9736 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9737 Renamed arg1 to binding and minimized its scope. Eliminated
9738 unnecessary consing.
9739
9740 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9741 variable 'len'.
9742
9743 (build_binding_list): New static function.
9744
9745 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9746 Further, split up the 'letrec' unmemoizing code to the
9747 corresponding parts for 'do', 'let' and 'letrec', adding comments
9748 to each form. Cleanup the handling of the do form (This removes
9749 some *real* code :-).
9750
9751 (SCM_CEVAL): Removed side effecting operation from macro call.
9752 Handle the 'else clause of the 'cond form specially - the symbol
9753 'else is not replaced with #t any more.
9754
9755 2001-10-14 Gary Houston <ghouston@arglist.com>
9756
9757 * version.c (scm_version): use sprintf instead of snprintf,
9758 for portability. thanks to Bill Schottstaedt.
9759
9760 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9761
9762 * read.c (scm_lreadr): When user-defined hash procedure returns
9763 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9764 an exception. (This prevents parsing of uniform vectors from
9765 interfering with parsing of numbers.)
9766
9767 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9768
9769 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9770 PTRDIFF_MIN. Thanks to Ken Raeburn.
9771
9772 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9773
9774 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9775
9776 * eval.c (scm_m_atbind): First try to find the variable without
9777 defining it locally; when it has not been found, define it
9778 locally.
9779
9780 * modules.c (module_variable): Pass over variables that exist but
9781 are unbound.
9782
9783 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9784
9785 * backtrace.c (display_backtrace_file_and_line): Only use
9786 scm_basename when POSIX support is compiled in. Thanks to Chris
9787 Cramer.
9788
9789 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9790
9791 * numbers.c (mem2uinteger): Return number read so far when coming
9792 across a hexdigit after having read a # or if not reading a hex
9793 value. This will enable the calling code to correctly handle
9794 forms like 1e2. (The background is, that the exponent markers d,
9795 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9796 providing this patch.
9797
9798 (mem2complex): Fix erroneous double-negation. Now, numbers like
9799 1-i will be read correctly.
9800
9801 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9802
9803 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9804
9805 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9806
9807 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9808
9809 * print.c (scm_print_state_vtable, print_state_pool):
9810 Initialize. These variables are now registered as gc roots.
9811
9812 (scm_current_pstate): Update documentation.
9813
9814 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9815 scm_prin1, scm_init_print): print_state_pool is registered as a
9816 gc root and thus does not need to be protected by a surrounding
9817 pair any more.
9818
9819 (make_print_state): The car of print_state_pool no longer holds
9820 the scm_print_state_vtable.
9821
9822 (scm_current_pstate, scm_make_print_state, print_circref,
9823 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
9824 SCM_N<foo>.
9825
9826 (scm_prin1): When building lists, prefer scm_list_<n> over
9827 scm_cons[2]?.
9828
9829 (scm_iprlist): Removed a redundant SCM_IMP test.
9830
9831 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
9832
9833 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9834
9835 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
9836
9837 (scm_memcons, scm_mem_to_proc): When building lists, prefer
9838 scm_list_<n> over scm_cons[2]?.
9839
9840 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
9841
9842 (scm_procedure_name): Use SCM_CADR instead of explicit form.
9843
9844 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
9845 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
9846 for some reason his patch didn't make it into the cvs.
9847
9848 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
9849
9850 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
9851 little bit - should even be somewhat more accurate now.
9852
9853 2001-10-08 Rob Browning <rlb@defaultvalue.org>
9854
9855 * gc.c: support ia64 register backing store.
9856 (SCM_MARK_BACKING_STORE): new macro.
9857
9858 * continuations.h: support ia64 register backing store.
9859 (struct scm_t_contregs): add ia64 register backing store.
9860
9861 * continuations.c: support ia64 register backing store.
9862 (continuation_mark): mark ia64 register backing store.
9863 (continuation_free): free ia64 register backing store.
9864 (scm_make_continuation): capture ia64 register backing store.
9865 (copy_stack_and_call): copy ia64 register backing store.
9866
9867 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9868
9869 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
9870 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
9871 instead of SCM_NIMP to test for that case.
9872
9873 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
9874 scm_t_bits instead of long.
9875
9876 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9877
9878 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
9879 SCM_T_SIGNED_BITS_MIN): New.
9880 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
9881 Use them to make these macros computable by the preprocessor.
9882
9883 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
9884 whether the integral type fits in a fixnum, not the compiler.
9885 This removes a spurious compiler warning. Also, honor the
9886 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
9887 needed for `long long's.
9888
9889 * numbers.c: Define NO_PREPRO_MAGOC when including
9890 num2integral.c.i for `long long' and `signed long long'.
9891
9892 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
9893
9894 These changes fixes a race condition in the Guile coop - pthread
9895 compatibility code.
9896
9897 * coop.c (mother_awake_p): New variable.
9898 (coop_create): Set mother_awake_p before creating or signalling
9899 mother; wait until mother is going to sleep before returning.
9900 (mother): Reset mother_awake_p before going to sleep.
9901
9902 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9903
9904 * options.c (protected_objects, scm_init_options): The content of
9905 protected_objects is now protected from garbage collection using
9906 scm_gc_register_root instead of scm_permanent_object.
9907
9908 (get_option_setting): New static function that computes an option
9909 setting as it was formerly done in the function scm_options.
9910
9911 (get_documented_option_setting): New static function that
9912 returns option documentation as it was formerly done in the
9913 function scm_options. Note that documentation C strings are no
9914 longer precomputed into SCM objects. Instead, they are converted
9915 into SCM strings every time get_documented_option_setting is
9916 called.
9917
9918 (change_option_setting): New static functions that modifies the
9919 option setting as it was formerly done in the function
9920 scm_options. The function is now exception safe, i. e. won't
9921 cause a memory leak when interrupted. Further, only non-immediate
9922 option values are added to the protection list.
9923
9924 (scm_options): This function now has only the purpose to dispatch
9925 to to get_option_setting, get_documented_option_setting or
9926 change_option_setting, depending on the arguments given to
9927 scm_options.
9928
9929 (scm_init_opts): Don't convert documentation C strings into SCM
9930 strings. Further, don't protect any object values: They _must_
9931 be immediate values, otherwise there is no guarantee that they
9932 have not been collected before anyway.
9933
9934 * options.[ch] (scm_t_option): Made type unsigned, name into a
9935 constant char* and val into a scm_t_bits type.
9936
9937 (scm_options, scm_init_opts): The number of options is guaranteed
9938 to be larger or equal to zero. Thus, the type is changed to
9939 unsigned.
9940
9941 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9942
9943 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
9944 testing an unsigned value for being >= 0.
9945
9946 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9947
9948 * numbers.h: Removed old comment about using SCM_CAR to access
9949 non-pair cells.
9950
9951 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
9952 the return value is signed. Thanks to Brian Crowder for the bug
9953 report.
9954
9955 (SCM_SRS): Avoid unnecessary casting and don't unpack input
9956 values. With this patch, SCM_SRS can be safely used for other
9957 types than scm_t_signed_bits. However, it should still better be
9958 an internal macro and thus be renamed to SCM_I_SRS.
9959
9960 (SCM_MAKINUM, SCM_INUM): Use proper casting.
9961
9962 2001-10-03 Gary Houston <ghouston@arglist.com>
9963
9964 * continuations.h, unif.h: in the descriptions of the bit patterns
9965 of the heap cells, make bit 0 the least significant.
9966
9967 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
9968
9969 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
9970 Thanks to Golubev I. N.
9971
9972 2001-09-25 Gary Houston <ghouston@arglist.com>
9973
9974 * ports.c (scm_drain_input): extended the docstring. thanks to
9975 Alex Schroeder and Thien-Thi Nguyen.
9976
9977 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
9978
9979 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
9980 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
9981 macros. (The NUM names might soon change.)
9982
9983 * numbers.h: Added missing declarations.
9984
9985 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
9986
9987 * Makefile.am: Distribute num2float.i.c.
9988
9989 * num2float.i.c: New file, multiply included by numbers.c, used
9990 to "templatize" the float <-> num conversion routines.
9991
9992 * numbers.c: New functions: scm_num2float, scm_float2num,
9993 scm_num2double, scm_double2num.
9994
9995 2001-09-21 Rob Browning <rlb@defaultvalue.org>
9996
9997 * .cvsignore: really add version.h
9998
9999 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10000 Otherwise it fails on the alpha. However, we might rather choose
10001 this size conditionally.
10002
10003 * numbers.c (scm_gcd): change "k" to a long from an int.
10004 Otherwise it fails on the alpha. However, we might rather choose
10005 this size conditionally.
10006
10007 * error.c (scm_wta): coerce char* to intptr_t before int
10008 assignment.
10009
10010 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10011 int.
10012
10013 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10014
10015 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10016
10017 * numbers.c (scm_integer_expt): Accept inexact integer in second
10018 argument. (Thanks to Bill Schottstaedt.)
10019
10020 2001-09-20 Rob Browning <rlb@defaultvalue.org>
10021
10022 * .cvsignore: add version.h
10023
10024 * versiondat.h.in: removed (obsolete).
10025
10026 * version.h.in: renamed from version.h.
10027 (SCM_GUILE_MAJOR_VERSION): new public macro.
10028 (SCM_GUILE_MINOR_VERSION): new public macro.
10029 (SCM_GUILE_MICRO_VERSION): new public macro.
10030
10031 * version.h: renamed to version.h.in.
10032
10033 * version.c
10034 (scm_major_version): support integer *_VERSION macros.
10035 (scm_minor_version): support integer *_VERSION macros.
10036 (scm_micro_version): support integer *_VERSION macros.
10037 (scm_version): support integer *_VERSION macros.
10038
10039 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10040
10041 * error.c, error.h: Made error keys globally accessible.
10042 Applications might want to test for these or use them in a direct
10043 call to scm_error.
10044
10045 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10046 routines are passed an inexact. This change in behavior is
10047 motivated by concordance with R5RS: It is more common that a
10048 primitive doesn't want to accept an inexact for an exact.
10049
10050 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10051
10052 The following patch partially undoes my patch from 2001-06-30,
10053 where I added the function scm_gc_mark_cell_conservatively. The
10054 function is buggy, since it breaks guile during conservative
10055 marking if a pointer on the stack points directly into the list of
10056 free cells on the heap: With conservative cell marking this will
10057 cause the whole free list to be scanned and marked - boom!
10058
10059 * gc.c (allocated_mark, MARK, heap_segment,
10060 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
10061 (scm_gc_mark_cell_conservatively): Remove function
10062 scm_gc_mark_cell_conservatively and update the corresponding
10063 comments and uses accordingly. Thanks to Christopher Cramer for
10064 the patch. (Minor corrections by me.)
10065
10066 2001-09-15 Gary Houston <ghouston@arglist.com>
10067
10068 * root.h (scm_root_state): removed the continuation_stack and
10069 continuation_stack_ptr members, which have no apparent purpose.
10070 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10071 removed.
10072
10073 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10074 (scm_igc): remove all references to contination_stack and
10075 continuation_stack_ptr, avoiding allocation of a vector and
10076 useless processing during gc.
10077
10078 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10079
10080 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10081
10082 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10083
10084 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10085
10086 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10087
10088 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10089 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10090
10091 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10092
10093 * guardians.c (mark_dependencies_in_tconc,
10094 whine_about_self_centered_zombies, scm_init_guardians): Register
10095 the static global variable `self_centered_zombies' via
10096 scm_gc_register_root, to make some cdr-ing unnecessary.
10097
10098 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10099
10100 * backtrace.c (display_backtrace_file,
10101 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10102 values, use SCM_FALSEP when comparing SCM values against #f.
10103 Thanks to Rob Browning for the bug report.
10104
10105 2001-09-12 Martin Baulig <martin@home-of-linux.org>
10106
10107 * strings.[ch] (scm_str2string): New function.
10108
10109 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10110
10111 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10112 when computing nm, even if it's negative.
10113 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10114 (scm_must_realloc): Likewise.
10115
10116 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10117
10118 * numbers.c (scm_sys_check_number_conversions): new function,
10119 defined if Guile is compiled in debugging mode. currently checks
10120 `scm_num2ulong', should check much much more.
10121
10122 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10123 unsigned, ensure that it's positive. thanks to Martin Baulig!
10124
10125 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10126
10127 * __scm.h: Added new section about compile time selectable
10128 features.
10129
10130 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10131 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10132 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10133 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10134 Removed.
10135
10136 * deprecation.c (scm_include_deprecated_features): Simplified.
10137
10138 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
10139 `SCM_IMP' instead of `!SCM_CELLP´.
10140
10141 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10142 Extract side-effecting operations from macros.
10143
10144 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10145 scm_top_level_lookup_closure_var and scm_system_transformer.
10146
10147 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10148
10149 (heap_segment): Use CELL_P instead of SCM_CELLP.
10150
10151 * init.c (start_stack): Don't initialize
10152 scm_top_level_lookup_closure_var and scm_system_transformer.
10153
10154 * modules.c (scm_set_current_module): Don't access
10155 scm_top_level_lookup_closure_var and scm_system_transformer.
10156
10157 (scm_sym2var): Don't call scm_variable_set_name_hint.
10158
10159 (scm_post_boot_init_modules): Removed deprecated initializations.
10160
10161 * print.c (scm_ipruk): Don't access cell contents of non cells.
10162
10163 * strings.c (scm_string_set_x): All strings are writable.
10164
10165 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10166 type. There is only one string type now.
10167
10168 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10169
10170 * tags.h: Remove comments about two different string types.
10171
10172 (SCM_CELLP, SCM_NCELLP): Deprecated.
10173
10174 * variable.c (make_variable): Remove code variant for vcells.
10175
10176 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10177 SCM_VARIABLE_LOC): Remove code variant for vcells.
10178
10179 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10180 SCM_ENABLE_DEPRECATED with the logic reversed.
10181
10182 * dynl.c (moddata, registered_mods), dynl.[ch]
10183 (scm_register_module_xxx, scm_registered_modules,
10184 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10185 (*top-level-lookup-closure*), eval.[ch]
10186 (scm_top_level_lookup_closure_var, scm_system_transformer,
10187 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10188 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10189 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10190 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10191 scm_unprotect_object), modules.c (root_module_lookup_closure,
10192 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10193 beautify_user_module_x_var, try_module_autoload_var,
10194 scm_module_full_name), modules.[ch] (scm_the_root_module,
10195 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
10196 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
10197 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10198 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10199 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10200 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10201 scm_make_shared_substring), tags.h (scm_tc7_substring,
10202 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10203 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10204 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10205 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10206 Removed.
10207
10208 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10209 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10210 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10211 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10212 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10213 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10214 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10215 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10216 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10217 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10218 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10219 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10220 (setzone, scm_strftime, scm_strptime), vports.c
10221 (scm_make_soft_port): Remove calls to
10222 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10223 gone, all strings are 0-terminated anyway.
10224
10225 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10226 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10227 double inclusion of the same headers to the SCM_<filename>_H
10228 format.
10229
10230 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10231 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10232 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10233 any more.
10234
10235 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10236 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10237 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10238 !SCM_<foo> over SCM_N<foo>.
10239
10240 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10241
10242 * Makefile.am: Remove references to symbols-deprecated.c.
10243
10244 * symbols.c (scm_init_symbols): Don't initialize deprecated
10245 symbol functions.
10246
10247 * symbols-deprecated.c: Removed.
10248
10249 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10250 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10251 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10252 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10253 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10254 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10255 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10256 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10257 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10258 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10259 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10260 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10261 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10262 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10263 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10264 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10265 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10266 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10267 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10268 scm_intern0, scm_sysintern, scm_sysintern0,
10269 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10270 scm_string_to_obarray_symbol, scm_intern_symbol,
10271 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10272 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10273 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10274 vectors.[ch] (scm_vector_set_length_x): Removed.
10275
10276 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10277 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10278 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10279 Renamed the macros that are defined to inhibit double inclusion of
10280 the same headers to the SCM_<filename>_H format.
10281
10282 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10283 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10284 SCM_N<foo>.
10285
10286 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10287
10288 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10289 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10290 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10291 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10292 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10293 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10294 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10295 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10296 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10297 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10298 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10299 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10300
10301 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10302 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10303 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10304 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10305 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10306 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10307 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10308 double inclusion of the same headers to the SCM_<filename>_H
10309 format.
10310
10311 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10312 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10313 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10314 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10315 !SCM_<foo> over SCM_N<foo>.
10316
10317 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10318
10319 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10320 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10321 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10322 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10323 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10324 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10325 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10326 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10327 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10328 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10329 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10330 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10331 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10332 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10333 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10334 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10335 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10336 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10337 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10338 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10339 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10340 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10341 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10342 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10343 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10344 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10345 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10346 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10347 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10348 the macros that are defined to inhibit double inclusion of the
10349 same headers to the SCM_<filename>_H format.
10350
10351 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10352
10353 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10354 "scm_t_portable" with "scm_port_table" which was an artifact from
10355 the great "scm_*_t -> scm_t_" renaming.
10356
10357 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10358
10359 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10360 used; nfc. Thanks to Bill Schottstaedt.
10361
10362 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10363 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10364 Thanks to Chris Cramer.
10365
10366 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10367
10368 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10369
10370 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10371 dynamic scope.
10372 * dynwind.h (scm_swap_bindings): Declare.
10373 * dynwind.c (scm_swap_bindings): Make non-static.
10374
10375 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10376
10377 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10378 doing exactly nothing about them). thanks Neil!
10379
10380 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10381
10382 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
10383
10384 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10385
10386 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10387 (proto) in the case when either `GUILE_DEBUG' or
10388 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10389
10390 (map_free_list): Fix typo: Ref `f' correctly.
10391
10392 Thanks to Chris Cramer.
10393
10394 2001-08-15 Rob Browning <rlb@defaultvalue.org>
10395
10396 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10397 variables.
10398 (libpath.h): change libguileversion to libguileinterface.
10399
10400 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10401
10402 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10403 ChangeLog-2000. Thanks to Daniel Skarda!
10404
10405 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10406
10407 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10408 do it from the Makefile.
10409
10410 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10411 are of a reasonable size.
10412
10413 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10414
10415 * stacks.c (scm_make_stack): Improve docstring by explaining use
10416 of cutting args.
10417
10418 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10419
10420 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10421 scm_char_whitespace_p, scm_char_upper_case_p,
10422 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10423 characters to fulfill isascii in addition to the primary
10424 predicate.
10425
10426 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10427
10428 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10429 scm_istr2flo, scm_istring2number): Removed.
10430
10431 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10432 SCM_SLOPPY_<foo>.
10433
10434 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10435 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10436 Added.
10437
10438 (scm_string_to_number): Use new number parser.
10439
10440 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10441 handles complex numbers.
10442
10443 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10444 SCM_<foo>_H.
10445
10446 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10447 SCM_N<pred>.
10448
10449 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10450
10451 (scm_i_mem2number): Added.
10452
10453 (scm_exact_to_inexact): Changed signature.
10454
10455 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10456 here instead of within scm_i_mem2number. Call scm_i_mem2number
10457 instead of scm_istr2int and scm_istring2number.
10458
10459 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10460
10461 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10462 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10463 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10464 !SCM_<pred> over SCM_N<pred>.
10465
10466 (scm_eval_body): Remove side effecting code from macro call.
10467
10468 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10469 SCM_NIMP test.
10470
10471 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10472
10473 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10474
10475 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10476
10477 Removed vcell slot from structs.
10478
10479 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10480 subsequent indices.
10481
10482 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10483 zero. Use scm_vtable_index_layout instead of "0" when accessing
10484 said slot.
10485 (scm_init_struct): Remove vcell slot layout code from
10486 required_vtable_fields.
10487
10488 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10489
10490 * goops.c (build_class_class_slots): Removed vcell slot
10491 definition.
10492
10493 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10494 Removed vcell slot layout code.
10495 (scm_si_vcell): Removed.
10496
10497 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10498
10499 "Glocs" have been removed.
10500
10501 * tags.h: Update tag system docs.
10502 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10503 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10504 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10505 or SCM_NCONSP, respectively.
10506
10507 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10508 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10509 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10510
10511 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10512 tell glocs from structs.
10513
10514 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10515
10516 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10517 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10518 instead of with glocs.
10519 (EVALCAR): Do not test for glocs.
10520 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10521 condition.
10522 (scm_unmemocar): Do not handle glocs.
10523 (scm_m_atfop): Memoize as a variable, not as a gloc.
10524 (scm_eval_args, scm_deval_args): Do not handle glocs.
10525 (scm_ceval, scm_deval): Likewise.
10526
10527 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10528 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10529 Removed.
10530
10531 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10532
10533 * dynwind.c (scm_swap_bindings): Likewise.
10534 (scm_dowinds): Updated to recognize lists of variables instead of
10535 lists of glocs.
10536
10537 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10538
10539
10540 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10541 where it is needed.
10542
10543 2001-07-25 Gary Houston <ghouston@arglist.com>
10544
10545 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10546 docstrings to reflect the n-ary implementation.
10547
10548 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10549
10550 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10551 value of a variable, not the plain "return" statement.
10552
10553 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10554
10555 * eval.c: Allow variables in memoized code (in addition to glocs).
10556 (scm_lookupcar): Handle variables in lost races. Replace symbol
10557 with variable directly, do not make a gloc.
10558 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10559 like glocs.
10560 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10561 the main switch.
10562
10563 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10564
10565 * variable.c (scm_i_variable_print): Use "value" instead of
10566 "binding" since a binding is the mapping between symbols and
10567 variables, not between variables and their values.
10568
10569 * tags.h (scm_tc7_variable): New.
10570 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10571 * print.c (scm_iprin1): Likewise.
10572
10573 * variable.h (scm_tc16_variable): Removed.
10574 (SCM_VARIABLEP): Test for new tc7 code.
10575 (scm_i_variable_print): New.
10576 * variable.c (scm_tc16_variable): Removed.
10577 (variable_print): Renamed to scm_i_variable_print and made
10578 non-static.
10579 (variable_equal_p): Removed.
10580 (make_variable): Construct a tc7 object instead of a smob.
10581 (scm_init_variable): Do not register smob.
10582
10583 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10584
10585 * tags.h: Include inttypes.h when we have it.
10586
10587 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10588
10589 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10590 is taken by the new SCM_IM_CALL_WITH_VALUES.
10591 * print.c (scm_isymnames): Update table accordingly.
10592
10593 2001-07-22 Gary Houston <ghouston@arglist.com>
10594
10595 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10596 SCM_MAKINUM to convert regoff_t value to SCM.
10597
10598 2001-07-21 Gary Houston <ghouston@arglist.com>
10599
10600 * scmsigs.c: include sys/time.h for itimer stuff.
10601
10602 2001-07-19 Rob Browning <rlb@defaultvalue.org>
10603
10604 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10605
10606 * c-tokenize.lex: add option %nounput to quiet warning.
10607 Add prototype for yylex to quiet warning.
10608
10609 * scmconfig.h.in: add flags for setitimer and getitimer.
10610
10611 * scmsigs.h (scm_init_scmsigs): new prototype.
10612 (scm_init_scmsigs): new prototype.
10613
10614 * scmsigs.c (s_scm_setitimer): new function.
10615 (s_scm_setitimer): new function.
10616
10617 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10618
10619 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10620 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10621 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10622 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10623 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10624 guile-func-name-check.in, guile-snarf-docs-texi.in,
10625 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10626 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10627 objprop.c, objprop.h, options.c, options.h, random.h,
10628 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10629 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10630 version.c, version.h: Updated copyright notice.
10631
10632 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10633
10634 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10635 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10636 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10637 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10638 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10639 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10640 sym_environment, scm_sym_change_class): New static variables to
10641 hold predefined symbols.
10642
10643 (build_class_class_slots): Build the list using scm_list_n
10644 instead of cons. Also, slots are already created as lists, thus
10645 making a call to maplist unnecessary.
10646
10647 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10648 scm_class_direct_subclasses, scm_class_direct_methods,
10649 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10650 scm_method_procedure, create_standard_classes, purgatory): Use
10651 predefined symbols.
10652
10653 (build_slots_list, compute_getters_n_setters,
10654 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10655 get_slot_value_using_name, set_slot_value_using_name,
10656 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10657 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10658 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10659
10660 (scm_sys_prep_layout_x): Minimize variable scopes.
10661
10662 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10663 scm_sys_fast_slot_set_x): Fix signedness.
10664
10665 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10666 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10667 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10668 when converting to and from SCM values.
10669
10670 (scm_enable_primitive_generic_x): Add rest argument checking.
10671
10672 (map, filter_cpl, maplist, scm_sys_initialize_object,
10673 scm_sys_prep_layout_x, slot_definition_using_name,
10674 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10675 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10676 predicates over SCM_N?IMP tests.
10677
10678 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10679 checking.
10680
10681 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10682 alias.
10683
10684 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10685
10686 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10687
10688 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10689
10690 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10691
10692 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10693
10694 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10695
10696 * strings.c (s_scm_string): fix arg position in assert.
10697
10698 2001-07-11 Gary Houston <ghouston@arglist.com>
10699
10700 * strports.c (st_write): use memcpy, not strncpy. thanks to
10701 Dale P. Smith.
10702
10703 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10704
10705 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10706 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10707 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10708 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10709 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10710 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10711 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10712 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10713 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10714 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10715 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10716 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10717 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10718 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10719 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10720 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10721 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10722 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10723 weaks.c, weaks.h: Remove "face-lift" comment.
10724
10725 2001-07-08 Rob Browning <rlb@defaultvalue.org>
10726
10727 * .cvsignore: add stamp-h.in.
10728
10729 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10730
10731 * hooks.c (scm_make_hook, scm_add_hook_x),
10732 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10733 value info to the docstrings.
10734
10735 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10736
10737 Some more compatibility patches for Windows.
10738
10739 * posix.c (getlogin): getlogin() implementation for Windows.
10740
10741 * backtrace.c, ioext.c: Include <stdio.h>.
10742
10743 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10744 exist.
10745
10746 * cpp_sig_symbols.in: Added SIGBREAK.
10747
10748 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10749
10750 * strports.c (scm_read_0str, scm_eval_0str): Call
10751 scm_c_read_string and scm_c_eval_string respectively, not
10752 themselves. Thanks to Dale P. Smith!
10753
10754 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10755
10756 * unif.c (scm_array_set_x): The variable args does not
10757 necessarily have to be a list. Further, got rid of a redundant
10758 SCM_NIMP test.
10759
10760 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10761
10762 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10763 last.
10764
10765 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
10766 init_heap_seg): Fixed signedness.
10767
10768 (init_heap_seg): Replaced strange for-loop with a while loop.
10769
10770 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10771
10772 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10773
10774 The following patch adds conservative marking for the elements of
10775 free or allocated cells.
10776
10777 * gc.c (allocated_mark, heap_segment): New static functions.
10778
10779 (which_seg): Deleted, since the functionality is now provided by
10780 function heap_segment.
10781
10782 (map_free_list): Use heap_segment instead of which_seg.
10783
10784 (MARK): If cell debugging is disabled, mark free cells
10785 conservatively.
10786
10787 (scm_mark_locations, scm_cellp): Extracted the search for the
10788 heap segment of a SCM value into function heap_segment.
10789
10790 (scm_init_storage): Allocated cells must be marked
10791 conservatively.
10792
10793 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10794
10795 The following patch changes the representation of weak vectors to
10796 double cells instead of using an extension of the vector's
10797 allocated memory.
10798
10799 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10800 the result of SCM_WVECT_GC_CHAIN.
10801
10802 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10803
10804 * weaks.c (allocate_weak_vector): New static function. It does
10805 not patch any previously created vector object during the
10806 construction of a weak vector, and thus doesn't need to switch
10807 off interrupts during vector creation.
10808
10809 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10810 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10811 Use allocate_weak_vector to provide the new weak vector object.
10812
10813 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10814 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10815 now stored in the double cell.
10816
10817 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10818 Use SCM_WVECT_TYPE.
10819
10820 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10821 using an entry of the double cell.
10822
10823 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
10824
10825 * stamp-h.in: bye bye
10826
10827 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
10828
10829 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
10830 scm_eval_0str.
10831
10832 * load.c, load.h (scm_c_primitive_load,
10833 scm_c_primitive_load_path): New.
10834
10835 * strports.c, strports.h (scm_c_read_string): Renamed from
10836 scm_read_0str. Also, added "const" qualifier to argument.
10837 (scm_c_eval_string): Renamed from scm_eval_0str.
10838 (scm_read_0str, scm_eval_0str): Deprecated.
10839
10840 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10841
10842 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
10843 SCM_LIST1.
10844
10845 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
10846
10847 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
10848 scm_list_n): New functions.
10849 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
10850 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
10851 (lots of files): Use the new functions.
10852
10853 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
10854
10855 * strings.c: #include "libguile/deprecation.h".
10856
10857 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10858
10859 * read.c (scm_lreadr): When reading a hash token, check for a
10860 user-defined hash procedure first, so that overriding the builtin
10861 hash characters is possible (this was needed for implementing
10862 SRFI-4's read synax `f32(...)').
10863
10864 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
10865 because the latter is unsigned now and breaks comparisons like
10866 (n < (scm_t_signed_bits)MIN_VALUE).
10867
10868 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
10869
10870 * eval.h, eval.c (scm_call_4): New function.
10871
10872 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
10873 directly rather than dispatching to them via scm_ithrow and a lazy
10874 catch.
10875
10876 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
10877 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
10878 for trap handler procedures.
10879
10880 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
10881 procedures not being #f.
10882
10883 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
10884
10885 * Makefile.am (c-tokenize.c): add rule to generate it.
10886 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
10887
10888 filter-doc-snarfage.c: remove.
10889
10890 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10891
10892 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
10893
10894 The following set of changes makes compiling Guile under various
10895 Windows compilers easier. Compilation under GNU systems should
10896 not be affected at all.
10897
10898 Thanks to Stefan Jahn for all necessary information, patches and
10899 testing.
10900
10901 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
10902 getpgrp, ttyname, primitive-fork and some header inclusion for
10903 Windows.
10904
10905 * random.c: Define M_PI, if not predefined and use __int64 for
10906 LONG64 under Windows.
10907
10908 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
10909 Windows and conditionalize some signal names.
10910
10911 * socket.c (scm_getsockopt): Added missing comma.
10912 Include socket library header under Windows.
10913
10914 * stime.c (CLKTCK): Add cast to int, to make it compile under
10915 Windows.
10916
10917 * ports.c (truncate): New function, compiled only under Windows.
10918
10919 * net_db.c: Do not declare errno under Windows.
10920
10921 * iselect.h, inet_aton.c: Include socket library headers under
10922 Windows.
10923
10924 * guile.c (inner_main): Under Windows, initialize socket library
10925 and initialize gdb_interface data structures.
10926
10927 * gdb_interface.h: Under Windows, gdb_interface cannot be
10928 initialized statically. Initialize at runtime instead.
10929
10930 * fports.c (write_all): ssize_t -> size_t.
10931 (fport_print): Conditionalize call to ttyname().
10932 (getflags): New function, compiled only under Windows.
10933
10934 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
10935 primitives chown, link, fcntl.
10936 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
10937 as path seperator.
10938
10939 * backtrace.c: Include <io.h> under Windows.
10940
10941 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
10942
10943 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
10944 declaration.
10945
10946 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
10947
10948 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10949 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
10950 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10951 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
10952 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
10953 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
10954 (scm_dynamic_wind, scm_dowinds), environments.c
10955 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
10956 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
10957 goops.c (GETVAR, purgatory, make_class_from_template,
10958 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
10959 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
10960 (scm_primitive_load), modules.c (scm_resolve_module,
10961 scm_c_define_module, scm_c_use_module, scm_c_export,
10962 module_variable, scm_eval_closure_lookup, scm_sym2var,
10963 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
10964 ports.c (scm_port_for_each), print.c (scm_printer_apply),
10965 properties.c (scm_primitive_property_ref), ramap.c (ramap,
10966 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
10967 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
10968 (scm_object_to_string, scm_call_with_output_string,
10969 scm_call_with_input_string), throw.c (scm_body_thunk,
10970 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
10971 scm_make_shared_array), vports.c (sf_flush, sf_write,
10972 sf_fill_input, sf_close): Use one of the above functions.
10973 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
10974
10975 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10976
10977 * filesys.c (scm_close), ports.c (scm_close_port,
10978 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
10979 instead of SCM_NEGATE_BOOL.
10980
10981 * filesys.c (scm_stat): Clean up type dispatch.
10982
10983 * filesys.c (scm_stat), ports.c (scm_input_port_p,
10984 scm_output_port_p): Get rid of redundant IM type check.
10985
10986 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
10987 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
10988 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10989 scm_return_entry), numbers.c (scm_number_to_string), objects.c
10990 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
10991 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
10992 scm_addr_vector), stime.c (scm_strftime), strings.c
10993 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
10994 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
10995 scm_string_split), strports.c (scm_strport_to_string), symbols.c
10996 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
10997 instead of scm_makfromstr.
10998
10999 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11000 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11001 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11002 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11003 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11004 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11005 !SCM_<pred> over SCM_N<pred>.
11006
11007 * strings.[ch] (scm_makfromstr): Deprecated.
11008
11009 (scm_mem2string): New function, replaces scm_makfromstr.
11010
11011 * strings.c (scm_substring), strop.c (string_copy,
11012 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11013 (scm_symbol_to_string): Fix gc problem.
11014
11015 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11016 SCM_<foo>_H.
11017
11018 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11019 warning about comparing signed and unsigned values. This fix is
11020 not optimal, since it won't work reliably if sizeof (c_start) >
11021 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11022 solution is to define this macro as an inline function, thus
11023 allowing to specifiy the types of c_start and c_end.
11024
11025 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11026
11027 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11028 scm_t_debug_frame*.
11029
11030 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11031 Rename <foo>H to SCM_<foo>_H.
11032
11033 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11034 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11035
11036 (narrow_stack): Make i unsigned. Don't use side-effecting
11037 operations in conditions.
11038
11039 (narrow_stack, scm_make_stack, scm_stack_id,
11040 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11041
11042 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11043 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11044 more.
11045
11046 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11047 signedness.
11048
11049 (scm_last_stack_frame): Remove bogus `;'.
11050
11051 * stacks.h (SCM_FRAMEP): Fix type check.
11052
11053 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11054
11055 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11056 c-tokenize.c when doing maintainer-clean.
11057
11058 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11059
11060 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11061 simplify.
11062
11063 * eval.c: all hash signs are in column 0.
11064
11065 * Makefile.am (guile_filter_doc_snarfage): build using
11066 c-tokenize.c, not filter-doc-snarfage.c.
11067 rearrange snarfing dependencies a bit.
11068
11069 * c-tokenize.lex: new file.
11070
11071 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11072
11073 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11074 scm_t_srcpropso_plist. See the big type renaming.
11075 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11076 Thanks to Seth Alves!
11077
11078 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11079 they aren't defined already.
11080
11081 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11082
11083 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11084 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11085 problem.
11086
11087 * backtrace.c (display_expression, scm_set_print_params_x,
11088 display_application, display_frame, scm_backtrace), numbers.c
11089 (scm_istring2number), objects.c (scm_class_of,
11090 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11091 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11092
11093 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11094 always positive.
11095
11096 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11097 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11098
11099 * objects.c (scm_class_of): Type fix.
11100
11101 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11102 eliminated goto.
11103
11104 * pairs.h (scm_error_pair_access): The function can return if
11105 called recursively.
11106
11107 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11108
11109 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11110
11111 * gdbint.c, init.c: Removed inclusion of tag.h.
11112
11113 * tag.h, tag.c: Removed files.
11114
11115 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11116
11117 2001-06-20 Gary Houston <ghouston@arglist.com>
11118
11119 * deprecation.c, extensions.c, rw.c: include string.h.
11120
11121 2001-06-19 Gary Houston <ghouston@arglist.com>
11122
11123 * filter-doc-snarfage.c (process): added ungetc in
11124 MULTILINE_COOKIE case since otherwise it fails when there's no
11125 space between the '(' and the quote of the following string
11126 (gcc 3.0).
11127
11128 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11129
11130 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11131
11132 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11133
11134 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
11135 extension takes place.
11136 * strings.h (SCM_STRING_LENGTH): Likewise.
11137 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
11138
11139 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11140 it.
11141
11142 * tags.h: Include <stdint.h> when we have it.
11143 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11144 available. Else use "unsigned long".
11145 (scm_signed_bits_t): New.
11146
11147 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11148 (SCM_INUM): Cast result to scm_signed_bits_t.
11149
11150 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11151
11152 * mkstemp.c: Update path to #include file scmconfig.h.
11153 Thanks to Golubev I. N.
11154
11155 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11156
11157 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11158
11159 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
11160 the macro definition.
11161
11162 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11163 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11164 instead of SCM_INST_TYPE.
11165
11166 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11167 the object is a struct before accessing its struct flags.
11168
11169 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11170
11171 2001-06-10 Gary Houston <ghouston@arglist.com>
11172
11173 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11174 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11175 work reliably anymore. try it from boot-9.scm instead.
11176
11177 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11178
11179 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
11180 Thanks to Matthias Köppe!
11181
11182 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11183
11184 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11185 space-happy C preprocessors.
11186
11187 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
11188 inside cookies. thanks to Matthias Köppe!
11189
11190 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11191
11192 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11193 keywords. Fix gc protection.
11194
11195 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11196 operations in macro calls.
11197
11198 * pairs.c (scm_error_pair_access): Avoid recursion.
11199
11200 Thanks to Matthias Koeppe for reporting the bugs that correspond
11201 to the following set of patches.
11202
11203 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11204 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11205 bitvector base address using SCM_BITVECTOR_BASE.
11206
11207 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11208 unsigned long*.
11209
11210 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11211
11212 * goops.c (SCM_CLASS_REDEF): Removed.
11213
11214 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11215 SCM_<foo>_H.
11216
11217 Thanks to Matthias Koeppe for reporting the bugs that correspond
11218 to the following set of patches.
11219
11220 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11221 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11222 scm_sys_allocate_instance, clear_method_cache,
11223 scm_sys_invalidate_method_cache_x, scm_make,
11224 create_standard_classes, scm_make_port_classes, scm_make_class,
11225 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11226
11227 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11228
11229 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11230
11231 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11232 UNARY_ELTS_CODE): Remove bogus break statement.
11233
11234 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11235 Don't access bit vectors elements as SCM objects.
11236
11237 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11238 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11239 Don't assign to an unpacked value.
11240
11241 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11242
11243 * __scm.h (SCM_NORETURN): Moved here from error.h.
11244
11245 (SCM_UNUSED): New macro.
11246
11247 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11248
11249 * backtrace.c (display_error_handler), continuations.c
11250 (continuation_print), debug.c (debugobj_print), dynwind.c
11251 (guards_print), environments.c (observer_print,
11252 core_environments_finalize, leaf_environment_cell,
11253 leaf_environment_print, eval_environment_print,
11254 eval_environment_observer, import_environment_define,
11255 import_environment_undefine, import_environment_print,
11256 import_environment_observer, export_environment_define,
11257 export_environment_undefine, export_environment_print,
11258 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11259 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11260 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11261 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11262 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11263 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11264 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11265 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11266 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11267 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11268 set_slot_value, test_slot_existence, scm_change_object_class,
11269 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11270 default_setter), guardians.c (guardian_print, guardian_gc_init,
11271 guardian_zombify, whine_about_self_centered_zombies), guile.c
11272 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11273 mallocs.c (malloc_print), numbers.c (scm_print_real,
11274 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11275 end_input_default, scm_port_print, fill_input_void_port,
11276 write_void_port), root.c (root_print), smob.c (scm_mark0,
11277 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11278 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11279 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11280 (scm_struct_free_0, scm_struct_free_standard,
11281 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11282 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11283 scm_handle_by_throw, scm_ithrow), weaks.c
11284 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11285 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11286 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11287
11288 * error.h (SCM_NORETURN): Moved to __scm.h.
11289
11290 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11291 Renamed <foo>H to SCM_<foo>_H.
11292
11293 * gc.c (debug_cells_gc_interval): New static variable.
11294
11295 (scm_assert_cell_valid): If selected by the user, perform
11296 additional garbage collections.
11297
11298 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11299 if additional garbage collections are desired.
11300
11301 (mark_gc_async): If additional garbage collections are selected
11302 by the user, don't call the after-gc-hook. Instead require the
11303 user to run the hook manually.
11304
11305 * pairs.c (scm_error_pair_access): New function. Only compiled
11306 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11307
11308 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11309
11310 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11311 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11312 is a real pair object. (Glocs are also accepted, but that may
11313 change.) If not, abort with an error message.
11314
11315 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11316
11317 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11318
11319 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11320 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11321
11322 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11323
11324 * extensions.c (scm_c_register_extension): Allow NULL as library
11325 name.
11326 (load_extension): Ignore NULL library names when comparing.
11327
11328 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11329 non-pointers are being compared. Thanks to Alexander Klimov!
11330
11331 2001-06-04 Gary Houston <ghouston@arglist.com>
11332
11333 * rw.c (scm_write_string_partial): new procedure implementing
11334 write-string/partial in (ice-9 rw).
11335 * rw.h: declare scm_write_string_partial.
11336
11337 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11338
11339 * keywords.c (keyword_print): Substract 1 from length of symbol
11340 name, accounting for the silly dash.
11341
11342 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11343 Do not emit deprecation warning.
11344
11345 Added exception notice to all files.
11346
11347 * dynl.c: Include "deprecation.h".
11348
11349 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11350
11351 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11352 scm_clear_registered_modules): Deprecated.
11353
11354 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
11355
11356 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11357 guile-snarf-docs-texi.
11358
11359 * fports.c: HAVE_ST_BLKSIZE changed to
11360 HAVE_STRUCT_STAT_ST_BLKSIZE.
11361 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11362 HAVE_STRUCT_STAT_ST_BLKSIZE.
11363
11364 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11365 HAVE_STRUCT_STAT_ST_RDEV.
11366 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11367 HAVE_STRUCT_STAT_ST_BLKSIZE.
11368 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11369 HAVE_STRUCT_STAT_ST_BLOCKS.
11370
11371 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11372
11373 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11374 of scm_eval_x to allow module changes between the forms in the
11375 string. Set/restore module using scm_c_call_with_current_module.
11376
11377 * mkstemp.c: New file, slightly modified from libiberties
11378 mkstemps.c.
11379
11380 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11381
11382 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11383 filter-doc-snarfage.c: new files.
11384
11385 * Makefile.am: add stuff to [build,] use and distribute
11386 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11387
11388 * guile-snarf.in: grok the new snarf output.
11389
11390 * snarf.h: make the output both texttools- and `read'-friendly.
11391
11392 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11393 guile-snarf-docs. (should also deprecate, I guess. maybe not).
11394
11395 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11396
11397 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11398 error for unsupported format controls and for superflous
11399 arguments. Thanks to Daniel Skarda!
11400
11401 * print.h, print.c (scm_print_symbol_name): Factored out of
11402 scm_iprin1.
11403 (scm_iprin1): Call it.
11404
11405 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11406 weird names are printed correctly.
11407
11408 * print.c (scm_print_symbol_name): Symbols whose name starts with
11409 `#' or `:' or ends with `:' are considered weird.
11410
11411 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11412
11413 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11414 and /.
11415
11416 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11417
11418 * debug.h: Removed prototype for scm_eval_string.
11419
11420 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11421
11422 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
11423 (make-string 2000 #\!))' in an older version).
11424
11425 Change strncpy to memcpy to allow embedded NUL characters in
11426 symbol prefix.
11427
11428 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11429
11430 * hooks.c (scm_create_hook): deprecated.
11431 (make_hook): deleted.
11432 (scm_make_hook): all the hook creation code is now here.
11433
11434 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11435 a hook, make it permanent, and do a `scm_c_define' on it.
11436
11437 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11438
11439 * socket.c (s_scm_inet_pton): fix docstring quoting.
11440 (s_scm_inet_ntop): ditto.
11441
11442 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11443
11444 * hashtab.c (scm_internal_hash_fold): fix argument position in
11445 SCM_ASSERT.
11446
11447 * environments.c (s_scm_import_environment_set_imports_x): fix
11448 argument position in SCM_ASSERT.
11449
11450 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11451 (s_scm_make_iloc): ditto.
11452
11453 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11454
11455 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11456
11457 * eval.c (promise_print): Read the promise's value as an object.
11458
11459 (SCM_CEVAL): Don't perform side-effecting operations in macro
11460 parameters.
11461
11462 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11463 conditional expression.
11464
11465 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11466 initializer.
11467
11468 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11469 text, removed redundant computation of effective_length and fixed
11470 the overflow check.
11471
11472 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11473 values.
11474
11475 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11476
11477 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11478
11479 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11480 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11481
11482 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11483
11484 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11485 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11486 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11487 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11488
11489 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11490
11491 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11492
11493 * ramap.c (ramap_rp): Removed bogus `;'.
11494
11495 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11496 problem.
11497
11498 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11499 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11500 Read SCM objects rather than scm_bits_t values.
11501
11502 * tags.h (SCM_VOIDP_TEST): Removed.
11503
11504 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11505 value of 2 now corresponds to the former 1, the current 1
11506 corresponds to the former situation that SCM_VOIDP_TEST was
11507 defined.
11508
11509 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11510 If this appears to be not ANSI compliant, we will change it to
11511 typedef struct scm_unused_struct { } * SCM;
11512 Thanks to Han-Wen Nienhuys for the suggestion.
11513
11514 * unif.c (scm_array_set_x): Fix typing problem, and use
11515 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11516 dealing with uniform vectors.
11517
11518 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11519
11520 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11521 (scm_igc): mark from them, too (precisely, not conservatively!).
11522
11523 * root.h (scm_gc_registered_roots): new object in
11524 scm_sys_protects.
11525
11526 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11527 `scm_protect_object'. shouldn't call it at all, though, it seems.
11528
11529 * gc.c (scm_[un]protect_object): deprecated.
11530 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11531 (scm_gc_[un]register_root[s]): new.
11532
11533 * gc.h: add prototypes for scm_gc_[un]protect_object,
11534 scm_gc_[un]register_root[s].
11535
11536 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11537
11538 revert the controversial part of the 2001-05-24 changes.
11539
11540 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11541
11542 * modules.c (scm_env_module): Exported to Scheme.
11543
11544 * eval.c (scm_debug_opts): New option `show-file-name'.
11545
11546 * debug.h (SCM_SHOW_FILE_NAME): New.
11547
11548 * backtrace.c: Include "libguile/filesys.h".
11549 (sym_base, display_backtrace_get_file_line,
11550 display_backtrace_file, display_backtrace_file_and_line): New.
11551 (display_frame): Call display_backtrace_file_and_line if that is
11552 requested.
11553 (display_backtrace_body): Call scm_display_backtrace_file if
11554 requested.
11555
11556 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11557 Prototypes removed since there's no definition for these
11558 functions.
11559
11560 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11561
11562 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11563 Changed use of scm_array->scm_array_t and
11564 scm_array_dim->scm_array_dim_t to enable build with
11565 --disable-deprecated.
11566
11567 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11568
11569 The purpose of this set of changes is to regularize Guile's usage
11570 of ANSI C integral types, with the following ideas in mind:
11571
11572 - SCM does not nesessarily have to be long.
11573 - long is not nesessarily enough to store pointers.
11574 - long is not nesessarily the same size as int.
11575
11576 The changes are incomplete and possibly buggy. Please test on
11577 something exotic.
11578
11579 * validate.h
11580 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11581 new macros.
11582
11583 * unif.h: type renaming:
11584 scm_array -> scm_array_t
11585 scm_array_dim -> scm_array_dim_t
11586 the old names are deprecated, all in-Guile uses changed.
11587
11588 * tags.h (scm_ubits_t): new typedef, representing unsigned
11589 scm_bits_t.
11590
11591 * stacks.h: type renaming:
11592 scm_info_frame -> scm_info_frame_t
11593 scm_stack -> scm_stack_t
11594 the old names are deprecated, all in-Guile uses changed.
11595
11596 * srcprop.h: type renaming:
11597 scm_srcprops -> scm_srcprops_t
11598 scm_srcprops_chunk -> scm_srcprops_chunk_t
11599 the old names are deprecated, all in-Guile uses changed.
11600
11601 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11602 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11603 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11604 vectors.c, vports.c, weaks.c:
11605 various int/size_t -> size_t/scm_bits_t changes.
11606
11607 * random.h: type renaming:
11608 scm_rstate -> scm_rstate_t
11609 scm_rng -> scm_rng_t
11610 scm_i_rstate -> scm_i_rstate_t
11611 the old names are deprecated, all in-Guile uses changed.
11612
11613 * procs.h: type renaming:
11614 scm_subr_entry -> scm_subr_entry_t
11615 the old name is deprecated, all in-Guile uses changed.
11616
11617 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11618 type renaming:
11619 scm_option -> scm_option_t
11620 the old name is deprecated, all in-Guile uses changed.
11621
11622 * objects.c: various long -> scm_bits_t changes.
11623 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11624
11625 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11626 SCM_I_FIXNUM_BIT.
11627
11628 * num2integral.i.c: new file, multiply included by numbers.c, used
11629 to "templatize" the various integral <-> num conversion routines.
11630
11631 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11632 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11633 deprecated.
11634 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11635 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11636 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11637 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11638 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11639 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11640 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11641 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11642 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11643 scm_num2size): new functions.
11644
11645 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
11646
11647 * load.c: change int -> size_t in various places (where the
11648 variable is used to store a string length).
11649 (search-path): call scm_done_free, not scm_done_malloc.
11650
11651 * list.c (scm_ilength): return a scm_bits_t, not long.
11652 some other {int,long} -> scm_bits_t changes.
11653
11654 * hashtab.c: various [u]int -> scm_bits_t changes.
11655 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11656 (scm_ihashx): n: uint -> scm_bits_t
11657 use scm_bits2num instead of scm_ulong2num.
11658
11659 * gsubr.c: various int -> scm_bits_t changes.
11660
11661 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11662
11663 * gh_data.c (gh_num2int): no loss of precision any more.
11664
11665 * gh.h (gh_str2scm): len: int -> size_t
11666 (gh_{get,set}_substr): start: int -> scm_bits_t,
11667 len: int -> size_t
11668 (gh_<num>2scm): n: int -> scm_bits_t
11669 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11670 (gh_length): return scm_bits_t, not unsigned long.
11671
11672 * gc.[hc]: various small changes relating to many things stopping
11673 being long and starting being scm_[u]bits_t instead.
11674 scm_mallocated should no longer wrap around.
11675
11676 * fports.h: type renaming:
11677 scm_fport -> scm_fport_t
11678 the old name is deprecated, all in-Guile uses changed.
11679
11680 * fports.c (fport_fill_input): count: int -> scm_bits_t
11681 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11682
11683 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11684 those prototypes, as the functions they prototype don't exist.
11685
11686 * fports.c (default_buffer_size): int -> size_t
11687 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11688 default_size: int -> size_t
11689 (scm_setvbuf): csize: int -> scm_bits_t
11690
11691 * fluids.c (n_fluids): int -> scm_bits_t
11692 (grow_fluids): old_length, i: int -> scm_bits_t
11693 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11694 scm_bits_t
11695 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11696
11697 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11698 the new and shiny SCM_NUM2INT.
11699
11700 * extensions.c: extension -> extension_t (and made a typedef).
11701
11702 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11703 there are no nasty surprises if/when the various deeply magic tag
11704 bits move somewhere else.
11705
11706 * eval.c: changed the locals used to store results of SCM_IFRAME,
11707 scm_ilength and such to be of type scm_bits_t (and not int/long).
11708 (iqq): depth, edepth: int -> scm_bits_t
11709 (scm_eval_stack): int -> scm_bits_t
11710 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11711 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11712 i: int -> scm_bits_t
11713
11714 * environments.c: changed the many calls to scm_ulong2num to
11715 scm_ubits2num.
11716 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11717
11718 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11719
11720 * debug.h: type renaming:
11721 scm_debug_info -> scm_debug_info_t
11722 scm_debug_frame -> scm_debug_frame_t
11723 the old names are deprecated, all in-Guile uses changed.
11724 (scm_debug_eframe_size): int -> scm_bits_t
11725
11726 * debug.c (scm_init_debug): use scm_c_define instead of the
11727 deprecated scm_define.
11728
11729 * continuations.h: type renaming:
11730 scm_contregs -> scm_contregs_t
11731 the old name is deprecated, all in-Guile uses changed.
11732 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11733 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11734
11735 * continuations.c (scm_make_continuation): change the type of
11736 stack_size from long to scm_bits_t.
11737
11738 * ports.h: type renaming:
11739 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11740 scm_port -> scm_port_t
11741 scm_ptob_descriptor -> scm_ptob_descriptor_t
11742 the old names are deprecated, all in-Guile uses changed.
11743 (scm_port_t.entry): int -> scm_bits_t.
11744 (scm_port_t.line_number): int -> long.
11745 (scm_port_t.putback_buf_size): int -> size_t.
11746
11747 * __scm.h (long_long, ulong_long): deprecated (they pollute the
11748 global namespace and have little value beside that).
11749 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11750 SCM handle).
11751 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
11752 exist (for size_t & ptrdiff_t).
11753 (scm_sizet): deprecated.
11754
11755 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11756
11757 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11758
11759 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11760 SCM_VARIABLE_INIT since that it what it used to be.
11761
11762 * deprecation.c (scm_include_deprecated_features): Make docstring
11763 ANSIsh. Thanks to Matthias Köppe!
11764
11765 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11766
11767 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11768 needed for weak-key hashtables.
11769
11770 * procs.c (scm_make_subr_with_generic): Add missing last argument
11771 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11772
11773 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11774 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
11775
11776 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11777
11778 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11779
11780 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11781 `duplicate_string'. Do not use an indirect cell, store symbol
11782 directly in collision list of hash table.
11783 (duplicate_string): Removed.
11784
11785 * init.c (scm_init_guile_1): Call scm_init_extensions.
11786
11787 * Makefile.am: Add "extensions.c" and related files in all the
11788 right places.
11789
11790 * extensions.h, extension.c: New files.
11791
11792 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11793
11794 * modules.h (scm_system_module_env_p): Move out of deprecated
11795 section.
11796
11797 * rw.h (scm_init_rw): Added prototype.
11798
11799 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11800 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11801 New functions. They replace scm_make_gsubr and
11802 scm_make_gsubr_with_generic. The `make' variants only create the
11803 gsubr object, while the `define' variants also put it into the
11804 current module. Changed all callers.
11805 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11806
11807 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11808 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11809 functions. They replace scm_make_subr, scm_make_subr_opt and
11810 scm_make_subr_with_generic. The `make' variants only create the
11811 subr object, while the `define' variants also put it into the
11812 current module. Changed all callers.
11813 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11814 Deprecated.
11815
11816 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11817 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11818 the comments above.
11819
11820 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11821
11822 * throw.c (scm_lazy_catch): Slight docstring clarification.
11823
11824 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
11825
11826 * throw.c: Lazy-catch handlers are no longer allowed to return.
11827 Fixed comments throughout.
11828 (scm_ithrow): Signal an error when a lazy-catch handler returns.
11829 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
11830 recognized as such.
11831
11832 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
11833 refered to s_scm_minor_version previously.
11834
11835 * modules.h, modules.c: Moved around a lot of code so that
11836 deprecated features appear at the bottom.
11837 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
11838 module_prefix, make_modules_in_var, beautify_user_module_x_var,
11839 scm_the_root_module, scm_make_module, scm_ensure_user_module,
11840 scm_load_scheme_module): Deprecated.
11841 (scm_system_module_env_p): Return SCM_BOOL_T directly for
11842 environments corresponding to the root module.
11843 (convert_module_name, scm_c_resolve_module,
11844 scm_c_call_with_current_module, scm_c_define_module,
11845 scm_c_use_module, scm_c_export): New.
11846 (the_root_module): New static variant of scm_the_root_module. Use
11847 it everywhere instead of scm_the_root_module.
11848
11849 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
11850 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
11851 (scm_c_with_fluid): New.
11852 (scm_with_fluids): Use scm_c_with_fluids instead of
11853 scm_internal_with_fluids.
11854
11855 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
11856 `scm_init_goops'. Do not explicitly create/switch modules.
11857 Return SCM_UNSPECIFIED.
11858 (scm_init_goops): Only register `%init-goops-builtins' procedure.
11859 (scm_load_goops): Use scm_c_resolve_module instead of
11860 scm_resolve_module.
11861
11862 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
11863 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
11864 `scm_init_rw' prior to loading the startup files.
11865
11866 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
11867 scm_init_rdelim. Do not explicitly create/switch modules.
11868 Return SCM_UNSPECIFIED.
11869 (scm_init_rdelim): Only register `%init-rdelim-builtins'
11870 procedure.
11871
11872 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
11873 explicitly create/switch modules. Return SCM_UNSPECIFIED.
11874 (scm_init_rw): Only register `%init-rw-builtins' procedure.
11875
11876 * script.c (scm_shell): Evaluate the compiled switches in the
11877 current module, not in the root module.
11878
11879 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
11880
11881 * fluids.c (scm_c_with_fluids): Rename from
11882 scm_internal_with_fluids.
11883 (scm_internal_with_fluids): Deprecated.
11884 (scm_c_with_fluid): New.
11885
11886 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11887
11888 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
11889
11890 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
11891 accessed with SCM_C[AD]R.
11892
11893 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
11894
11895 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
11896
11897 * version.c (s_scm_major_version): doc fixes.
11898 (s_scm_minor_version): doc fixes.
11899 (s_scm_minor_version): new function.
11900
11901 * version.h (scm_init_version): new function.
11902
11903 * versiondat.h.in: add GUILE_MICRO_VERSION.
11904
11905 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11906
11907 * deprecation.c (scm_init_deprecation): Renamed
11908 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
11909
11910 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
11911
11912 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
11913 dependent on cpp_cnvt.awk
11914
11915 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11916
11917 * script.c (scm_compile_shell_switches): New command line option
11918 `--use-srfi' for loading a list of SRFIs on startup.
11919 (scm_shell_usage): Added `--use-srfi' to help message.
11920
11921 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11922
11923 Merged from mvo-vcell-cleanup-1-branch.
11924
11925 The concept of vcells has been removed from Guile. With it,
11926 explicit obarrays and associated operations are gone. Use
11927 hashtables instead of obarrays.
11928
11929 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
11930 result as variable instead of vcell. Glocs no longer point to a
11931 vcell but to a variable. Use scm_c_define instead of
11932 scm_sysintern and treat the result as a variable (which it is),
11933 not a vcell.
11934
11935 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
11936 SCM_DEFVARIABLEP): Deprecated.
11937 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
11938 (variable_print): Do not print name of variable.
11939 (variable_equalp): Compare values, not vcells.
11940 (anonymous_variable_sym): Removed.
11941 (make_vcell_variable): Removed.
11942 (make_variable): New, as replacement.
11943 (scm_make_variable, scm_make_undefined_variable): Do not take name
11944 hint parameter.
11945 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
11946 error in that case.
11947 (scm_builtin_variable): Deprecated.
11948
11949 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
11950 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
11951 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
11952 scm_sysintern, scm_sysintern0, scm_symbol_value0,
11953 scm_string_to_obarray_symbol, scm_intern_symbol,
11954 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
11955 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
11956 Deprecated and moved to "symbols-deprecated.c".
11957 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
11958 (scm_init_symbols): Call scm_init_symbols_deprecated.
11959 * symbols-deprecated.c: New file.
11960 * Makefile.am: Added symbols-deprecated.c and related files in all
11961 the right places.
11962
11963 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
11964 SCM_GLOBAL_VCELL_INIT): Deprecated.
11965 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
11966 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
11967
11968 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
11969 SCM_GLOC_SYM.
11970
11971 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
11972 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
11973 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
11974 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
11975 Changed according to the `throughout' comments.
11976
11977 * modules.h, modules.c (scm_module_system_booted_p): Changed type
11978 to `int'.
11979 (scm_module_type): Removed.
11980 (the_root_module): Renamed to the_root_module_var. Now points to
11981 a variable instead of a vcell. Updated all uses.
11982 (scm_the_root_module): Return SCM_BOOL_F when module systems
11983 hasn't been booted yet.
11984 (SCM_VALIDATE_STRUCT_TYPE): Removed.
11985 (scm_post_boot_init_modules): Made static.
11986 (scm_set_current_module): Call scm_post_boot_init_modules on first
11987 call.
11988 (make_modules_in, beautify_user_module_x, resolve_module,
11989 try_module_autoload, module_make_local_var_x): Tacked on "_var"
11990 suffix. Now point to variables instead of vcells. Updated all
11991 uses.
11992 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
11993 and return SCM_BOOL_F in that case.
11994 (scm_module_transformer): Likewise.
11995 (sym_module, scm_lookup_closure_module, scm_env_module): New.
11996 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
11997 (scm_eval_closure_lookup): Do not allow new definitions when
11998 `interface' flag is set.
11999 (scm_standard_interface_eval_closure): New.
12000 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12001 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12002 scm_c_lookup, scm_c_module_define, scm_c_define,
12003 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12004 scm_modules_prehistory): New.
12005 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12006 instead of scm_intern0.
12007
12008 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12009 symbol.
12010
12011 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12012 hashtable operations to maintain the keywords, not obarray ones.
12013
12014 * init.c (scm_load_startup_files): Do not call
12015 scm_post_boot_init_modules. This is done by
12016 scm_set_current_module now.
12017 (scm_init_guile_1): Call scm_modules_prehistory. Call
12018 scm_init_variable early on.
12019
12020 * goops.c (s_scm_sys_goops_loaded): Get
12021 var_compute_applicable_methods from scm_sym2var, not from a direct
12022 invocation of scm_goops_lookup_closure.
12023
12024 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12025
12026 * gc.c: Added simple debugging hack to mark phase of GC: When
12027 activated, do not tail-call scm_gc_mark. This gives nice
12028 backtraces.
12029 (scm_unhash_name): Removed.
12030
12031 * feature.c (features): Renamed to features_var. Now points to a
12032 variable instead of a vcell. Updated all uses.
12033
12034 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12035 `scm_current_module_lookup_closure' which will do the right thing
12036 when the module system hasn't been booted yet.
12037 (SCM_GLOC_SYM): Removed.
12038 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12039 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
12040
12041 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12042 instead of with vcells. Do not overwrite `var' with the result of
12043 the lookup, use the new `real_var' instead. Remove `var2' in
12044 exchange (which was only used with threads).
12045 (sym_three_question_marks): New.
12046 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12047 `SCM_GLOC_SYM'.
12048 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12049 (scm_m_atfop): Expect the function definition to be a variable
12050 instead of a vcell.
12051 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12052 symbol instead.
12053 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12054 (scm_eval_args): Use more explicit code in the gloc branch of the
12055 atrocious struct ambiguity test. The optimizer will sort this
12056 out.
12057 (scm_deval_args): Likewise.
12058 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12059 remember the symbol instead. Added some comments where
12060 scm_tc3_cons_gloc really exclusively refers to structs.
12061 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12062 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12063 of scm_sysintern in general.
12064
12065 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12066 explicit magic.
12067
12068 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12069 pairs. Put the variable directly in the gloc.
12070 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12071 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12072
12073 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12074
12075 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12076 scm_the_last_stack_fluid_var. It now points to a variable instead
12077 of a vcell. Updated all uses.
12078 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12079 instead of a vcell. Updated all uses.
12080
12081 * _scm.h: Include "variables.h" and "modules.h" since almost
12082 everybody needs them now.
12083
12084 * root.h (scm_symhash, scm_symhash_vars): Removed.
12085 * gc.c (scm_init_storage): Do not initialize them.
12086
12087 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12088
12089 * eval.c (scm_init_eval): Initialize scm_undefineds and
12090 scm_listofnull.
12091
12092 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12093 like the SCM_NEWCELL macro counterparts.
12094
12095 (scm_init_storage, scm_init_gc): Moved initialization of
12096 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12097
12098 (scm_init_storage): Moved initialization of scm_undefineds and
12099 scm_listofnull to eval.c, initializion of scm_nullstr to
12100 strings.c, initializion of scm_nullvect to vectors.c.
12101
12102 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12103 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12104
12105 * init.c (scm_init_guile_1): Reordered some initializations and
12106 added dependcy information comments.
12107
12108 * load.c (scm_init_load): Use scm_nullstr.
12109
12110 * strings.c (scm_init_strings): Initialize scm_nullstr.
12111
12112 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12113
12114 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12115
12116 * values.c (print_values): Print as a unreadable object, not as
12117 multiple lines. Thanks to Matthias Köppe!
12118
12119 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12120
12121 * deprecation.c: Fixed copyright date.
12122
12123 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12124 DEPRECATION_H to SCM_DEPRECATION_H.
12125
12126 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12127
12128 * guile-doc-snarf.in: Update copyright.
12129 Fix relative path bug. Thanks to Sergey Poznyakoff.
12130
12131 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12132
12133 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12134 accept open ports. Thanks to Quetzalcoatl Bradley!
12135
12136 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12137
12138 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12139 has 779 primitives on startup.
12140
12141 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12142
12143 * eval.c (scm_i_eval): Copy expression before passing it to
12144 SCM_XEVAL. The copy operation was removed unintendedly during my
12145 change on 2001-03-25.
12146
12147 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12148
12149 from Matthias Köppe (thanks!):
12150
12151 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12152 portable.
12153
12154 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12155 docstring.
12156
12157 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12158
12159 * gc.c (scm_init_gc): Added FIXME comment.
12160
12161 * hooks.c: Since hooks don't have a name any more, it is not
12162 necessary to include objprop.h.
12163
12164 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12165
12166 (symbol_name, scm_make_hook_with_name): Removed.
12167
12168 (scm_create_hook): Don't set the hook's name property.
12169
12170 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12171
12172 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12173
12174 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12175
12176 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12177 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12178 FLOBUFLEN and define it unconditionally.
12179
12180 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12181
12182 * gh_data.c (gh_lookup): Call gh_module_lookup with
12183 `scm_current_module ()', not `#f'.
12184 (gh_module_lookup): Expect a module instead of an obarray as first
12185 argument and do lookup in that module.
12186
12187 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12188 arrays. The length of array is already determined differently and
12189 scm_uniform_vector_length does not work on arrays.
12190
12191 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12192
12193 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12194 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12195
12196 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12197 they are not used. Changed `wrong type' error into `wrong num
12198 args' error. Changed all callers.
12199
12200 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12201 arguments are supplied.
12202
12203 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12204
12205 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12206 describe `regexp/notbol' and `regexp/noteol' execution flags.
12207
12208 * strop.c (scm_substring_move_x): Doc fix; nfc.
12209
12210 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12211
12212 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12213 (scm_set_object_procedure_x): Use it to check argument. Fix
12214 docstring.
12215
12216 * evalext.c (scm_definedp): Fix docstring.
12217
12218 2001-05-05 Gary Houston <ghouston@arglist.com>
12219
12220 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12221 support.
12222
12223 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12224
12225 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12226 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12227 Change R4RS references to R5RS.
12228
12229 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12230 docstring source are correctly reproduced in the output (ii)
12231 we don't anymore get occasional trailing quotes. Also reorganized
12232 and commented the code a little.
12233
12234 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12235 fixes.
12236
12237 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12238
12239 * strop.c (scm_string_split): New procedure.
12240
12241 * strop.h (scm_string_split): Added prototype.
12242
12243 2001-05-04 Gary Houston <ghouston@arglist.com>
12244
12245 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12246 Dale P. Smith.
12247
12248 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12249
12250 * rw.c: Include "modules.h" and "strports.h".
12251
12252 * net_db.h (scm_gethost): Added prototype.
12253
12254 * deprecation.h, deprecation.c: New.
12255 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12256 (DOT_X_FILES): Added "deprecation.x".
12257 (modinclude_HEADERS): Added "deprecation.h".
12258
12259 * init.c: Include "deprecation.h".
12260 (scm_init_guile_1): Call scm_init_deprecation.
12261
12262 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12263
12264 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12265 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12266 New.
12267
12268 2001-04-29 Gary Houston <ghouston@arglist.com>
12269
12270 * rw.c: new file, implementing C part of module (ice-9 rw).
12271 (scm_read_string_x_partial): moved from ioext.c
12272 (scm_init_rw): new proc.
12273 * rw.h: new file.
12274 init.c: include rw.h and call scm_init_rw.
12275 Makefile.am: include rw.c and rw.h.
12276
12277 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
12278
12279 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12280 know what's supposed to happen to it.
12281
12282 * list.h (scm_list_star): deprecation expired - removed.
12283
12284 * numbers.h (scm_dblproc): deprecation expired - removed.
12285 (SCM_UNEGFIXABLE): deprecation expired - removed.
12286 (SCM_FLOBUFLEN): deprecation expired - removed.
12287 (SCM_INEXP): deprecation expired - removed.
12288 (SCM_CPLXP): deprecation expired - removed.
12289 (SCM_REAL): deprecation expired - removed.
12290 (SCM_IMAG): deprecation expired - removed.
12291 (SCM_REALPART): deprecation expired - removed.
12292 (scm_makdbl): deprecation expired - removed.
12293 (SCM_SINGP): deprecation expired - removed.
12294 (SCM_NUM2DBL): deprecation expired - removed.
12295 (SCM_NO_BIGDIG): deprecation expired - removed.
12296
12297 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12298 (scm_tc_dblr): deprecation expired - removed.
12299 (scm_tc_dblc): deprecation expired - removed.
12300 (scm_tc16_flo): deprecation expired - removed.
12301 (scm_tc_flo): deprecation expired - removed.
12302
12303 * tag.h (scm_tag): deprecation expired - removed.
12304
12305 * tag.c: (scm_tag): deprecation expired - removed.
12306
12307 * ioext.c: (scm_fseek): deprecation expired - removed.
12308
12309 * ioext.h (scm_fseek): deprecation expired - removed.
12310
12311 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12312
12313 * gh.h (gh_int2scmb): deprecation expired - removed.
12314
12315 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12316
12317 * stacks.c (scm_make_stack): Fix typo in docstring.
12318
12319 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
12320
12321 * error.c (scm_sysmissing): deprecation expired - removed.
12322
12323 * error.h (scm_sysmissing): deprecation expired - removed.
12324
12325 * gc.c
12326 (scm_init_gc): gc-thunk deprecation expired - removed.
12327 (scm_gc_vcell): deprecation expired - removed.
12328 (gc_async_thunk): scm_gc_vcell related code removed.
12329
12330 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12331
12332 * strings.h
12333 (SCM_NSTRINGP): deprecation expired - removed.
12334 (SCM_NRWSTRINGP): deprecation expired - removed.
12335
12336 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12337
12338 * chars.h
12339 (SCM_ICHRP): deprecation expired - removed.
12340 (SCM_ICHR): deprecation expired - removed.
12341 (SCM_MAKICHR): deprecation expired - removed.
12342
12343 * ports.h
12344 (SCM_INPORTP): deprecation expired - removed.
12345 (SCM_OUTPORTP): deprecation expired - removed.
12346
12347 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12348
12349 * modules.c (scm_module_type): New.
12350 (scm_post_boot_init_modules): Initialize from Scheme value.
12351 (the_module, scm_current_module, scm_init_modules): the_module is
12352 now a C only fluid.
12353 (scm_current_module): Export to Scheme.
12354 (scm_set_current_module): Do not call out to Scheme, do all the
12355 work in C. Export procedure to Scheme. Only accept modules, `#f'
12356 is no longer valid as the current module. Only set
12357 scm_top_level_lookup_closure_var and scm_system_transformer when
12358 they are not deprecated.
12359 (scm_module_transformer, scm_current_module_transformer): New.
12360
12361 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12362 scm_current_module_transformer, scm_module_transformer): New.
12363
12364 * gh_data.c: Removed FIXME comment about gh_lookup returning
12365 SCM_UNDEFINED. That's the right thing to do.
12366
12367 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12368 into the conditionally compiled sections.
12369 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12370 scm_current_module_transformer instead of scm_system_transformer.
12371 * init.c (start_stack): Move initialization of
12372 scm_system_transformer to the deprecated section.
12373
12374 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12375
12376 * throw.c (scm_throw): Correct docstring.
12377
12378 2001-04-22 Gary Houston <ghouston@arglist.com>
12379
12380 * socket.c: attempted to improve the docstrings slightly.
12381
12382 * net_db.c: remove bogus "close" declaration.
12383 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12384 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12385 moved to socket.c.
12386 * net_db.h: declarations moved too.
12387
12388 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12389 long.
12390 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12391 (VALIDATE_INET6): new macro.
12392 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12393 inet-pton and inet-ntop.
12394 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12395 (scm_addr_vector): use ipv6_net_to_num.
12396
12397 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12398
12399 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12400 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12401
12402 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12403 when compiled in debug mode.
12404
12405 (scm_gc_sweep): Only call smob's free function if it is defined.
12406
12407 * print.c (scm_iprin1): No need to check for validity of smob
12408 type or existence of print function.
12409
12410 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12411 Resizing will not work well with preemptive threading.
12412
12413 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12414
12415 (scm_make_smob_type): Extracted initialization of smob
12416 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12417 of the critical section.
12418
12419 (scm_smob_prehistory): Initialize all smob descriptors. By
12420 default, don't assign a smob free function: Most smob types don't
12421 need one.
12422
12423 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12424
12425 2001-04-21 Gary Houston <ghouston@arglist.com>
12426
12427 * socket.c (FLIP_NET_HOST_128): new macro.
12428 (scm_fill_sockaddr): use new macro.
12429 (scm_addr_vector): completed IPv6 address support. added const
12430 to the address parameter.
12431
12432 2001-04-20 Gary Houston <ghouston@arglist.com>
12433
12434 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12435 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12436 is defined.
12437 (scm_addr_vector): use a switch instead of multiple if statements.
12438 Add support for IPv6 (incomplete) .
12439 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
12440
12441 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12442
12443 * struct.c (scm_free_structs): Only pairs may be accessed with
12444 SCM_C[AD]R.
12445
12446 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12447
12448 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12449
12450 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12451 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12452 parentheses in order to get the correct associativity.
12453
12454 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12455
12456 * unif.c (scm_array_to_list): Added missing handling of arrays of
12457 bytes. Thanks to Masao Uebayashi for the bug report.
12458
12459 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12460
12461 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12462 consistently.
12463
12464 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12465
12466 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12467
12468 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12469 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
12470 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
12471 SCM_CLOSURE_FORMALS.
12472
12473 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12474 (scm_i_procedure_arity): Prefer stronger predicates like
12475 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12476
12477 * macros.c (macro_print): Extracted macro printing code from
12478 print.c and simplified it.
12479
12480 (scm_macro_type): Use SCM_MACRO_TYPE;
12481
12482 (scm_init_macros): Use macro_print for printing macros.
12483
12484 * print.c (scm_print_opts): Improved option documentation.
12485
12486 (scm_iprin1): Extracted printing of macros to macros.c.
12487 Simplified printing of ordinary closures.
12488
12489 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12490 Martin Grabmueller for the bug report.
12491
12492 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12493
12494 This patch eliminates some further applications of SCM_C[AD]R to
12495 non pair cells.
12496
12497 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12498 never been applied to real pairs.
12499
12500 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12501
12502 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12503
12504 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12505 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12506 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12507
12508 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12509 Added.
12510
12511 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12512 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12513
12514 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12515 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12516 SCM_SET{AND,OR}_CAR.
12517
12518 2001-04-17 Gary Houston <ghouston@arglist.com>
12519
12520 * some initial support for IPv6:
12521
12522 * socket.c (scm_fill_sockaddr): improve the argument validation.
12523 don't allocate memory until all args are checked. instead of
12524 unconditional memset of soka, try setting sin_len to 0 if
12525 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12526 (scm_socket, scm_connect): extend docstrings for IPv6.
12527 (scm_init_socket): intern AF_INET6 and PF_INET6.
12528
12529 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
12530
12531 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12532 matches SCM_DEFER_INTS at the beginning of the function.
12533
12534 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12535
12536 * gc.c (scm_igc): Unconditionally call
12537 SCM_CRITICAL_SECTION_START/END.
12538
12539 * fluids.c (next_fluid_num): Unconditionally call
12540 SCM_CRITICAL_SECTION_START/END.
12541 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12542
12543 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12544 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12545 Removed.
12546
12547 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12548 Defined as nothing for the case of !defined(USE_THREADS).
12549 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12550 Removed.
12551 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12552 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12553 LINE.
12554 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12555 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12556 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12557 SCM_CRITICAL_SECTION_START/END.
12558 (SCM_REALLOW_INTS: Bug fix. Don't call
12559 SCM_THREAD_SWITCHING_CODE.
12560 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12561 SCM_THREAD_SWITCHING_CODE directly.
12562 (SCM_ENTER_A_SECTION): Unconditionally use
12563 SCM_CRITICAL_SECTION_START/END. (was:
12564 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12565
12566 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12567
12568 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12569 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12570 allowed to explicitly set this macro via the CFLAGS variable
12571 during make.
12572
12573 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12574 (SCM_THREAD_CRITICAL_SECTION_START,
12575 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12576 SCM_THREAD_CRITICAL_SECTION_START/END to
12577 SCM_CRITICAL_SECTION_START/END.
12578
12579 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12580
12581 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12582 instead of bzero.
12583
12584 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
12585 (MISSING_BZERO_DECL): Remove the declaration.
12586
12587 Thanks to NIIBE Yutaka.
12588
12589 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12590
12591 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12592 goops module should be registered in order to work for an
12593 application which uses libguile statically linked.)
12594
12595 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12596
12597 * numbers.[ch] (scm_num2long, scm_num2long_long,
12598 scm_num2ulong_long, scm_num2ulong): Argument position is an
12599 unsigned integer.
12600
12601 * environments.c (eval_environment_folder,
12602 import_environment_folder), gh_data.c (gh_scm2longs,
12603 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12604 for integers and pointers, respectively.
12605
12606 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12607 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12608 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12609 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12610
12611 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12612 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12613 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12614 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12615 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12616 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12617
12618 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12619
12620 * strings.c (scm_read_only_string_p): Update docstring to reflect
12621 current (non-)usage of "read only" strings.
12622 (scm_make_shared_substring): Clarify docstring by changing
12623 "semantics" to "arguments".
12624
12625 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12626
12627 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12628 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12629 improvements.
12630
12631 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12632
12633 The following changes make the documentation more consistent.
12634
12635 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12636 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12637 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12638 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12639 ... @end lisp.
12640
12641 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12642 (scm_array_dimensions, scm_make_shared_array),
12643 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12644 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12645 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12646 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12647 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12648 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12649 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12650 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12651 @example ... @end example to @lisp ... @end lisp.
12652
12653 * weaks.c (scm_weak_vector): Corrected docstring.
12654
12655 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12656 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12657 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12658 (scm_hashx_set_x, scm_hashx_get_handle),
12659 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12660 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12661 vectors.c (scm_vector_fill_x), strings.c
12662 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12663 objprop.c (scm_set_object_properties_x):
12664 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12665 strports.c (scm_call_with_input_string), ports.c
12666 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12667 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12668 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12669 (scm_make_weak_vector,scm_weak_vector_p),
12670 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12671 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12672 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12673 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12674 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12675 Made parameter names match documentation by renaming parameters
12676 and/or fixing docstrings.
12677
12678 * numbers.c (scm_ash): Corrected Texinfo markup.
12679
12680 * strop.c (scm_string_index, scm_string_rindex),
12681 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12682
12683 * vports.c (scm_make_soft_port), unif.c
12684 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12685 (scm_dimensions_to_uniform_array, scm_transpose_array),
12686 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12687 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12688 (scm_array_to_list, scm_list_to_uniform_array),
12689 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12690 (scm_open_input_string, scm_open_output_string),
12691 (scm_get_output_string), strop.c (scm_string_copy),
12692 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12693 (scm_get_internal_real_time, scm_times),
12694 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12695 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12696 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12697 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12698 simpos.c (scm_system), random.c (scm_random_uniform),
12699 (scm_random_normal, scm_random_exp), ramap.c
12700 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12701 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12702 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12703 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12704 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12705 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12706 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12707 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12708 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12709 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12710 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12711 (scm_integer_expt, scm_bit_extract, scm_logcount),
12712 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12713 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12714 (scm_interaction_environment), macros.c (scm_makacro),
12715 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12716 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12717 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12718 (scm_fluid_ref), filesys.c (scm_open_fdes),
12719 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12720 Docstring correction: `Returns' -> `Return'
12721
12722 * gc.c (scm_set_debug_cell_accesses_x):
12723 (s_scm_gc_set_debug_check_freelist_x):
12724 * fluids.c (scm_fluid_p): Added texinfo markup.
12725
12726 * error.c (scm_strerror): Made docstring more precise.
12727
12728 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12729 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12730 (scm_symbol_p, scm_symbol_to_string), strorder.c
12731 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12732 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12733 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12734 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12735 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12736
12737 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12738
12739 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12740 mode, as suggested by Michael Livshin.
12741
12742 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12743
12744 * backtrace.c (display_backtrace_body): since the `print_state'
12745 variable is not used (instead its data field is used directly as
12746 `pstate'), protect it from the hungry compiler optimizations.
12747 thanks to Bill Schottstaedt for the report.
12748
12749 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12750
12751 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12752 It is only defined and used if guile is compiled with
12753 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12754 let cells with a free_cell type tag be visible outside of the
12755 garbage collector when in debug mode.
12756
12757 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12758
12759 (scm_assert_cell_valid): Use a local static variable to avoid
12760 recursion.
12761
12762 (MARK): Only check for rogue cell pointers in debug mode. Use
12763 scm_cellp for this purpose and place all checks for rogue pointers
12764 into that function. Further, since due to conservative scanning
12765 we may encounter free cells during marking, don't use the standard
12766 cell type accessor macro to determine the cell type.
12767
12768 (scm_cellp): Check if the cell pointer actually points into a
12769 card header.
12770
12771 (scm_init_gc): Initalize scm_tc16_allocated.
12772
12773 * gc.h (GCH): Renamed to SCM_GC_H.
12774
12775 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12776 might be unnecessary, but I feel better this way :-)
12777
12778 (SCM_GC_CELL_TYPE): New macro.
12779
12780 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12781 in guile, and it is unlikely that they will be applied to real
12782 pairs anyway.
12783
12784 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12785
12786 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12787 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12788
12789 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12790 make sure that in debug mode no free cell will ever be visible
12791 outside of the garbage collector.
12792
12793 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12794
12795 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12796 values.
12797
12798 * async.c (scm_system_async), variable.c (scm_make_variable,
12799 scm_make_undefined_variable): Use scm_cons to create a pair.
12800
12801 * debug.c (scm_reverse_lookup): Perform proper type checking.
12802 Remove suspicious use of SCM_SLOPPY_CONSP.
12803
12804 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12805 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12806 the corresponding optimization.
12807
12808 * eval.c (iqq): Use proper type check.
12809
12810 (scm_m_expand_body): Remove redundant type checks.
12811
12812 (promise_print): Don't access promise cells as pairs.
12813
12814 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12815 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12816 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12817 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12818 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12819
12820 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12821 (scm_iprin1): Use new macro predicate and accessors.
12822
12823 * eval.h (scm_tc16_macro): Removed declaration. It is declared
12824 in macros.h.
12825
12826 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
12827 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
12828 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
12829 SCM_VARIABLE_H. Even the macros that are used to inhibit
12830 including a header file twice should be in the SCM_ namespace.
12831
12832 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
12833 properties.c (scm_primitive_property_ref,
12834 scm_primitive_property_del_x): Prefer stronger predicates like
12835 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12836
12837 * gc.c (MARK): Use proper macros to access procedure-with-setter
12838 cell elements and closure cell elements.
12839
12840 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
12841 access free cells as pairs.
12842
12843 (scm_unprotect_object): scm_hashq_get_handle returns #f if
12844 no hashtab entry is found.
12845
12846 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
12847 SCM_CLR_PORT_OPEN_FLAG.
12848
12849 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
12850 use SCM_SET_C[AD]R for uninitialized cells.
12851
12852 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
12853 If the hashtable has no slots, return #f instead of '(). This
12854 unifies the return value with most assoc-functions.
12855
12856 (scm_hash_fn_ref): Use proper type check.
12857
12858 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
12859 Removed references to non-existing functions from documentation.
12860
12861 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
12862 access keyword cell elements.
12863
12864 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
12865 macros.
12866
12867 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
12868
12869 * print.c (scm_iprlist): Added comment. Improved loop
12870 conditions.
12871
12872 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
12873 pairs.
12874
12875 * smob.c (scm_markcdr): Don't access smob cells as pairs.
12876
12877 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
12878
12879 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
12880 cells as pairs.
12881
12882 * variable.c (variable_print, variable_equalp, scm_variable_ref,
12883 scm_variable_set_x): Use proper macros to access variable cell
12884 elements.
12885
12886 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
12887
12888 * variable.h (SCM_VARVCELL): Don't access variable cells as
12889 pairs.
12890
12891 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
12892 added FIXME comment, removed register specifier.
12893
12894 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
12895
12896 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
12897 * init.c (scm_init_guile_1): Don't init goopscore module.
12898
12899 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12900
12901 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
12902
12903 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12904
12905 * strop.c (scm_string_to_list): Fixed docstring markup.
12906 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
12907 (scm_string_downcase, scm_string_capitalize_x),
12908 (scm_string_capitalize): Rewrote and corrected docstrings.
12909 (scm_string_ci_to_symbol): Made docstring more explicit.
12910
12911 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12912
12913 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
12914 eval.c can use it.
12915 (scm_call_with_values): Removed.
12916 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
12917 so that it can be exported.
12918 (scm_call_with_values): Removed.
12919
12920 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
12921 * eval.c: Include "libguile/values.h"
12922 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
12923 New.
12924 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
12925 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
12926 New delcarations to support above change.
12927
12928 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
12929 errors with last change.
12930
12931 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
12932
12933 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
12934 scm_i_eval): Moved the application of the system transformer from
12935 scm_i_eval to scm_primitive_eval.
12936
12937 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
12938
12939 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
12940
12941 * strop.c (scm_string_index): Fix docstring line break
12942 regression.
12943
12944 * list.c (scm_cons_star): Fix docstring typo.
12945
12946 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12947
12948 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
12949 (big2str), ports.c (scm_drain_input), read.c (scm_read,
12950 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
12951 scm_make_string, scm_string_append), strports.c (st_resize_port,
12952 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
12953 scm_makstr with calls to scm_allocate_string.
12954
12955 * strings.[ch] (scm_allocate_string): New function.
12956
12957 * strings.[ch] (scm_makstr): Deprecated.
12958
12959 2001-03-18 Gary Houston <ghouston@arglist.com>
12960
12961 * posix.c (scm_tmpnam): check that return value from tmpnam is not
12962 NULL. rewrote the docstring.
12963 (scm_mkstemp): new procedure implementing "mkstemp!".
12964 * posix.h: declare scm_mkstemp.
12965
12966 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
12967 normally it would be found in netdb.h.
12968
12969 2001-03-17 Gary Houston <ghouston@arglist.com>
12970
12971 * sort.c (scm_sort): move sortvec variable to avoid a compiler
12972 warning when HAVE_ARRAYS is not defined. move len too.
12973
12974 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
12975 (EXTRA_DOT_X_FILES): let configure set the value.
12976 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
12977
12978 * gc.c (scm_must_malloc): changed the comment explaining when
12979 scm_must variants of malloc/free etc., should be used, based on
12980 explanation from Dirk Herrmann.
12981 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
12982 string with procedure name. use scm_must_malloc instead of malloc.
12983 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
12984 of malloc/free.
12985 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
12986 scm_ungetc): use scm_must variants of malloc/realloc/free.
12987 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
12988
12989 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12990
12991 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12992 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
12993 scm_wrong_type_arg instead.
12994
12995 (SCM_WNA): Deprecated.
12996
12997 * error.[ch] (scm_wta): Deprecated.
12998
12999 * numbers.c (s_i_log): Minor comment fix.
13000
13001 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13002 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13003 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13004 wrong-num-args or misc errors.
13005
13006 * unif.c (scm_make_shared_array, scm_transpose_array,
13007 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13008 Validate the rest argument (note: this is only done when guile is
13009 built with SCM_DEBUG_REST_ARGUMENT=1)
13010
13011 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13012 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13013
13014 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13015 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13016
13017 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13018
13019 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13020 instead of scm_wrong_num_args.
13021
13022 * coop-threads.c: Don't include libguile/strings.h. (Was only
13023 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13024
13025 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13026 wrong-num-args errors.
13027
13028 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13029
13030 * error.[ch] (scm_error_num_args_subr): New function.
13031
13032 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13033
13034 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13035 (scm_length, scm_append, scm_reverse, scm_list_ref),
13036 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13037 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13038 (scm_delete1_x), gc.c (scm_map_free_list),
13039 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13040 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13041 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13042 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13043 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13044 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13045 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13046
13047 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13048 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13049 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13050 symbols.c (scm_symbol_interned_p), numbers.c
13051 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13052 markup.
13053
13054 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13055
13056 * snarf.h (SCM_CONST_LONG): Deprecated.
13057 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13058
13059 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13060
13061 * numbers.c (scm_num2ulong): Check that a bignum is positive
13062 before looking at the magnitude. Correctly check for overflow
13063 during conversion.
13064 (scm_num2long_long): Likewise.
13065 (scm_num2ulong_long): New.
13066 (ULONG_LONG_MAX): Define if not already defined.
13067 * numbers.h: (scm_num2ulong_long): New prototype.
13068
13069 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13070
13071 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13072
13073 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13074 (SCM_OPOUTSTRPORTP): New predicate macros.
13075 (scm_open_input_string, scm_open_output_string),
13076 (scm_get_output_string): New prototypes.
13077
13078 * strports.c (scm_open_input_string, scm_open_output_string),
13079 (scm_get_output_string): New procedures (SRFI-6 compliant).
13080 Made scm_tc16_strport non-static.
13081
13082 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13083
13084 * macros.h (SCM_ASSYNT): Removed unused object argument from
13085 signature.
13086
13087 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13088 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13089 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13090 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13091 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13092 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13093 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13094 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13095 scm_m_atdispatch): Removed unused object argument from call to
13096 SCM_ASSYNT.
13097
13098 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13099
13100 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13101 const int* to reflect that the input array of integers remains
13102 unchanged. Thanks to Brett Viren for the hint.
13103
13104 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13105
13106 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13107 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13108 in various places.
13109 (gh_scm2newstr, gh_symbol2newstr): Change call to
13110 scm_must_malloc() to malloc(), because user-free()able memory is
13111 allocated.
13112
13113 * gc.c: Added declaration of `scm_debug_check_freelist'.
13114
13115 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13116
13117 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13118
13119 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13120
13121 * strports.c (scm_object_to_string): New procedure.
13122 (scm_strprint_obj): Deprecated.
13123 * strports.h: Reflect the changes.
13124
13125 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13126
13127 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13128
13129 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13130 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13131 SCM_ASSYNT to check for correct argument types. Either use some
13132 SCM_VALIDATE_* macro or an explicit test.
13133
13134 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13135 misc-errors.
13136
13137 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13138 instead of calling scm_wta.
13139
13140 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13141
13142 * load.c (scm_primitive_load, scm_primitive_load_path),
13143 (scm_sys_search_load_path): Corrected docstrings (file ->
13144 filename).
13145
13146 * eval.c (scm_force): Added texinfo markup to docstring.
13147 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13148
13149 * debug-malloc.c: Reinserted #include <stdio.h>.
13150
13151 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13152
13153 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13154
13155 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13156 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13157 Use SCM_LISTn instead of scm_listify.
13158
13159 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13160
13161 * _scm.h: Removed #include <errno.h>.
13162
13163 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13164 errno variable (can be a macro on some systems, for example when
13165 using linux libc with threads).
13166
13167 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13168 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13169 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13170 #include <errno.h> in these 20 out of 100 files.
13171
13172 2001-03-10 Gary Houston <ghouston@arglist.com>
13173
13174 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13175 not already defined.
13176
13177 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13178
13179 * coop.c: Inserted #include <stdio.h>.
13180
13181 * iselect.c: Reinserted #include <stdio.h>.
13182
13183 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13184
13185 * posix.c: Replaced `#define' of __USE_XOPEN right before
13186 including unistd.h with a define of _GNU_SOURCE at the very top of
13187 the file.
13188
13189 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13190
13191 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13192 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13193 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13194 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13195 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13196 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13197 print.c, procprop.c, procs.c, properties.c, ramap.c,
13198 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13199 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13200 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
13201 Remove #include <stdio.h>
13202 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13203
13204 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13205
13206 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13207
13208 * posix.c (scm_gethostname): Set initial name length to 256 for
13209 Solaris.
13210
13211 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13212
13213 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13214 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13215 (scm_sethostname, scm_gethostname): New prototypes.
13216
13217 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13218 <sys/file.h>, if present.
13219 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13220 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13221 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13222 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13223 (scm_sethostname, scm_gethostname): New procedures.
13224
13225 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13226
13227 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13228 not optional (ii) "recommend" spelling correction.
13229
13230 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13231
13232 * ramap.c (racp): Removed optimization which caused array copying
13233 to fail if the two arrays shared storage. Re-inserted the IVDEP
13234 macros removed in the change of 2000-03-09. (Don't really have a
13235 complete grasp of what they are for, but they seem to be necessary
13236 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13237
13238 * hash.c (scm_string_hash): Don't downcase characters.
13239
13240 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13241
13242 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
13243 size from 277 --> 1009.
13244
13245 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13246 function.
13247
13248 * coop-threads.c: Fixed change of 2001-03-06.
13249
13250 * validate.h: Code formatting.
13251
13252 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13253
13254 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13255 (*.doc): Add dependency on guile-snarf.awk.in.
13256
13257 * guile-snarf.awk.in: Neglect spaces at the end of
13258 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13259 middle of docstrings. (To avoid the problem with gcc-2.96.)
13260
13261 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13262
13263 * coop-threads.c (scm_call_with_new_thread), load.c
13264 (scm_primitive_load, scm_sys_search_load_path), random.c
13265 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13266 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13267 (potentially) issue a scm-misc-error or wrong-num-args error
13268 message.
13269
13270 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13271 about the expected type with the wrong-type-arg error message.
13272
13273 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13274 a C level bug that can't be fixed from scheme anyway.
13275
13276 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13277
13278 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13279 Duplicate bindings are OK in a let* since a let* is semantically
13280 equivalent to a nested set of let:s.
13281
13282 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13283
13284 * print.c (scm_print_options): Fixed texinfo in docstring.
13285
13286 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13287 the underlying functions getservent, getprotoent or getnetent
13288 return NULL instead of signalling an error.
13289
13290 2001-03-04 Gary Houston <ghouston@arglist.com>
13291
13292 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13293 taking an unexpectedly large filename for an AF_UNIX socket from
13294 bind/connect/sendto (thanks to Martin Grabmueller).
13295
13296 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13297 former and adjusted the latter.
13298 (scm_socket, scm_socketpair): cosmetic changes.
13299 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13300 size_t as socklen_t substitute. don't restrict args/return values
13301 to INUM: allow full range of int or size_t.
13302 (scm_fill_sockaddr): check arguments before allocating memory, to
13303 avoid leakage. use malloc, not scm_must_malloc.
13304 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13305 substitute. free the sockaddr structure before throwing an error.
13306 (scm_init_add_buffer): procedure removed, together with its static
13307 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13308 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13309 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13310 scm_sendto): use a local buffer instead of scm_addr_buffer.
13311 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13312 not size_t.
13313 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13314 call to detect whether recvfrom could be bothered to set the address.
13315 (scm_init_socket): don't call scm_init_addr_buffer.
13316
13317 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13318
13319 * debug.c (scm_procedure_source, scm_procedure_environment),
13320 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13321 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13322 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13323 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13324 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13325 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13326 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13327 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13328 scm_array_to_list, scm_array_prototype), validate.h
13329 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13330 scm_misc_error or scm_wrong_type_arg instead.
13331
13332 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13333
13334 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13335
13336 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13337 (scm_sys_tag_body): Added.
13338
13339 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13340
13341 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13342 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13343 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13344 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13345 options.c (scm_options), ports.c (scm_remove_from_port_table),
13346 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13347 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13348 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13349 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13350 instead.
13351
13352 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13353
13354 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13355
13356 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13357
13358 * eval.c (scm_s_duplicate_bindings): New error message.
13359 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13360
13361 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13362
13363 * eval.h (SCM_EVALIM2): New macro. Use it when a
13364 immediate, literal constant should be evaluated.
13365 * eval.c (scm_s_duplicate_formals): New error message string.
13366 (scm_c_improper_memq): New function.
13367 (scm_m_lambda): Check for duplicate arguments.
13368 (scm_ceval, scm_deval): When executing a body: only cons a new
13369 toplevel environment frame when it is different from the
13370 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13371 check for empty combinations; use SCM_EVALIM2 for the same reason
13372 in the non-toplevel loop.
13373 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13374 New labels with the meaning of their non-"nontoplevel" partners,
13375 but they are used when it is known that the body is not evaluated at
13376 top-level.
13377 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13378 reporting for empty combinations.
13379
13380 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13381
13382 * Remove dump facilities.
13383 * dump.c, dump.h: Removed.
13384 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13385 * init.c: Remove #include "libguile/dump.h".
13386 (scm_init_guile_1): Remove scm_init_dump.
13387 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13388 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13389 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13390 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13391
13392 * keywords.c: Remove #include "libguile/dump.h".
13393 (keyword_dump, keyword_undump): Removed.
13394 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13395
13396 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13397
13398 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13399 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13400 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13401 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13402 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13403 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13404 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13405 to @code{} as the texinfo manual recommends, converted the
13406 examples to use a @lisp{}-environment.
13407
13408 * strports.c (scm_eval_string): Cleaned up the docstring.
13409
13410 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13411 markup.
13412
13413 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13414 (scm_number_to_string, scm_string_to_number, scm_number_p)
13415 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13416 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13417 (scm_ash): Added texinfo markup and removed obsolete @refill.
13418 (scm_gr_p): Corrected comment.
13419 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13420 docstring) comments.
13421 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13422 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13423 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13424 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13425 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13426 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13427 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13428 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13429
13430 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13431
13432 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13433 (Obviously nobody compiles with SCM_RECKLESS defined...)
13434
13435 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13436
13437 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13438
13439 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13440
13441 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13442
13443 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13444
13445 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13446 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13447 since use of `z' suggests that the arguments may be complex.
13448
13449 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13450 typos.
13451
13452 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13453
13454 * dump.c (scm_binary_write, scm_binary_read), eval.c
13455 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13456 scm_guardian_greedy_p, scm_make_guardian), fports.c
13457 (scm_file_port_p): Minor docstring fixes.
13458
13459 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13460
13461 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
13462
13463 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13464 scm_i_eval.
13465 (make_class_from_template): Do not bother to set the current
13466 module around the call to DEFVAR, scm_eval takes care of that.
13467 (scm_init_goops): Make scm_module_goops and
13468 scm_goops_lookup_closure permanent objects.
13469
13470 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13471 top level, create a fresh top-level environment for each
13472 expression instead of mutating the exisint frame. This is
13473 important when that frame is closed over.
13474
13475 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13476 SCM_DIGSPERLONG instead of DIGSPERLONG.
13477
13478 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13479
13480 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13481 before applying arrow procedure in `cond' and before applying
13482 receiver procedure in call-with-current-continuation.
13483 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13484 macro. The argument is expanded more than one time.
13485
13486 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13487 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13488
13489 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13490
13491 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13492 notice and license.
13493
13494 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13495
13496 * variable.c (scm_make_variable, scm_make_undefined_variable)
13497 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13498 (scm_variable_bound_p), values.c (scm_values)
13499 (scm_call_with_values), unif.c (scm_bit_count)
13500 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13501 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13502 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13503 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13504 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13505 (scm_copy_random_state, scm_random), print.c (scm_newline)
13506 (scm_write_char, scm_simple_format), debug-malloc.c
13507 (scm_malloc_stats), environments.c (scm_environment_p)
13508 (scm_environment_bound_p, scm_environment_ref)
13509 (scm_environment_fold, scm_environment_define)
13510 (scm_environment_undefine, scm_environment_set_x)
13511 (scm_environment_cell, scm_environment_observe)
13512 (scm_environment_observe_weak, scm_environment_unobserve)
13513 (scm_make_eval_environment, scm_eval_environment_p)
13514 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13515 (scm_eval_environment_imported)
13516 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13517 (scm_import_environment_p, scm_import_environment_imports)
13518 (scm_import_environment_set_imports_x, scm_make_export_environment)
13519 (scm_export_environment_p, scm_export_environment_private)
13520 (scm_export_environment_set_private_x)
13521 (scm_export_environment_signature)
13522 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13523 Added texinfo markup.
13524
13525 * ports.c (scm_drain_input): Lowercased argument to @var.
13526 (scm_current_input_port, scm_current_output_port): Filled in
13527 missing explanation.
13528 (scm_current_load_port, scm_set_current_output_port)
13529 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13530 Added texinfo markup.
13531
13532 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13533 (scm_release_arbiter): Added texinfo markup to docstrings.
13534 Changed `Returns' to `Return'.
13535 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13536
13537 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13538
13539 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13540 by doubling them to `@@'.
13541
13542 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13543
13544 * numbers.c (scm_lognot), random.c (scm_random,
13545 scm_random_normal, scm_random_solid_sphere_x,
13546 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13547 scm_random_exp), dynwind.c
13548 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
13549
13550 * goops.c (scm_sys_initialize_object, scm_instance_p,
13551 scm_class_name, scm_class_precedence_list, scm_class_slots,
13552 scm_class_environment, scm_generic_function_name,
13553 scm_generic_function_methods, scm_method_generic_function,
13554 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13555 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13556 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13557 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13558 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13559 scm_class_direct_supers, scm_class_direct_slots,
13560 scm_class_direct_subclasses, scm_class_direct_methods,
13561 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13562 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13563 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13564 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13565 scm_memoized_environment, scm_procedure_name,
13566 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13567 objects.c
13568 (scm_class_of, scm_entity_p, scm_operator_p,
13569 scm_set_object_procedure_x, scm_object_procedure,
13570 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13571 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13572 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13573 scm_hook_to_list), lang.c
13574 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13575 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13576 (scm_print_options, scm_port_with_print_state,
13577 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13578 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13579 scm_make_procedure_with_setter, scm_procedure), throw.c
13580 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13581 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13582 scm_stack_ref, scm_stack_length, scm_frame_p,
13583 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13584 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13585 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13586 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13587 (scm_dirname, scm_basename), dynwind.c
13588 (scm_wind_chain), read.c (scm_read_options, scm_read,
13589 scm_read_hash_extend), gc.c
13590 (scm_unhash_name), eval.c (scm_eval_options_interface,
13591 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13592 (scm_display_error, scm_set_print_params_x,
13593 scm_display_application, scm_display_backtrace, scm_backtrace),
13594 async.c (scm_async, scm_system_async, scm_async_mark,
13595 scm_system_async_mark, scm_run_asyncs, scm_noop,
13596 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13597 scm_mask_signals): Added docstrings.
13598
13599 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13600
13601 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13602 address of car/cdr. (Thanks to Dirk Herrmann)
13603 Use scm_sizet to obtain the length of strings.
13604 (Thanks to Matthias Koeppe)
13605
13606 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13607
13608 * symbols.c (scm_mem2symbol): Put a empty statement after the
13609 next_symbol label. This is mandated by ANSI, appearantly.
13610
13611 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13612
13613 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13614 sense to compile for a specific kernel version. Do not include
13615 <asm/signal.h> while defining __KERNEL__. This hack should no
13616 longer be needed and caused problems.
13617
13618 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13619
13620 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13621 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13622 can not deal with immediates.
13623
13624 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13625
13626 * list.c (scm_list_copy): Validate the first argument.
13627
13628 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13629
13630 Fix evaluator so that top-level expressions are correctly
13631 evaluated with respect to the module system.
13632
13633 * modules.h. modules.c (scm_current_module_lookup_closure): New
13634 function.
13635
13636 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13637 prototypes.
13638 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13639 names to better reflect their meaning.
13640
13641 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13642 evaluated at top-level and synronize lookup closure before
13643 executing every subform.
13644 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13645 (scm_eval_x, scm_eval): Reimplement in terms of
13646 scm_primitive_eval_x and scm_primitive_eval, respectively.
13647
13648 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13649
13650 * macros.c (scm_macro_name, scm_macro_transformer): Use
13651 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13652 Thanks!
13653
13654 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13655
13656 * dump.c (scm_store_bytes): Store data size before data.
13657 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13658 * dump.h (scm_restore_bytes): Updated.
13659
13660 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13661
13662 * dump.c: Use double cells for update schedule.
13663
13664 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13665
13666 * ports.c (scm_unread_char): Take an optional argument.
13667
13668 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13669
13670 * modules.h (scm_selected_module, scm_current_module): Renamed
13671 scm_selected_module to scm_current_module to synchronize Scheme
13672 and C names.
13673 (scm_select_module, scm_set_current_module): Likewise. Changed
13674 all uses.
13675
13676 * ports.c (scm_port_for_each): Make a snapshot of the port table
13677 before iterating over it. The table might change while the user
13678 code is running. With the snapshot, the user can depend on the
13679 fact that each port that existed at the start of the iteration is
13680 encountered exactly once. (ice-9 popen) depends on this.
13681
13682 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13683
13684 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13685
13686 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13687 range checking for the size parameter. Thanks to Martin
13688 Grabmueller for the hint.
13689
13690 (scm_makstr): Reordered string initialization to make interrupt
13691 deferring unnecessary.
13692
13693 * vectors.c (scm_make_vector): Fixed range checking.
13694
13695 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13696
13697 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13698
13699 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13700 checking of the size parameter for type correctness and valid
13701 range. Thanks to Rob Browning for reporting the problem. Instead
13702 of deferring interrupts, scm_remember_upto_here_1 is used.
13703
13704 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13705
13706 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13707 (scm_dump_cell_update): Removed.
13708 (scm_dump_update): Renamed from scm_dump_object_update.
13709 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13710 a pointer instead of returning a value.
13711 * keywords.c (keyword_undump): Updated.
13712
13713 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13714
13715 * dump.c, dump.h: Modified a lot.
13716 (SCM_DUMP_COOKIE): Version 0.1
13717 (scm_dump_mark): Removed.
13718 (scm_restore_cell_object, scm_store_cell_object): New functions.
13719
13720 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13721 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13722 New slots: dump, undump.
13723 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13724 Updated.
13725
13726 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13727 (keyword_undump): Renamed from keyword_alloc.
13728 (scm_init_keywords): Set keyword_dump and keyword_undump.
13729
13730 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13731
13732 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13733 the deprecated SCM_DOUBLE_CELLP.
13734
13735 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13736
13737 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13738
13739 * dump.c, dump.h: New files.
13740 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13741 * init.c: #include "libguile/dump.h".
13742 (scm_init_guile_1): Call scm_init_dump.
13743 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13744 dump_dealloc, dump_store, undump_alloc, undump_restore,
13745 undump_init.
13746 * smob.c (scm_make_smob_type): Init the new slots.
13747 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13748 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13749
13750 * keywords.c: #include "libguile/dump.h".
13751 (keyword_dealloc, keyword_alloc): New functions.
13752 (scm_init_keywords): Set smob_dump and smob_undump.
13753
13754 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13755
13756 * vectors.c (scm_c_make_vector): New function.
13757 * vectors.h (scm_c_make_vector): Declared.
13758 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13759 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13760 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13761 (scm_make_method_cache, scm_i_vector2list,
13762 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13763 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13764 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13765 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13766 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13767 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13768 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13769 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13770
13771 * hashtab.c (scm_c_make_hash_table): New function.
13772 * hashtab.h (scm_c_make_hash_table): Declared.
13773 * environments.c (scm_make_leaf_environment,
13774 scm_make_eval_environment), gc.c (scm_init_storage),
13775 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13776 Use scm_c_make_hash_table.
13777
13778 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13779
13780 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13781
13782 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13783
13784 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13785 end of docstring.
13786
13787 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13788 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13789 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13790 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13791 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13792 scm_source_property, scm_set_source_property_x), sort.c
13793 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13794 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13795 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13796 docstrings.
13797
13798 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13799
13800 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13801 really get that arg.
13802
13803 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13804
13805 * goops.c (s_scm_get_keyword): Bug fix.
13806
13807 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13808
13809 The following patch was sent by Martin Grabmueller. It makes sure
13810 that in case of parameter errors the correct function name is
13811 shown, and that parameter types are only checked once.
13812
13813 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13814 string_capitalize_x): New functions. Each one performs the core
13815 functionality of the corresponding scm_* function.
13816
13817 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13818 scm_string_downcase_x, scm_string_downcase,
13819 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13820 parameter checking wrappers of the above functions.
13821
13822 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13823
13824 * continuations.c, dynl.c, keywords.c, load.c: Include
13825 strings.h. Thanks to Bill Schottstaedt for the bug report.
13826
13827 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13828
13829 * backtrace.c (display_header): Make sure that line and column
13830 information is shown independent of whether the port the code was
13831 read from had an associated filename. Thanks to Martin
13832 Grabmueller for providing this patch.
13833
13834 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13835
13836 * fports.[ch] (scm_file_port_p): New primitive.
13837
13838 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13839
13840 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
13841 These are now defined in fports.c, strports.c and vports.c.
13842
13843 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
13844 vports.c (scm_tc16_sfport): Made variables (were macros defined in
13845 tags.h).
13846
13847 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
13848 (scm_make_sfptob): Made static. These return a type code now.
13849
13850 fports.c (scm_init_fports), strports.c (scm_init_strports),
13851 vports.c (scm_init_vports): Create the corresponding port types.
13852
13853 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
13854 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
13855
13856 * init.c (scm_init_guile_1): Make sure strports are initialized
13857 before gdbint.
13858
13859 * ports.[ch] (scm_make_port_type): Changed the return type to
13860 scm_bits_t.
13861
13862 * ports.c (scm_ports_prehistory): Don't create any port types
13863 here.
13864
13865 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
13866 against scm_tc16_fport directly.
13867
13868 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13869
13870 * srcprop.c (scm_set_source_property_x): Fix to handle
13871 (set-source-property! <obj> 'copy <datum>) correctly.
13872
13873 2001-01-24 Gary Houston <ghouston@arglist.com>
13874
13875 * filesys.c (scm_link): docstring fix.
13876 * fports.h (scm_setfileno): obsolete declaration removed.
13877 * posix.c: bogus popen declaration removed.
13878
13879 * rdelim.c: new file, split from ioext.c.
13880 * rdelim.h: new file, split from ioext.h
13881 * Makefile.am: add rdelim.c and related files.
13882 * init.c: call scm_init_rdelim. include rdelim.h.
13883
13884 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13885
13886 This patch was sent by Martin Grabmueller and makes sure that
13887 parameter errors are reported correctly by the lexicographic
13888 ordering predicates.
13889
13890 * strorder.c (string_less_p, string_ci_less_p): New functions.
13891
13892 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
13893 functionality into string_less_p, string_ci_less_p respectively.
13894 The remaining code is just a wrapper to do the parameter
13895 checking.
13896
13897 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
13898 parameters and call string_less_p instead of scm_string_less_p.
13899
13900 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
13901 Check the parameters and call string_less_ci_p instead of
13902 scm_string_ci_less_p.
13903
13904 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13905
13906 This patch modifies scm_display_error to perform parameter
13907 checking. Thanks to Neil Jerram for the bug report.
13908
13909 * backtrace.[ch] (scm_i_display_error): New function.
13910
13911 * backtrace.c (scm_display_error): Added parameter check and
13912 extracted the core functionality into function
13913 scm_i_display_error.
13914
13915 * throw.c (handler_message): Call scm_i_display_error to display
13916 the error message.
13917
13918 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13919
13920 * eval.c (SCM_APPLY): Added # args check for application of
13921 procedures with arity 3. (Thanks to Anders Holst.)
13922
13923 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13924
13925 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
13926
13927 (SCM_OPDIRP): Deprecated.
13928
13929 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
13930 SCM_OPN.
13931
13932 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
13933 Instead, give an explicit error message in case the directory is
13934 closed.
13935
13936 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
13937 instead of SCM_OPENP and SCM_CLOSEDP.
13938
13939 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
13940
13941 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13942
13943 * eval.c (inner_eval, scm_eval): Move all real functionality into
13944 inner_eval. Avoid to copy the expression twice by inlining some
13945 code from scm_i_eval.
13946
13947 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
13948
13949 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
13950 now has to be the last clause, as required by R5RS. Thanks to
13951 Martin Grabmueller for the patch.
13952
13953 2001-01-18 Gary Houston <ghouston@arglist.com>
13954
13955 * ioext.c: further simplify scm_read_string_x_partial by defining
13956 a macro SCM_EBLOCK.
13957
13958 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
13959
13960 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
13961
13962 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
13963
13964 * __scm.h: Added comment about architecture and compiler
13965 properties that are required by guile.
13966
13967 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
13968 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
13969
13970 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
13971
13972 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
13973
13974 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
13975 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
13976
13977 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13978
13979 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
13980 to the names in limits.h.
13981
13982 * numbers.c (abs_most_negative_fixnum): Added.
13983
13984 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
13985 fixnum-min) special case.
13986
13987 (scm_big_and): Fix for negative first parameter.
13988
13989 (scm_bit_extract): Fix for fixnum paramters.
13990 Thanks to Rob Browning for the bug report.
13991
13992 (scm_init_numbers): Initialize abs_most_negative_fixnum.
13993
13994 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
13995
13996 * symbols.c (scm_symbol_bound_p): Fixed comment.
13997 Thanks to Chris Cramer.
13998
13999 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14000
14001 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14002 Thanks to Bill Schottstaedt.
14003
14004 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14005
14006 from Matthias Köppe:
14007
14008 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14009 casts its result, so doesn't yield an lvalue per ANSI C.
14010
14011 * goops.c (s_scm_sys_set_object_setter_x): use
14012 SCM_SET_ENTITY_SETTER.
14013 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14014
14015 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14016 its result, so doesn't yield an lvalue per ANSI C.
14017 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14018 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14019 SCM_GC_SET_CARD_FLAGS.
14020 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14021
14022 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14023
14024 2001-01-08 Gary Houston <ghouston@arglist.com>
14025
14026 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14027 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14028 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14029 changes.
14030 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14031 for fdes. if current input port is used, check that it's a file
14032 port.
14033
14034 2001-01-06 Gary Houston <ghouston@arglist.com>
14035
14036 * ioext.c (scm_read_string_x_partial): new procedure, implements
14037 read-string!/partial.
14038 * ports.c (scm_take_from_input_buffers): new procedure used by
14039 scm_read_string_x_partial.
14040 (scm_drain_input): use scm_take_from_input_buffers.
14041
14042 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14043
14044 * validate.h (SCM_VALIDATE_NUMBER): New.
14045
14046 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14047
14048 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14049 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14050 SET_DESTROYED): new defines/macros.
14051 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14052 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14053 (guardian_print): print more info.
14054 (guardian_apply): check if the guardian is destroyed, and throw an
14055 error if so. take one more optional argument `throw_p'.
14056 (scm_guard): depending on the value of `throw_p', return a boolean
14057 result.
14058 (scm_get_one_zombie): remove redundant property test.
14059 (guardian_t): represent the various (currently 3, I hope nothing
14060 more gets added) boolean fields as bit flags.
14061 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14062 (scm_destroy_guardian_x): new procedure.
14063
14064 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14065 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14066
14067 2001-01-01 Gary Houston <ghouston@arglist.com>
14068
14069 * fports.c (fport_write): bugfix: handle short writes for
14070 unbuffered ports too. optimize the buffered case by minimizing
14071 the number of write/flush calls.
14072 (write_all): new helper procedure.
14073
14074 The ChangeLog continues in the file: "ChangeLog-2000"
14075
14076 ;; Local Variables:
14077 ;; coding: utf-8
14078 ;; End: