regularize comments.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
cb90e2cb
HWN
12007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
2
d00a0704
HWN
3 * srcprop.c: regularize comments.
4
3d178652
HWN
5 * eval.c: remove superfluous ifndef DEVAL.
6
243ebb61
HWN
7 * private-options.h: idem.
8
9 * eval.i.c: copyright nitpicking.
10
0ee05b85
HWN
11 * eval.c: distangle. move duplicate code to eval.i.c and include
12 twice.
13
14 * eval.i.c: new file.
15
22fc179a
HWN
16 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
17 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
18 read.h, stacks.c, symbols.c, throw.c: use private-options.h
19
20 * private-options.h: new file: contain hardcoded option
21 definitions.
22
cb90e2cb
HWN
23 * private-gc.h: add FSF header.
24
62560650
HWN
252007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
26
72f19c26
HWN
27 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
28 memoize-symbol is set.
29
30 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
31
32 * eval.c (CEVAL): add memoize_symbol trap.
33
03347a97
HWN
34 * options.c (scm_options_try): new function. This allows error
35 reporting before changing options in a critical section.
36
b0763985
HWN
37 * srcprop.c: use double cell for storing source-properties. Put
38 filename in the plist, and share between srcprops if possible.
39 Remove specialized storage.
40
41 * srcprop.h: remove macros without SCM_ prefix from
42 interface. Remove specialized storage/type definitions.
43
62560650
HWN
44 * read.c: idem.
45
46 * print.c: idem.
47
48 * eval.c: terminate option lists with 0.
49
50 * options.c: remove n (for length) from scm_option_X
51 functions. Detect option list length by looking for NULL name.
52
42ddb3cb
LC
532007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
54
55 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
56 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
57 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
58 added by `make-vtable-vtable'. Reported by Marco Maggi.
59
937038e8
HWN
602007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
61
62 * throw.c (scm_ithrow): more refined error message: print symbols
63 too.
64
23d72566
KR
652007-01-16 Kevin Ryde <user42@zip.com.au>
66
67 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
68 implementing `set-program-arguments'.
69
70 * filesys.c (scm_init_filesys): Use scm_from_int rather than
71 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
72 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
73 O_LARGEFILE. These are all int not long, per arg to open().
74 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
75 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
76 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
77 an int arg to fcntl.
78
79 * posix.c (scm_putenv): Correction to "len" variable, was defined only
80 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
81 Move it to where it's used. Reported by Hugh Sasse.
82
83 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
84 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
85 meant #\nul in the input (detected by scm_to_locale_string) and a bad
86 flags arg (detected by scm_to_int) would throw from a critical
87 section, causing an abort().
88
89 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
90 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
91 REG_NOTEOL; they're all ints not longs (per args to regcomp and
92 regexec).
93
a2c40dc7
HWN
942007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
95
96 * throw.c (scm_ithrow): print out key symbol and string arguments
97 when error happens inside a critical section, and document why.
98
391f57e6
HWN
992007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
100
101 * read.c (s_scm_read_hash_extend): document #f argument to
102 read-hash-extend.
103
23d72566
KR
1042007-01-04 Kevin Ryde <user42@zip.com.au>
105
106 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
107 scm_minor_version, scm_micro_version, scm_effective_version,
108 scm_version, scm_init_version): Use SCM_API instead of just extern,
109 for the benefit of mingw. Reported by Cesar Strauss.
110
93632e3c
HWN
1112007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
112
113 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
114 too.
115 (gc_update_stats): update scm_gc_cells_allocated_acc too.
116
23d72566
KR
1172006-12-27 Kevin Ryde <user42@zip.com.au>
118
119 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
120 the basic scm_get_stack_base. As advised by Nils Durner.
121
122 * threads.c (get_thread_stack_base): Add a version using
123 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
124 As advised by Heikki Lindholm.
125
126 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
127 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
128 Durner.
129
1302006-12-24 Kevin Ryde <user42@zip.com.au>
131
132 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
133 error if pid is not our own process, instead of silently doing nothing.
134
135 * print.c (scm_write, scm_display, scm_write_char): Disable port close
136 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
137 check in configure.in unintentionally enabled it. Believe that
138 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
139 can leave errno in that state. popen.test "no duplicates" output test
140 provoked that.
141
e2bf3b19
HWN
1422006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
143
144 * numbers.c (scm_i_fraction_reduce): move logic into
145 scm_i_make_ratio(), so fractions are only read.
146 scm_i_fraction_reduce() modifies a fraction when reading it. A
147 race condition might lead to fractions being corrupted by reading
148 them concurrently.
149
150 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
151 comparisons between reduced and unreduced fractions go wrong.
152
153 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
154 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
155 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
156 SCM_FRACTION_REDUCED.
157
23d72566
KR
1582006-12-16 Kevin Ryde <user42@zip.com.au>
159
160 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
161 more direct for a procedure called raise.
162 (kill): Remove mingw fake fallback.
163
1642006-12-15 Kevin Ryde <user42@zip.com.au>
165
166 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
167 _pipe on mingw.
168
1692006-12-14 Kevin Ryde <user42@zip.com.au>
170
171 * threads.c (thread_print): Cope with the case where pthread_t is a
172 struct, as found on mingw. Can't just cast to size_t for printing.
173 Reported by Nils Durner.
174
175 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
176 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
177
1782006-12-13 Kevin Ryde <user42@zip.com.au>
179
180 * eval.c (scm_m_define): Set 'name procedure property on any
181 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
182 procedures with setters as used in srfi-17.
183
184 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
185 linux man page says is a possibility.
186
f30e1bdf
LC
1872006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
188
189 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 190 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
191 negative lower bounds.
192 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 193 Szavai Gyula).
f30e1bdf
LC
194
195 (scm_array_in_bounds_p): Iterate over S instead of always
196 comparing indices with the bounds of S[0]. This fixes
197 `array-in-bounds?' for arrays with a rank greater than one and
198 with different lower bounds for each dimension.
199
23d72566
KR
2002006-12-05 Kevin Ryde <user42@zip.com.au>
201
202 * numbers.c (scm_product): For flonum*inum and complex*inum, return
203 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
204 and as per R5RS section "Exactness".
205
2062006-12-03 Kevin Ryde <user42@zip.com.au>
207
208 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
209 allow $AWK from the environment to override. It had syntax gremlins,
210 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
211 Makefile stopped it having any effect. Use just $(AWK), which can be
212 overridden with "make AWK=xxx" in the usual way if desired.
213
22be72d3
LC
2142006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
215
216 * libguile/vectors.c (scm_vector_to_list): Fixed list
217 construction: elements were not copied when INC is zero (see
218 "shared array" example in `vectors.test'). Reported by
219 Szavai Gyula.
220
b89c4943
LC
2212006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
222
223 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
224 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
225 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
226 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
227 (DOT_X_FILES): Added `gettext.x'.
228 (DOT_DOC_FILES): Likewise.
229 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
230 (modinclude_HEADERS): Added `gettext.h'.
231 (EXTRA_DIST): Added `libgettext.h'.
232
233 * gettext.h: Renamed to...
234 * libgettext.h: New file.
235
236 * i18n.c: Renamed to...
237 * gettext.c: New file.
238
239 * i18n.h: Renamed to...
240 * gettext.h: New file.
241
242 * i18n.c, i18n.h, locale-categories.h: New files.
243
244 * init.c: Include "libguile/gettext.h" instead of
245 "libguile/i18n.h".
246 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
247 `scm_init_i18n ()'.
248
249 * posix.c: Include "libguile/gettext.h" instead of
250 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
251 (USE_GNU_LOCALE_API): New macro.
252 (scm_i_locale_mutex): New variable.
253 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
254
255 * posix.h: Include "libguile/threads.h".
256 (scm_i_locale_mutex): New declaration.
257
f3e3f530
NJ
2582006-11-17 Neil Jerram <neil@ossau.uklinux.net>
259
260 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
261
d9f71a07
LC
2622006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
263
264 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
265 "sweep_stats" arguments; use them instead of accessing the global
266 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
267
268 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
269 before each iteration of the loop.
270 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
271 (scm_i_get_new_heap_segment): Take an additional argument
272 SWEEP_STATS. Compute MIN_CELLS as a function of it.
273
274 * libguile/gc.c (scm_gc_cells_collected,
275 scm_gc_cells_collected_1): Removed.
276 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
277 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
278 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
279 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
280 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
281 `scm_gc_cells_(collected|swept)'.
282 (gc_update_stats): New.
283 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
284 `scm_i_gc_sweep_stats_1' instead of the former globals.
285 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
286 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
287 would keep allocating new segments instead of re-using collected
288 cells (because `scm_gc_cells_collected' would remain zero).
289
290 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
291 scm_gc_cell_yield_percentage): Removed.
292
293 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
294 (scm_i_adjust_min_yield): Updated.
295 (scm_i_get_new_heap_segment): Updated.
296
dd18d312
NJ
2972006-11-02 Neil Jerram <neil@ossau.uklinux.net>
298
299 * modules.c: Correct comment saying that low-level environments
300 will be used "in the next release".
301
302 * init.c: Comment out #include of environments.h.
303 (scm_i_init_guile): Comment out scm_environments_prehistory() and
304 scm_init_environments() calls.
305
306 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
307 (DOT_X_FILES): Remove environments.x.
308 (DOT_DOC_FILES): Remove environments.doc.
309 (modinclude_HEADERS): Remove environments.h.
310
9a5fa6e9
NJ
3112006-10-25 Neil Jerram <neil@ossau.uklinux.net>
312
313 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
314
315 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
316 scm_ia64_register_backing_store_base() instead of Linux-specific
317 implementations.
318
319 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
320 New declarations.
321
322 * gc.c (__libc_ia64_register_backing_store_base): Declaration
323 removed.
324 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
325 implementations for Linux and HP-UX.
326
327 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
328 and scm_ia64_register_backing_store_base() instead of
329 Linux-specific implementations.
330
331 * continuations.h (__libc_ia64_register_backing_store_base):
332 Declaration removed.
333 (scm_t_contregs): New "fresh" field.
334
335 * continuations.c (ia64_getcontext): Removed.
336 (scm_make_continuation): Use continuation fresh field instead of
337 interpreting getcontext return values (which isn't portable). Use
338 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
339 instead of Linux-specific implementations.
340 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
341 instead of Linux-specific implementation.
342
343 * _scm.h (__ia64__): Also detect __ia64.
344
8ab3d8a0
KR
3452006-10-03 Kevin Ryde <user42@zip.com.au>
346
347 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
348 arguments or 3 or more arguments. Previously 0 called proc with
349 SCM_UNDEFINED, and 3 or more silently used just the first 2.
350
3512006-09-28 Kevin Ryde <user42@zip.com.au>
352
353 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
354 for chsize fallback, instead of hard-coding mingw. Mingw in fact
355 supplies ftruncate itself these days.
356
357 * ports.c (fcntl.h): Can include this unconditionally, no need for
358 __MINGW32__.
359
360 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
361 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
362 "off_t" for parameters, per usual definition of this function, rather
363 than "char *" and "int". Use ftruncate instead of chsize. Check for
364 error on final close.
365
3662006-09-27 Kevin Ryde <user42@zip.com.au>
367
368 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
369 in mingw.
370
371 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
372 const *" for mingw to suppress warnings from gcc (which are errors
373 under the configure default -Werror). Reported by Nils Durner.
374
3752006-09-26 Kevin Ryde <user42@zip.com.au>
376
377 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
378 * fports.c (scm_open_file): Use open_or_open64.
379 (fport_seek_or_seek64): New function, adapting fport_seek.
380 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
381 functions.
382 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
383 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
384
385 * ports.c (scm_truncate_file): Update docstring per manual.
386
3872006-09-23 Kevin Ryde <user42@zip.com.au>
388
389 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
390 functions.
391
9a5fa6e9 3922006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
393
394 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
395 (make_predset, define_predset, make_strset, define_strset, false,
396 true): Removed.
397 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
398 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
399 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
400 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
401 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
402 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
403 (define_charset, scm_srfi_14_compute_char_sets): New functions.
404 (scm_init_srfi_14): Use `define_charset ()' instead of
405 `define_predset ()' and `define_strset ()'.
406
407 * srfi-14.h (scm_c_init_srfi_14): Removed.
408 (scm_srfi_14_compute_char_sets): New declaration.
409
410 * posix.h: Include "srfi-14.h".
411 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
412 successful `setlocale ()' call.
413
8ab3d8a0
KR
4142006-09-08 Kevin Ryde <user42@zip.com.au>
415
416 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
417 (scm_recvfrom): Update docstring from manual.
418
418122ce
RB
4192006-08-31 Rob Browning <rlb@defaultvalue.org>
420
421 * ports.c (scm_c_port_for_each): Add a
422 scm_remember_upto_here_1(ports) at the end of the function to fix
423 a GC bug.
424
b5944f66
NJ
4252006-08-28 Neil Jerram <neil@ossau.uklinux.net>
426
427 * backtrace.c (scm_display_backtrace_with_highlights): Minor
428 improvements to docstring.
429 (scm_backtrace_with_highlights): Analogous improvements.
430
8ab3d8a0
KR
4312006-08-12 Kevin Ryde <user42@zip.com.au>
432
433 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
434 New, set from configure.
435 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
436 to scmconfig.h.
437 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
438 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
439 Reported by Claes Wallin.
440
b0b0deff
NJ
4412006-08-11 Neil Jerram <neil@ossau.uklinux.net>
442
443 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
444 frame, not a stack).
445
8ab3d8a0
KR
4462006-07-25 Kevin Ryde <user42@zip.com.au>
447
448 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
449 on pthreads version, since pthread_getattr_np not available on solaris
450 and macos. Reported by Claes Wallin.
451
4522006-07-24 Kevin Ryde <user42@zip.com.au>
453
454 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
455 it's a macro on MacOS X. Reported by Claes Wallin.
456
457 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
458 for the benefit of Solaris 10. Reported by Claes Wallin.
459
460 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
461 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
462
4632006-07-21 Kevin Ryde <user42@zip.com.au>
464
465 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
466 autoconf recommendation. Should fix Solaris 10 reported by Claes
467 Wallin.
468
469 * threads.c: Include <string.h>, needed for memset() which is used by
470 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
471
b4912378
RB
4722006-07-18 Rob Browning <rlb@defaultvalue.org>
473
474 * continuations.c: Add __attribute__ ((returns_twice)) to the
475 ia64_getcontext prototype so that gcc will make the right
476 arrangements and avoid an illegal instruction during
477 call-with-current-continuation.
478
9a5fa6e9 4792006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
480
481 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
482 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
483
8ab3d8a0
KR
4842006-07-08 Kevin Ryde <user42@zip.com.au>
485
486 * environments.c (core_environments_unobserve): Use if/else rather
487 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
488 about them not being rvalues. Reported by Mike Gran.
489
490 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
491 portable and in particular fails on OpenBSD and AIX (see autoconf
492 manual too). Reported by Mike Gran.
493
4942006-06-25 Kevin Ryde <user42@zip.com.au>
495
496 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
497 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
498 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
499 HAVE_TM_ZONE.
500 (scm_strptime): Use tm_gmtoff from the strptime result when that field
501 exists, it's set by glibc strptime "%s".
502
9a5fa6e9 5032006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
504
505 * eq.c: Include "struct.h", "goops.h" and "objects.h".
506 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
507 are not GOOPS instances.
508 * struct.c: Include "eq.h".
509 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
510 hand-written code.
511 (scm_i_struct_equalp): New.
512 * struct.h (scm_i_struct_equalp): New declaration.
513
c862d0e0
KR
5142006-06-06 Kevin Ryde <user42@zip.com.au>
515
516 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
517 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
518 reported by Mattias Holm.
b4912378 519
c862d0e0
KR
5202006-06-03 Kevin Ryde <user42@zip.com.au>
521
522 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
523 unused variable warning when elisp disabled. Reported by Ryan
524 VanderBijl.
525
526 * throw.c (scm_handle_by_message): Add dummy return value to avoid
527 compiler warning on cygwin. Reported by Ryan VanderBijl.
528
529 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
530 duplicate of EXTRA_DOT_DOC_FILES.
531 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
532 Add scmconfig.h to dependencies, since these all run cpp. Helps a
533 parallel "make -j2". Reported by Mattias Holm.
534
5352006-05-30 Kevin Ryde <user42@zip.com.au>
536
537 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
538 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
539 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
540 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
541 port type descriptor, same as scm_make_port_type return value.
542
af4f8612
MV
5432006-05-30 Marius Vollmer <mvo@zagadka.de>
544
545 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
546 of the arguments is a array. This allows vectors to be equal to
547 one-dimensional arrays.
548
18bffcd0
MV
5492006-05-29 Marius Vollmer <mvo@zagadka.de>
550
551 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
552 that we have a pair before accessing its cdr. Thanks to Bill
553 Schottstaedt!
554
c862d0e0
KR
5552006-05-28 Kevin Ryde <user42@zip.com.au>
556
557 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
558 by "The Senator".
559
5602006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
561
562 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
563 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
564
c862d0e0
KR
5652006-05-26 Kevin Ryde <user42@zip.com.au>
566
567 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
568 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
569 Reported by "The Senator".
570 For select and ioctl, move fdes into those conditionals, to avoid
571 unused variable warning when neither of those used.
572
5732006-05-23 Kevin Ryde <user42@zip.com.au>
574
575 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
576 It's unused and will be in stdio.h anyway (if it's anywhere).
577
5782006-05-20 Kevin Ryde <user42@zip.com.au>
579
580 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
581 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
582
583 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
584 symlink). Probably can't create symlinks with mknod anyway though.
585
586 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
587 generation.
588
5892006-05-15 Kevin Ryde <user42@zip.com.au>
590
591 * simpos.c, simpos.h (scm_primitive__exit): New function.
592 (scm_primitive_exit): Update docstring, no longer the best exit after
593 a fork.
594
5952006-05-09 Kevin Ryde <user42@zip.com.au>
596
597 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
598 rather than converting to doubles, to avoid inf or nan when the inputs
599 are too big for a double but the quotient does fit. This affects
600 conversions exact->inexact of big fractions.
601
602 * filesys.c (scm_open_fdes): Use open64.
603 (scm_init_filesys): Add O_LARGEFILE.
604
605 * ports.c (scm_seek): Use lseek64.
606 (scm_truncate_file): Use ftruncate64.
607
4a342b19
MV
6082006-05-08 Marius Vollmer <mvo@zagadka.de>
609
610 * private-gc.h (CELL_P): Also check that the potential pointer is
611 correctly aligned for a cell. Thanks to Miroslav Lichvar!
612
c862d0e0
KR
6132006-04-18 Rob Browning <rlb@defaultvalue.org>
614
615 * _scm.h: Add back error if the size of off_t is unknown. The bug
616 was actually in guile-readline's configuration.
617
6182006-04-18 Kevin Ryde <user42@zip.com.au>
619
620 * posix.c (scm_mkstemp): Update docstring from the manual, in
621 particular file mode 0600 is not guaranteed.
622
281ab5e2
KR
6232006-04-17 Kevin Ryde <user42@zip.com.au>
624
625 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
626 size, to help the guile-readline build where off_t is unused.
627
2b829bbb
KR
6282006-04-16 Kevin Ryde <user42@zip.com.au>
629
630 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
631 (scm_readdir): Use readdir64.
632 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
633 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
634 and ftruncate take off_t not size_t.
635 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
636 available.
637
6382006-04-06 Kevin Ryde <user42@zip.com.au>
639
640 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 641 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
642
6432006-03-26 Marius Vollmer <mvo@zagadka.de>
644
645 * threads.c (get_thread_stack_base): Use scm_get_stack_base
646 instead of accessing __libc_stack_end directly, and only do this
647 when pthread_attr_getstack is known not to work for the main
648 thread or when not using pthreads at all.
649
650 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
651 unknown instead of returning NULL.
652
9a5fa6e9 6532006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
654
655 * numbers.c (scm_i_mem2number): Renamed to
656 scm_c_locale_stringn_to_number.
657 * numbers.c, print.c, read.c: Updated callers.
658 * numbers.h: Update function declaration.
659
6602006-03-11 Neil Jerram <neil@ossau.uklinux.net>
661
662 * unif.c (string_set): Don't return in a void function. (Reported
663 by Mike Gran.)
664
665 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
666 rather than void*, so we can do pointer arithmetic on it.
667 (Reported by Mike Gran.)
668 (s_scm_uniform_vector_write): Ditto.
669
6702006-03-10 Neil Jerram <neil@ossau.uklinux.net>
671
672 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
673 oldra is not an array. (Reported by Steve Juranich.)
674
675 * threads.c (do_unlock): Renamed from "unlock", which is defined
676 in unistd.h on QNX. (Reported by Matt Kraai.)
677
6782006-03-04 Kevin Ryde <user42@zip.com.au>
679
680 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
681 not SCM_CRITICAL_SECTION_START.
682
683 * eval.c, posix.c: Change comments from C++ to C style. Reported by
684 Mike Gran.
685
6862006-02-28 Kevin Ryde <user42@zip.com.au>
687
688 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
689
6902006-02-26 Kevin Ryde <user42@zip.com.au>
691
692 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
693 NAME_MAX is not available, which is so on Solaris 10. Report and help
694 by Bill Schottstaedt.
695
696 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
697 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
698 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
699 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
700 use "unsigned char", not signed char. This ensures comparisons are
701 the same as `char<?' etc, and is also the same as guile 1.6 did.
702 Reported by Sven Hartrumpf.
703
4a9f83ff
MD
7042006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
705
706 * random.c: Test for SCM_HAVE_T_UINT64 instead of
707 SCM_HAVE_T_INT64.
708 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
709 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
710 scm_t_int32.
711
4c7016dc
HWN
7122006-01-04 Ludovic Court<E8>s <ludovic.courtes@laas.fr>
713
714 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
715 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
716 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
717 Take into account SEG->SPAN when computing CELLS_SWEPT.
718 (scm_i_sweep_segment): Take one more argument, similarly.
719 (scm_i_sweep_all_segments): Likewise.
720 (scm_i_sweep_some_segments): Likewise.
721 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
722 refer to SCM_GC_CELLS_COLLECTED.
723
724 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
725 argument, an `scm_i_sweep_statistics' object.
726 Change the way DELTA is collected: don't take into account
727 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
728
729 * gc-malloc.c (scm_realloc): Pass an extra argument
730 to `scm_i_sweep_all_segments ()'.
731
732 * gc.c (gc_start_stats): Updated accordingly.
733 (gc_end_stats): Take an additional SWEEP_STATS argument.
734 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
735 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
736 Decrement SCM_CELLS_ALLOCATED.
737 (scm_i_gc): Likewise.
738
739 * private-gc.h (scm_i_sweep_*): Updated function
740 prototypes accordingly.
741 (scm_t_sweep_statistics): New type.
742 (scm_i_sweep_statistics_init): New macro.
743 (scm_i_sweep_statistics_sum): New macro
744
9a5fa6e9 7452006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
746
747 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
748 LEN. Without this, too much collectable memory gets unregistered,
749 which results in an underflow of SCM_MALLOCATED in
750 `decrease_mtrigger()'.
751
752 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
753 equal to SCM_MALLOCATED.
754
7552006-02-13 Marius Vollmer <mvo@zagadka.de>
756
757 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
758 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
759 configured --without-threads.
760 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
761
1aaa1c17
MV
7622006-02-12 Marius Vollmer <mvo@zagadka.de>
763
764 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
765 filling when the fill parameter is omitted, as documented, but
766 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
767 can not store characters.
768
d7c6575f
NJ
7692006-02-09 Neil Jerram <neil@ossau.uklinux.net>
770
771 * socket.c (scm_c_make_socket_address): Pass address_size pointer
772 on to scm_fill_sockaddr call.
773
43e01b1e
NJ
7742006-02-04 Neil Jerram <neil@ossau.uklinux.net>
775
776 * throw.h (scm_c_catch, scm_c_with_throw_handler,
777 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
778
779 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
780 (struct pre_unwind_data): New, replaces struct lazy_catch.
781 (scm_c_catch): New, replaces scm_internal_catch as the primary
782 catch API for C code; adds pre-unwind handler support.
783 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
784 compatibility.
785 (tc16_pre_unwind_data, pre_unwind_data_print,
786 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
787 "lazy_catch" equivalents.
788 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
789 as the primary C API for a "lazy" catch.
790 (scm_internal_lazy_catch): Now just a wrapper for
791 scm_c_with_throw_handler, for back compatibility.
792 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
793 pre-unwind handler support.
794 (scm_catch): Now just a wrapper for
795 scm_catch_with_pre_unwind_handler, for back compatibility.
796 (scm_with_throw_handler): New.
797 (scm_lazy_catch): Update comment to say that the handler can
798 return, and what happens if it does.
799 (toggle_pre_unwind_running): New.
800 (scm_ithrow): When identifying the throw target, take running
801 flags into account. In general, change naming of things from
802 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
803 don't unwind the dynamic context first. Add dynwind framing to
804 manage the running flag of a throw handler. If a lazy catch or
805 throw handler returns, rethrow the same exception again. Add
806 pre-unwind support to the normal catch case (SCM_JMPBUFP).
807
808 * root.c (scm_internal_cwdr): Add NULL args to
809 scm_i_with_continuation_barrier call.
810
811 * dynwind.c: Change comment mentioning lazy-catch to mention
812 pre-unwind data and throw handler also.
813
814 * continuations.h (scm_i_with_continuation_barrier): Add
815 pre-unwind handler args.
816
817 * continuations.c (scm_i_with_continuation_barrier): Add
818 pre-unwind handler args, and pass on to scm_c_catch (changed from
819 scm_internal_catch).
820 (c_handler): Remove scm_handle_by_message_noexit call.
821 (scm_c_with_continuation_barrier): Call
822 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
823 as the pre-unwind handler.
824 (scm_handler): Remove scm_handle_by_message_noexit call.
825 (s_scm_with_continuation_barrier): Call
826 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
827 as the pre-unwind handler.
828
2b829bbb
KR
8292006-02-04 Kevin Ryde <user42@zip.com.au>
830
831 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
832
72098928
KR
8332006-02-03 Kevin Ryde <user42@zip.com.au>
834
835 * list.c, list.h (scm_list): Restore this function for use from C.
836 It's a complete no-op but in theory might used by someone.
837
aa092c5d
MV
8382006-01-30 Marius Vollmer <mvo@zagadka.de>
839
840 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
841 so that it gets unlocked in all cases.
842 (SCM_APPLY, CEVAL): Likewise.
843
661ae7ab
MV
8442006-01-29 Marius Vollmer <mvo@zagadka.de>
845
ee51ba31
MV
846 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
847 scm_is_typed_array instead.
848
661ae7ab
MV
849 Renamed the "frames" that are related to dynamic-wind to "dynamic
850 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
851 Updated documentation.
852
99e370f6
MV
853 Disabled "futures":
854
855 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
856 * eval.c, init.c: Comment out all 'future' related things.
857
15ccf10b
MV
8582006-01-28 Marius Vollmer <mvo@zagadka.de>
859
860 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
861 to inline.h to make it inline.
862
9a5fa6e9 8632005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
864
865 * strings.c (scm_i_take_stringbufn): New.
866 (scm_i_c_take_symbol): New.
867 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
868
869 * strings.h (scm_i_c_take_symbol): New.
870 (scm_i_take_stringbufn): New.
871
872 * symbols.c (lookup_interned_symbol): New function.
873 (scm_i_c_mem2symbol): New function.
874 (scm_i_mem2symbol): Use `lookup_symbol ()'.
875 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
876 creating a new Scheme string.
877 (scm_from_locale_symboln): Likewise.
878 (scm_take_locale_symbol): New.
879 (scm_take_locale_symboln): New.
880
881 * symbols.h (scm_take_locale_symbol): New.
882 (scm_take_locale_symboln): New.
883
2ca2ffe6
HWN
8842006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
885
886 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
887 free_count.
888
c255614e
HWN
8892005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
890
891 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
892 upon error
893
29295b0c
NJ
8942005-12-29 Neil Jerram <neil@ossau.uklinux.net>
895
9a5fa6e9 896 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
897 the GC when allocated_fluids_len is zero.
898
2824f4dc
NJ
8992005-12-14 Neil Jerram <neil@ossau.uklinux.net>
900
ec3a8ace
NJ
901 * load.c (the_reader, the_reader_fluid_num): New.
902 (scm_primitive_load): Support custom reader.
903 (scm_init_load): Init the_reader and the_reader_fluid_num; export
904 the_reader as `current-reader'.
905
2824f4dc
NJ
906 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
907 (rather than an uninitialized pointer on the stack).
908
d9c36d2a
MV
9092005-12-07 Marius Vollmer <mvo@zagadka.de>
910
6a88895b
MV
911 Reported by Bruce Korb:
912
913 * init.c (invoke_main_func): Don't call exit here. Throws that
914 are only caught by scm_with_guile will bypass us and would cause
915 scm_boot_guile to return erroneously.
916 (scm_boot_guile): Expect scm_with_guile to return and call exit
917 here, passing it an appropriate exit code.
918
919 From Andy Wingo:
d9c36d2a
MV
920
921 * script.c (scm_find_executable): Compile fix -- fgetc returns an
922 unsigned char cast to an int, or -1 for EOS.
923
b54df254
MV
9242005-12-06 Marius Vollmer <mvo@zagadka.de>
925
08f489c9
MV
926 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
927 non-const.
9a5fa6e9 928 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 929
b54df254
MV
930 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
931 scm_enter_guile): Removed from public API. See comment at
932 scm_without_guile for the rationale.
933
934 * scmsigs.c (read_without_guile): New.
935 (signal_delivery_thread): Use it instead of
936 scm_leave_guile/read/scm_enter_guile.
937
9d9ce2b5
MV
938 From Stephen Compall:
939
940 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
941 (CEVAL): Evaluate SRFI 61 cond clauses.
942
9a5fa6e9 9432005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
944
945 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
946 This was typically hit when running `gc-live-object-stats' right
947 after starting Guile.
948
efeac8ae
KR
9492005-11-30 Kevin Ryde <user42@zip.com.au>
950
951 * srfi-13.c (scm_string_append_shared): No copying if just one
952 non-empty string in args.
953
606183ba
KR
9542005-11-26 Kevin Ryde <user42@zip.com.au>
955
956 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 957 by Ludovic Courtès.
606183ba
KR
958
959 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
960 "register".
961
962 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
963 scm_malloc returning NULL, it never does that.
964 * putenv.c (putenv): Likewise.
965
966 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
967 much too big to want to inline.
968
9a5fa6e9 9692005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
970
971 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
972 the value at its top. This fixes a reference leak.
973 (PUSH_REF): Perform `pstate->top++' after calling
974 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
975 effects.
976
9a5fa6e9 9772005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
978
979 * gc.c (scm_weak_vectors): Removed.
980
f07d2b20
KR
9812005-11-12 Kevin Ryde <user42@zip.com.au>
982
983 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 984 by Ludovic Courtès.
f07d2b20 985
bedd3f5f
MV
9862005-11-07 Marius Vollmer <mvo@zagadka.de>
987
988 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
989 SCM_CRITICAL_SECTION_START/END since the code inside the critical
990 section might exit non-locally.
991
7c9c0169
NJ
9922005-11-04 Neil Jerram <neil@ossau.uklinux.net>
993
994 * eval.c (sym_instead): New symbol.
995 (ENTER_APPLY): Remove optional use of a continuation when making
996 trap call.
997 (scm_debug_opts): Change doc for 'cheap option to make clear that
998 it is now obsolete.
999 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1000 making trap calls, and implement substitution of eval expressions
1001 and return values using the values that the trap call handlers
1002 return.
1003
1004 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1005
9a5fa6e9 10062005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1007
1008 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1009 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1010 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1011 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1012 scm_c_make_socket_address): New functions.
1013 * socket.h: Add prototypes.
1014
fc9f596c
KR
10152005-10-24 Kevin Ryde <user42@zip.com.au>
1016
1017 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1018 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1019 POSIX spec examples, the latter are not available on for instance
1020 NetBSD.
1021
1022 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1023 posix.texi.
1024
1025 * stime.c (scm_strftime): Update docstring from posix.texi.
1026
0460c6e1
MV
10272005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1028
1029 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1030
1031 * null-threads.h, pthread-threads.h
1032 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1033 (scm_i_pthread_mutexattr_recursive): New.
1034
1035 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1036 (scm_i_critical_section_mutex): Do not initialize statically.
1037 (scm_threads_prehistory): Initialize
1038 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1039 here.
1040
1041 * eval.c (source_mutex): Do not initialiaze statically.
1042 (scm_init_eval): Do it here, using
1043 scm_i_pthread_mutexattr_recursive.
1044
7b4a9e52
MV
10452005-09-05 Marius Vollmer <mvo@zagadka.de>
1046
1047 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1048 New.
1049 (sym_reader): New.
1050 (scm_print_opts): Added "quote-keywordish-symbols" option.
1051 (quote_keywordish_symbol): New, for evaluating the option.
1052 (scm_print_symbol_name): Use it.
1053 (scm_init_print): Initialize new option to sym_reader.
1054
5defc05d
NJ
10552005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1056
1057 * eval.c (eval_letrec_inits): New.
1058 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1059
036482e9
MV
10602005-08-12 Marius Vollmer <mvo@zagadka.de>
1061
1062 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1063 Peter Gavin!
1064
5c347f8c
KR
10652005-08-12 Kevin Ryde <user42@zip.com.au>
1066
1067 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1068
bc721aa2
KR
10692005-08-06 Kevin Ryde <user42@zip.com.au>
1070
1071 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1072 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1073 scm_string_index, scm_string_index_right, scm_string_skip,
1074 scm_string_skip_right, scm_string_count, scm_string_map,
1075 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1076 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1077 procedures called in loops.
1078
126c81db
KR
10792005-08-02 Kevin Ryde <user42@zip.com.au>
1080
1081 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1082 avoid lots of copying where previoulsy growing by only 80 bytes at a
1083 time.
1084
7f278dc6
MV
10852005-08-01 Marius Vollmer <mvo@zagadka.de>
1086
1087 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1088 already have scm_lookup_closure_module, which does the same thing.
1089
cb5c4b07
MV
10902005-08-01 Marius Vollmer <mvo@zagadka.de>
1091
1092 New marking algorithm for weak hashtables that fixes the problem
1093 that references from the non-weak value to the associated weak
1094 key (for example) would prevent the entry from ever being dropped.
1095
1096 Guardians have been changed back to their original semantics and
1097 are no longer greedy and no longer drop cycles.
1098
1099 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1100 hashtable and guardian machinery but call the relevant functions
1101 directly.
1102
1103 * guardians.h, guardians.c, deprecated.h,
1104 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1105 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1106 Deprecated and moved into deprecated.[ch].
1107
1108 * guardians.h, guardians.c: Mostly rewritten.
1109 (scm_i_init_guardians_for_gc,
1110 scm_i_identify_inaccessible_guardeds,
1111 scm_i_mark_inaccessible_guardeds): New.
930888e8 1112 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1113
1114 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1115 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1116 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1117 (scm_weaks_prehistory): Removed.
1118 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1119 scm_i_mark_weak_vectors_non_weaks,
1120 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1121 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1122 scm_scan_weak_vectors): Removed.
1123
1124 * hashtab.h (scm_i_scan_weak_hashtables): New.
1125 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1126 SCM_WVECTF_NOSCAN.
1127 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1128 t->n_items.
1129 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1130 to latter. Do not scan the alists themselves, this is done by the
1131 weak vector code now. Just update the element count.
1132
1133 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1134 to latter. The type is now only part of the cell word.
1135 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1136
1137 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1138
3e2073bd
MD
11392005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1140
1141 Some changes towards making it possible to run Guile on the EM64T
1142 platform.
1143
1144 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1145 mallocating for (unsigned long *bounds).
1146
1147 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1148 scm_t_bits before storing them in the type word.
1149
1150 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1151 scm_t_bits to int.
1152
e8ac8e75
KR
11532005-07-12 Kevin Ryde <user42@zip.com.au>
1154
1155 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1156 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1157 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1158 than scm_makfrom0str.
1159 Reported by Ken Raeburn.
1160
1161 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1162 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1163 returning SCM_GC_CARD_BVEC.
1164
1165 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1166 rather than latin-1 acute accent, the latter may not print on all
1167 terminals.
1168
1169 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1170 trailing deletions, so as to return a substring if those are the only
1171 changes.
1172
adc0677d
KR
11732005-07-10 Kevin Ryde <user42@zip.com.au>
1174
1175 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1176 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1177 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1178 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1179
8fecbb19
HWN
11802005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1181
1182 * gc-card.c (scm_i_card_statistics): init tag.
1183
1184 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1185
fc9c5d06
HWN
11862005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1187
8fecbb19
HWN
1188 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1189 string.
fc9c5d06 1190
08fce816
KR
11912005-06-25 Kevin Ryde <user42@zip.com.au>
1192
1193 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1194 last change, use plain copy-on-write substrings, the individual
1195 descriptions in the srfi don't mention shared storage (only the
1196 introduction does).
1197
1198 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1199 null-terminator, rather than mallocing a whole new block.
1200 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1201
fc4abd0e
MV
12022005-06-12 Marius Vollmer <mvo@zagadka.de>
1203
e3da8a30
MV
1204 * ramap.c (scm_array_index_map_x): First test for real arrays,
1205 then check for generalized vectors. This ensures that the
1206 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1207 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1208 to access the target array, making these functions work with all
1209 kinds of arrays, not just bit arrays.
e3da8a30 1210
fc4abd0e
MV
1211 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1212 gh_list.c, gh_predicates.c: Deprecated everything.
1213
1214 * environments.c (environment_default_folder,
1215 environment_default_observer): Do not use gh_call3, gh_call1.
1216
e4da0740
HWN
12172005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1218
1219 * modules.c (s_scm_eval_closure_module): new function. Return the
1220 module inside an eval-closure.
1221
1222 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1223 table. This means that procedure properties are GC'd if the
1224 procedure dies.
1225
27667158
KR
12262005-06-11 Kevin Ryde <user42@zip.com.au>
1227
1228 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1229 charset cases, count chars kept and build a string in a second pass,
1230 rather than using a cons cell for every char kept. Use a shared
1231 substring when nothing removed (such sharing is allowed by the srfi).
1232
8a00ba71
HWN
12332005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1234
1235 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1236 string, so live object stats can be sorted with string<?.
1237
a677679f
MV
12382005-06-06 Marius Vollmer <mvo@zagadka.de>
1239
2ff668b0
MV
1240 * print.c (iprin1): When writing a string, collect all characters
1241 that can be printed directly into one call to scm_lfwrite.
1242 Previously, every character was output with its own call to
1243 write(2) on unbuffered ports.
1244
589f22f6
MV
1245 * eval.c (scm_eval_options_interface): Use
1246 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1247 and SCM_CRITICAL_SECTION_END.
1248
a677679f
MV
1249 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1250 check for generalized vectors. This ensures that the generalized
1251 vector case need only work with zero-origin ranges.
1252
f8cda9ee
KR
12532005-06-06 Kevin Ryde <user42@zip.com.au>
1254
1255 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1256 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1257 matched.
1258
cdac1be4
MV
12592005-06-05 Marius Vollmer <mvo@zagadka.de>
1260
6642f7ac
MV
1261 * eval.c: Added comment on how to make case 1.1 of
1262 r5rs_pitfall.test succeed.
1263
cdac1be4
MV
1264 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1265
1266 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1267
1268 * socket.c: Remove obsolete comment about socklen_t.
1269 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1270
1271 * numbers.h (isnan)[__MINGW32__]: Remove.
1272
1273 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1274 DEFAULT_INCLUDES when cross compiling.
1275
1276 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1277
a677679f 1278 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1279 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1280 from Jan's patch.)
1281
9e664475
MV
12822005-05-22 Marius Vollmer <mvo@zagadka.de>
1283
188d0c5e
MV
1284 * unif.c (scm_make_shared_array): Add old base to new base since
1285 scm_array_handle_pos does not include the base.
1286 (scm_aind): Likewise.
1287
9e664475
MV
1288 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1289 output port.
1290
5a6d139b
NJ
12912005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1292
1293 Mac OS X compile warning fixes, reported by Richard Todd.
1294
1295 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1296 that it is signed.
1297
1298 * strports.c (st_resize_port): Add unsigned char cast.
1299 (scm_mkstrport): Make read/write_buf cast unsigned.
1300
1301 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1302
1303 * rdelim.c (scm_read_line): Initialize slen.
1304
1305 * load.c (scm_search_path): Remove weird >=1, and add
1306 parentheses to clarify conditions.
1307
1308 * hash.c (scm_hasher): Add const unsigned char cast.
1309
1310 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1311
b01532af
NJ
13122005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1313
9a5fa6e9 1314 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1315
1316 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1317 code.
1318
1319 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1320 of code.
1321
1322 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1323 of code.
1324 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1325 and current.
1326
229a0710
NJ
13272005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1328
1329 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1330 compile warning reported by Werner Scheinast.
1331
645dd3fc
HWN
13322005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1333
80038021
HWN
1334 * list.h: remove scm_list()
1335
645dd3fc
HWN
1336 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1337 SCM_DEBUG_CELL_ACCESSES
1338 (FLUID_NEXT_LOC): idem.
1339
9a68a4a8
KR
13402005-04-30 Kevin Ryde <user42@zip.com.au>
1341
1342 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1343 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1344 zero when re==0 and im<0. Reported by Jean Crepeau.
1345
0640cdaa
KR
13462005-04-25 Kevin Ryde <user42@zip.com.au>
1347
1348 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1349 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1350 few sensible uses (like filling with a random number generator say),
1351 but has been allowed in the past and so should be kept.
0640cdaa 1352
c0b85e9c
KR
13532005-04-23 Kevin Ryde <user42@zip.com.au>
1354
1355 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1356 scm_hash_fn_remove_x.
1357
1358 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1359 the caller when cons* is reached through apply.
1360
1361 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1362 list is called using apply, under the debugging evaluator.
1363 (scm_list): Remove.
1364
c51682b4
KR
1365 * list.c, list.h (scm_make_list): New code, moving make-list from
1366 boot-9.scm.
8cb2eff8 1367
c0575bde
KR
13682005-04-14 Kevin Ryde <user42@zip.com.au>
1369
1370 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1371 converted from scheme code in boot-9.scm.
1372
47a298d9
KR
13732005-04-11 Kevin Ryde <user42@zip.com.au>
1374
1375 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1376 Validate list argument, scm_string_append and scm_string_append_shared
1377 don't do that to their rest argument (in a normal build).
1378
8ea3dc2e
MV
13792005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1380
1381 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1382 closure can not be stored since it is no longer valid at GC time.
1383 (make_hash_table): Initialize 'hash_fn' field.
1384 (scm_i_rehash): Only store hash_fn in hash table when closre is
1385 NULL.
1386 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1387 non-NULL. Always use a NULL closure.
1388 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1389 few entries.
1390
08d2020d
MV
13912005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1392
1393 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1394 argument; always use scm_delq_x. The delete_fn function works on
1395 the handle, not the key, and it therefore makes no sense to make
1396 it configurable. Changed all callers.
1397 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1398 (scm_hash_clear): Accept plain vectors as hashtables.
1399 (scm_delx_x): Removed.
1400
cb975c21
HWN
14012005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1402
1403 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1404 compatibility with gcc -std=c99.
1405
4c908f2c
MD
14062005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1407
1408 * async.h (scm_mask_ints): Removed left over reference to
1409 scm_root.
1410
1411 * threads.c: Removed fprintf debug statements.
1412
d193b04b
NJ
14132005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1414
1415 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1416
c29748cd
NJ
14172005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1418
1419 * debug.c (scm_make_memoized): Remove unnecessary critical
1420 section, and simplify by using SCM_RETURN_NEWSMOB.
1421
e654b062
MD
14222005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1423
1424 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1425
4bc6f1c6
KR
14262005-03-18 Kevin Ryde <user42@zip.com.au>
1427
1428 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 1429 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 1430
f1531813
KR
14312005-03-13 Kevin Ryde <user42@zip.com.au>
1432
1433 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1434 srfi-60.
1435
1436 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1437 because OR-ing bits into a negative can reduce the value to an inum.
1438
1439 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1440 casting inum to double since that can lose precision.
1441
a9fae247
MV
14422005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1443
1444 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1445 (guilify_self_1): Initialize it.
1446
1447 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1448 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1449 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1450 field.
1451 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1452 recursively.
1453 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1454 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1455 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1456 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1457 scm_after_gc_c_hook here.
1458 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1459 scm_after_gc_c_hook when a full GC has in fact been performed.
1460 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1461
1462 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1463 scm_gc_heap_lock.
1464
1465 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1466 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1467
1468 * inline.h (scm_cell, scm_double_cell): Do not check
1469 scm_gc_running_p, allocation during sweeping is OK.
1470
1471 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1472 not set scm_block_gc.
1473
1474 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1475
1476 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1477 instead of scm_malloc. The latter can not be used during GC.
1478
d1c38e11
MV
14792005-03-09 Marius Vollmer <mvo@zagadka.de>
1480
1481 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1482 years.
1483
99ec43c1
MV
14842005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1485
1486 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1487 scm_gc_running_p. Sweeping can happen in parallel with
1488 allocation.
1489
1490 * inline.h: Updated comments for current threading implementation.
1491
1492 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1493 (scm_i_thread): Removed unused signal_asyncs field.
1494 (threads_mark): Do not mark it.
1495 (guilify_self_1): Do not initialize it. Do initialize
1496 continuation_root field.
1497 (do_thread_exit): Do not remove thread from all_threads list.
1498 (on_thread_exit): Do it here, after leaving guile mode.
1499 (sleep_level): Removed.
1500 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1501 returning. Do not support recursive sleeps.
1502 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1503 entry. Do not support recursive sleeps.
1504
1505 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1506 resize_all_states): Collapsed ensure_state_size and
1507 ensure_all_state_sizes into one function named resize_all_states.
1508 Allocate new vectors outside of single threaded region. Do only
1509 simple things inside that region.
1510 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1511 while adding to the global lists.
1512
1513
461f34aa
MV
15142005-03-08 Marius Vollmer <mvo@zagadka.de>
1515
1516 libltdl is no longer distributed. We expect it to be installed
1517 already.
1518
1519 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1520 (libguile_la_LIBADD): Removed @LIBLTDL@.
1521
4e047c3e
MV
15222005-03-07 Marius Vollmer <mvo@zagadka.de>
1523
1524 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1525 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1526 they also block/unblock execution of asyncs and call
1527 scm_async_click which is declared in async.h but threads.h can not
1528 include async.h since async.h already includes threads.h.
1529 (scm_i_critical_section_level): New, for checking mistakes in the
1530 use of the SCM_CRITICAL_SECTION_* macros.
1531 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1532 critical sections can be nested.
1533
1534 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1535 not zero.
1536
1537 * threads.h, threads.c (scm_frame_lock_mutex): New.
1538 (scm_frame_critical_section): Take mutex as argument.
1539 (framed_critical_section_mutex): New, used as default for above.
1540 (scm_init_threads): Initialize it.
1541 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1542 scm_i_critical_section_mutex; both are initialized statically.
1543
1544 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1545 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
1546 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1547 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
1548
1549 * debug.c (scm_debug_options): Replace
1550 SCM_CRITICAL_SECTION_START/END with a frame and
1551 scm_frame_critical_section.
1552
1553 * continuations.c (scm_make_continuation): No longer a critical
1554 section.
1555 (scm_dynthrow): Abort when scm_i_critical_section_level is
1556 not zero.
1557
d0a45bff
MV
15582005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1559
db6673e5
MV
1560 * threads.c (scm_try_mutex): Renamed argument for consistency.
1561
d0a45bff
MV
1562 * root.c (scm_call_with_dynamic_root): New docstring.
1563
1564 * eval.c: Define _GNU_SOURCE.
1565
9de87eea
MV
15662005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1567
1568 Big merge from the mvo-thread-cleanup branch. The main changes
1569 are:
1570
1571 - The dynamic roots functionality has been split into dynamic
1572 states and continuations barriers. Fluids have been
1573 reimplemented and can now be garbage collected.
1574
1575 - Initialization of Guile now works in a multi-thread friendly
1576 manner. Threads can freely enter and leave guile mode.
1577
1578 - Blocking on mutexes or condition variables or while selecting
1579 can now be reliably interrupted via system asyncs.
1580
1581 - The low-level threading interface has been removed.
1582
1583 - Signals are delivered via a pipe to a dedicated 'signal delivery
1584 thread'.
1585
1586 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1587
1588 * throw.c (scm_handle_by_message): Exit only the current thread,
1589 not the whole process.
1590 (scm_handle_by_message_noexit): Exit when catching 'quit.
1591
1592 * scmsigs.c (take_signal, signal_delivery_thread,
1593 start_signal_delivery_thread, ensure_signal_delivery_thread,
1594 install_handler): Reimplemented signal delivery as explained in
1595 the comments.
1596
1597 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
1598 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
1599 scm_i_sched_yield, scm_i_pthread_sigmask,
1600 SCM_I_PTHREAD_MUTEX_INITIALIZER,
1601 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
1602 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
1603 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
1604 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
1605 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
1606 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
1607 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
1608 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
1609 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
1610 scm_i_pthread_key_create, scm_i_pthread_setspecific,
1611 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
1612 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
1613 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
1614 when using pthreads.
1615 * null-threads.c, null-threads.h: Provide dummy definitions for
1616 the above symbols when not using pthreads.
1617
1618 * modules.h, modules.c (scm_frame_current_module): New.
1619
1620 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
1621 instead of scm_internal_dynamic_wind.
1622
1623 * init.h, init.c (restart_stack, start_stack): Removed.
1624 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
1625 (scm_boot_guile_1): Removed.
1626 (scm_i_init_mutex): New.
1627 (really_cleanup_for_exit, cleanup_for_exit): New.
1628 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
1629 Moved around some init funcs. Call
1630 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
1631 with atexit.
1632
1633 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
1634 Use "!scm_is_eq" instead of "!=".
1635
1636 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
1637 SCM_USE_COOP_THREADS): Removed.
1638
1639 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
1640 maintained. Unlock scm_i_sweep_mutex before running
1641 scm_after_gc_c_hook.
1642 (scm_permanent_object): Allocate outside of critical section.
1643 (cleanup): Removed.
1644
1645 * fluids.h, fluids.c: Reimplemented completely.
1646 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
1647 SCM_FAST_FLUID_SET): Reimplemented as functions.
1648 (scm_is_fluid): New.
1649 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
1650 (scm_make_dynamic_state, scm_dynamic_state_p,
1651 scm_is_dynamic_state, scm_current_dynamic_state,
1652 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
1653 scm_c_with_dynamic_state, scm_with_dynamic_state,
1654 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
1655
1656 * feature.c (progargs_fluid): New.
1657 (scm_program_arguments, scm_set_program_arguments): Use it instead
1658 of scm_progargs.
1659 (scm_init_feature): Allocate it. Also, only add "threads" feature
1660 when SCM_USE_PTHREAD_THREADS is true.
1661
1662 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
1663 scm_make_rec_mutex, with all the consequences.
1664 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
1665 scm_internal_dynamic_wind. Handle dynamic states as second
1666 argument.
1667
1668 * threads.h, threads.c (scm_internal_select): Renamed to
1669 scm_std_select and discouraged old name.
1670 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
1671 and scm_std_usleep.
1672 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
1673 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
1674 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
1675 SCM_THREAD_DATA): Removed.
1676 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
1677 (scm_i_thread): New.
1678 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1679 Use scm_assert_smob_type.
1680 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
1681 scm_thread_self, scm_thread_yield, scm_mutex_init,
1682 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
1683 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
1684 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
1685 scm_cond_init, scm_cond_destroy, scm_cond_wait,
1686 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
1687 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
1688 scm_thread_select): Removed. Replaced with scm_i_pthread
1689 functions as appropriate.
1690 (scm_in_guile, scm_outside_guile): Removed.
1691 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
1692 take a ticket.
1693 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
1694 New.
1695 (scm_i_frame_single_threaded): New.
1696 (scm_init_threads_default_dynamic_state): New.
1697 (scm_i_create_thread): Removed.
1698 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
1699 (scm_make_recursive_mutex): New.
1700 (scm_frame_critical_section): New.
1701 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
1702 latter, changed all uses.
1703 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
1704 scm_i_set_last_debug_frame): New, use them instead of scm_root
1705 stuff.
1706 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
1707 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
1708 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
1709 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
1710 (remqueue): Allow the removal of already removed cells. Indicate
1711 whether a real removal has happened.
1712 (scm_thread): Removed, replaced with scm_i_thread.
1713 (make_thread, init_thread_creatant): Removed.
1714 (cur_thread): Removed.
1715 (block_self, unblock_from_queue): New.
1716 (block, timed_block, unblock): Removed.
1717 (guilify_self_1, guilify_self_2, do_thread_exit,
1718 init_thread_key_once, init_thread_key,
1719 scm_i_init_thread_for_guile, get_thread_stack_base,
1720 scm_init_guile): New initialisation method.
1721 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
1722 thread creation.
1723 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
1724 "fair" to fat and implemented new semantics, including reliable
1725 interruption.
1726 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
1727 (scm_threads_mark_stacks): Explicitly mark handle.
1728 (scm_std_select): Allow interruption by also selecting on the
1729 sleep_pipe.
1730 (scm_i_thread_put_to_sleep): Handle recursive requests for
1731 single-threadedness.
1732 (scm_threads_prehistory, scm_init_threads): Put current thread
1733 into guile mode via guileify_self_1 and guileify_self_2,
1734 respectively.
1735
1736 * fluid.h (SCM_FLUIDP): Deprecated.
1737
1738 * coop-threads.c: Removed.
1739
1740 * continuations.h, continuations.c (scm_with_continuation_barrier,
1741 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
1742 New.
1743
1744 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
1745 (async_mutex): New.
1746 (scm_async_click): Protected with async_mutex. Do not deal with
1747 signal_asyncs, which are gone. Set cdr of handled async cell to
1748 #f.
1749 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
1750 current sleep.
1751 (scm_system_async_mark_for_thread): Do not use scm_current_thread
1752 since that might not work during early initialization.
1753
1754 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
1755 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
1756 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
1757 and SCM_CRITICAL_SECTION_END.
1758 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
1759 SCM_CRITICAL_SECTION_START/END.
1760
1761 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
1762 (libguile_la_SOURCES): Added null-threads.c
1763 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
1764 threads-plugin.c.
1765 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
1766
1767 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
1768 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
1769 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
1770 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
1771 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
1772 scm_make_root): Removed or deprecated. Replaced with references
1773 to the current thread, dynamic state, continuation barrier, or
1774 some fluid, as appropriate.
1775 (root_mark, root_print): Removed.
1776 (scm_internal_cwdr): Reimplemented guts with
1777 scm_frame_current_dynamic_state and
1778 scm_i_with_continuation_barrier.
1779 (scm_dynamic_root): Return current continuation barrier.
1780
1781
ad3d5a65
MV
17822005-02-28 Marius Vollmer <mvo@zagadka.de>
1783
1784 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
1785 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
1786 cleanliness.
1787 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
1788 IP_DROP_MEMBERSHIP.
1789 Thanks to Greg Troxel!
1790
73a90115
MD
17912005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1792
1793 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
1794 block.
1795
5d2cb3ab
MV
17962005-02-25 Marius Vollmer <mvo@zagadka.de>
1797
1798 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
1799 so that no two weak alist vectors share a spine.
1800 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
1801 during GC before inserting the new alist cell.
1802
838c4126
MV
18032005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1804
1805 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
1806 the hashtable.
1807 (scm_hash_fn_create_handle_x): Likewise.
1808 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
1809
29fed193
MD
18102005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1811
1812 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
1813 the prototypical examples mentioned in the old reference manual.
1814 Instead keep the old semantics of dispatching on type. (Yes, this
1815 is extremely ugly, but the whole point of keeping the deprecated
1816 interface is not to break old code.)
1817
9cc49060
MD
18182005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1819
1820 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
1821 scm_i_array_dims.
1822
8447f463
KR
18232005-01-28 Kevin Ryde <user42@zip.com.au>
1824
1825 * numbers.c (scm_ash): Rewrite using shifts, much faster than
1826 integer-expt and multiply/divide. Inexacts and fractions no longer
1827 supported (they happened to work before for left shifts, but not
1828 right). Don't really need inexacts and fractions, since ash is
1829 documented as a "bitwise operation", and all the rest of those only
1830 take exact integers.
1831
1367aa5e
HWN
18322005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
1833
856fca7e
HWN
1834 * gc-card.c (scm_i_card_statistics): map structs, closures and
1835 subrs to one tag.
1836
1367aa5e 1837 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 1838 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
1839
1840 * gc-segment.c (scm_i_all_segments_statistics): new function.
1841 (scm_i_heap_segment_statistics): new function
1842
1843 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
1844 statistics on the number of live objects of each type.
1845
1846 * gc-card.c (scm_i_tag_name): new function.
1847 (scm_i_card_statistics): new function.
1848
333db3b8
KR
18492005-01-24 Kevin Ryde <user42@zip.com.au>
1850
1851 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
1852 POSIX and C99 don't document errno being set. Reported by Bruno
1853 Haible.
1854 (scm_flock): Update docstring from manual.
1855
8447f463
KR
1856 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
1857 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
1858 a 64-bit system.
1859
1860 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
1861 sa_handler, needs to be a long on 64-bit systems where int is only 32
1862 bits.
1863
88f59e53
MV
18642005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1865
0eeb2611
MV
1866 * environments.c (obarray_enter, obarray_replace): Call
1867 SCM_HASHTABLE_INCREMENT when adding a new entry.
1868
88f59e53
MV
1869 * objects.c: Include goops.h for the scm_class_of prototype.
1870
1871 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
1872 sizes to be smaller than the maximum lengths of vectors.
1873
219b2868
MV
18742005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1875
1876 * ports.c, smob.c: Include "libguile/goops.h".
1877
1878 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
1879 scm_class_char, scm_class_pair, scm_class_procedure,
1880 scm_class_string, scm_class_symbol,
1881 scm_class_procedure_with_setter, scm_class_primitive_generic,
1882 scm_class_vector, scm_class_null, scm_class_real,
1883 scm_class_complex, scm_class_integer, scm_class_fraction,
1884 scm_class_unknown, scm_port_class, scm_smob_class,
1885 scm_no_applicable_method, scm_class_of): Moved from objects to
1886 goops since they are only useable once goops has been loaded.
1887 (scm_classes_initialized): Removed.
1888 (scm_class_of): Do not check it.
1889 (create_standard_classes): Do not set it.
1890
009c6b9c
MV
18912005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1892
50472546
MV
1893 * objects.h, objects.c (scm_classes_initialized): New.
1894 (scm_class_of): Signal error when scm_classes_initialized is zero.
1895 * goops.c (create_standard_classes): Set scm_classes_initialized
1896 to one.
1897
009c6b9c
MV
1898 * random.c (scm_random_solid_sphere_x): Use
1899 scm_c_generalized_vector_length instead of
1900 scm_uniform_vector_length.
1901
7719cbe9
MV
19022005-01-16 Marius Vollmer <mvo@zagadka.de>
1903
1904 * script.c (scm_compile_shell_switches): Removed debugging output.
1905
1ec44fed
KR
19062005-01-15 Kevin Ryde <user42@zip.com.au>
1907
1908 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
1909 docstrings from manual.
1910 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
1911
6e4cd850
MV
19122005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1913
0b5a0521
MV
1914 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
1915 its value.
1916
1917 Implement u64 and s64 uniform numeric vectors with bignums when
1918 scm_t_uint64 and scm_t_int64 are not available.
1919
1920 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
1921 scm_array_handle_u64_elements,
1922 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
1923 scm_u64vector_writable_elements): Do not define when scm_t_uint64
1924 is not available.
1925 (scm_take_s64vector, scm_array_handle_s64_elements,
1926 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
1927 scm_s64vector_writable_elements): Likewise for scm_t_int64.
1928 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
1929 scm_t_int64/scm_t_uint64 are not available.
1930 (uvec_mark): New, to mark the bignums.
1931 (alloc_uvec): Initialize bignums.
1932 (uvec_fast_ref): Return bignums directly.
1933 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
1934 assert_exact_integer): New.
1935 (uvec_fast_set): Use them to validate the bignums.
1936 (scm_init_srfi_4): Set mark function of smob when needed.
1937 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
1938 scm_int64_max.
1939
6e4cd850
MV
1940 Recognize 1.4 -e syntax.
1941
1942 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
1943 (scm_compile_shell_switches): Use them to recognize and convert
1944 1.4 "-e" syntax.
1945
3b698afe
MV
19462005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1947
1948 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
1949 deprecated features that once were macros but are now functions
1950 back into macros.
1951
d6dc83a9
MV
19522005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1953
49086691
MV
1954 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
1955 * deprecation.c (scm_issue_deprecation_warning,
1956 scm_c_issue_deprecation_warning_fmt): Use it.
1957 (mode): Removed.
1958 (print_summary): New.
1959 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
1960 mode.
1961
d6dc83a9
MV
1962 Deprecated SCM_ARRAY* macros.
1963
1964 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
1965 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
1966 version. Changed all uses.
1967 (scm_tc16_array, scm_i_tc16_array,
1968 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
1969 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
1970 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
1971 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
1972 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
1973 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
1974 SCM_ARRAY_V, SCM_I_ARRAY_V,
1975 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
1976 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
1977 scm_t_array, scm_i_t_array): Likewise.
1978 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
1979 Moved from unif.h to unif.c.
1980 (scm_c_array_rank): New.
1981 (scm_array_rank): Reimplement using it.
1982
1983 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
1984 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
1985 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
1986
dc91d8de
MV
19872005-01-11 Marius Vollmer <mvo@zagadka.de>
1988
1989 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
1990 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
1991 scm_c_generalized_vector_ref and scm_cvref, and
1992 scm_c_generalized_vector_set_x, respectively.
1993 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
1994 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
1995
1996 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
1997 former to latter and made public. Changed all uses.
1998 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
1999 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2000 (scm_i_shap2ra): New internal version of scm_shap2ra.
2001 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2002 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2003 (scm_ra_set_contp): Deprecated, changed all uses to
2004 scm_i_ra_set_contp.
2005 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2006
66d33784
MV
20072005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2008
b06f099d
MV
2009 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2010 Trotts!
2011
5d35ad81
MV
2012 * unif.c (scm_list_to_typed_array): Allow the specification of the
2013 upper bound as well. This is needed for empty arrays.
2014 (l2ra): Give needed number of elements in error message.
2015 (scm_i_print_array): Print length information for arrays that need
2016 it.
2017 (scm_i_read_array): Parse it.
2018
66d33784
MV
2019 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2020 scm_i_object_chars, scm_i_object_length): Brought back from the
2021 dead.
2022
d7d7d401
MV
20232005-01-10 Marius Vollmer <mvo@zagadka.de>
2024
74c58fce
MV
2025 * ramap.c: Replaced single-index uses of scm_array_set_x with
2026 scm_c_generalized_vector_set_x.
2027
d7d7d401
MV
2028 * unif.c (scm_array_rank, scm_array_dimensions,
2029 scm_shared_array_offset, scm_shared_array_increments,
2030 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2031 to simplify code and make it more general.
2032 (scm_shared_array_root): Work with all kinds of arrays, including
2033 naked vectors.
2034 (indices_to_pos): New.
74c58fce
MV
2035 (scm_make_shared_array): Use it instead of scm_aind; use handle
2036 for oldra.
2037
4475d3fe
KR
20382005-01-10 Kevin Ryde <user42@zip.com.au>
2039
2040 * posix.c (scm_mkstemp): Update docstring from manual.
2041
d3ddc95e
KR
2042 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2043
8c8491f5
MV
20442005-01-09 Marius Vollmer <mvo@zagadka.de>
2045
b89ecc6f
MV
2046 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2047 scm_i_uniform_vector_set_proc): New.
2048 (u8ref, u8set, s8ref, s8set, etc): New.
2049 (uvec_reffers, uvec_setters): New.
2050 (uvec_to_list): Use generic scm_array_handle_ref instead of
2051 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2052 (coerce_to_uvec, scm_c_uniform_vector_ref,
2053 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2054
2055 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2056 New.
2057 (scm_t_array_handle): Added ref, set, elements and
2058 writable_elements for fast inline operation of
2059 scm_array_handle_ref and scm_array_handle_set.
2060 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2061 and replaced with inline code that simply calls the ref/set
2062 members of the handle.
2063 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2064 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2065 New.
2066 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2067 and memoize_set.
2068 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2069 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2070 scm_bit_invert_x): Correctly multiply index with increment in the
2071 general case.
2072
8c8491f5
MV
2073 * unif.c (scm_array_handle_set): Correctly execute only one
2074 alternative. D'Oh!
2075 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2076 the array; this covers all cases with much simpler code.
2077
2078 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2079 as well.
2080
cd5d55c7
MV
20812005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2082
2083 * srfi-4.c (uvec_type): New.
2084 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2085 scm_c_uniform_vector_x): Use it to get concrete type.
2086
2087 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2088 fit the docs.
2089
2090 * unif.c (ra2l): Handle zero rank arrays.
2091 (scm_i_print_array): Print zero rank arrays specially.
2092 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2093 (scm_i_read_array): Allow zero rank arrays.
2094
a4aad74e
MV
20952005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2096
2097 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2098 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2099 and SCM_SET_HASHTAB_BUCKET.
2100
2101 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2102 Removed ref_stack field.
2103 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2104 of a print state. Use them everywhere instead of ref_stack.
2105
3a40d5e1
MV
2106 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2107
a4aad74e
MV
2108 * srfi-4.c: Include deprecation.h.
2109
2110 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2111 deprecated.c, eq.c
2112 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2113 (scm_vector_elements, scm_vector_writable_elements,
2114 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2115 unif.[hc].
2116 (SCM_SIMPLE_VECTOR_LOC): Removed.
2117 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2118 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2119 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2120 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2121 latter. Changed use in eq.c.
2122
f01fe441
MV
21232005-01-07 Marius Vollmer <mvo@zagadka.de>
2124
2125 Make the uniform vector routines also deal with one dimensional
2126 arrays.
2127
2128 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2129 SCM_SMOB_PREDICATE in this file.
2130 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2131 of the right type.
2132 (scm_is_uniform_vector): Likewise.
2133 (uvec_fast_ref): Made BASE param const.
2134 (uvec_writable_elements, uvec_elements): New.
2135 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2136 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2137 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2138 arrays.
2139 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2140 argument convention.
2141 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2142 checking.
2143 (scm_uniform_vector_length): Use uvec_length.
2144
2aaf5726
MV
21452005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2146
2147 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2148 scm_c_uniform_vector_size): Removed.
2149 (scm_array_handle_uniform_element_size): New.
2150
2151
2152 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2153 type of POS parameter to be signed, positions can be negative.
2154 (scm_array_handle_release): New, changed all uses of
2155 scm_t_array_handle to properly call it.
2156 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2157 Renamed former to latter, changed all uses.
2158
34ae52fc
MV
21592005-01-05 Marius Vollmer <mvo@zagadka.de>
2160
2161 Updated bitvector routines to also use scm_t_array_handles.
2162
2163 * unif.h (scm_bitvector_elements,
2164 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2165 deliver offset, length and increment to caller. Changed all uses.
2166 (scm_bitvector_release_elements,
2167 scm_frame_bitvector_release_elements,
2168 scm_bitvector_release_writable_elements,
2169 scm_frame_bitvector_release_writable_elements): Removed.
2170 (scm_array_handle_bit_elements,
2171 scm_array_handle_bit_writable_elements,
2172 scm_array_handle_bit_elements_offset): New.
2173 (scm_make_typed_array): The special value for non-initialized
2174 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2175 was a valid value to fill bitvectors with, so it can't really be
2176 specialed out.
2177
c4cb7628
KR
21782005-01-04 Kevin Ryde <user42@zip.com.au>
2179
2180 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2181 Reported by Bill Schottstaedt.
2182
0356881d
MV
21832005-01-02 Marius Vollmer <mvo@zagadka.de>
2184
2185 * sort.c (quicksort): Added INC parameter for non-contigous
2186 vectors.
2187 (quicksort1): New, for contigous vectors. Both functions are
2188 generated from the same code by including "quicksort.i.c".
2189 (scm_restricted_vector_sort_x): Call one of quicksort and
2190 quicksort1, depending on increment of vector.
2191 (scm_sort): Simply call scm_sort_x on a copy of the list or
2192 vector.
2193 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2194 size_t, added inc parameter.
2195 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2196 so that it doesn't leak.
2197 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2198 list or vector.
2199
2200 * ramap.c (scm_array_map_x): Do not try to convert fill value
2201 before filling, any necessary conversion is done while storing.
2202
2203 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2204 doing it inline.
2205
2206 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2207 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2208 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2209
2210 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2211 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2212 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2213 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2214 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2215 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2216 vector elements API or simple vector API, as appropriate. Removed
2217 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2218 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2219
2220 * srfi-4.h, srfi-4.c,
2221 srfi-4.i.c (scm_array_handle_uniform_elements,
2222 scm_array_handle_uniform_writable_elements,
2223 scm_uniform_vector_elements,
2224 scm_uniform_vector_writable_elements):
2225 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2226 scm_t_array_handle, deliver length and increment.
2227 (scm_array_handle_<foo>_elements,
2228 scm_array_handle_<foo>_writable_elements): New.
2229
2230 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2231 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2232
2233 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2234 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2235 scm_array_handle_set, scm_array_handle_elements
2236 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2237 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2238 scm_dimensions_to_uniform_array): Deprecated for real.
2239 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2240 snarfing wont allow a mismatch between C and Scheme arglists.
2241 (scm_make_shared_array, scm_enclose_array): Correctly use
2242 scm_c_generalized_vector_length instead of
2243 scm_uniform_vector_length.
2244
2245 * validate.h (SCM_VALIDATE_VECTOR,
2246 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2247 of SCM_VECTORP.
2248
2249 * weaks.h, weaks.c: Use new internal weak vector API from
2250 vectors.h.
2251
2252 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2253 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2254 'extra' to being regular sources.
2255 (noinst_HEADERS): Added quicksort.i.c.
2256 * quicksort.i.c: New file.
2257
2258 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2259 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2260 and reimplemented. Replaced all uses with scm_vector_elements,
2261 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2262 appropriate.
2263 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2264 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2265 SCM_SIMPLE_VECTOR_LOC): New.
2266 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2267 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2268 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2269 Removed.
2270 (scm_vector_copy): New.
2271 (scm_vector_elements, scm_vector_writable_elements): Use
2272 scm_t_array_handle, deliver length and increment. Moved to
2273 unif.h. Changed all uses.
2274 (scm_vector_release_elements,
2275 scm_vector_release_writable_elements,
2276 (scm_frame_vector_release_elements,
2277 scm_frame_vector_release_writable_elements): Removed.
2278 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2279 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2280 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2281 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2282 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2283 weak vectors.
2284
0336d18b
MV
22852004-12-29 Marius Vollmer <mvo@zagadka.de>
2286
2287 No longer use creators to specify the type of an array. Creators
2288 expose the fact that arrays are wrapped around vectors, but that
2289 might change.
2290
2291 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2292 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2293 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2294 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2295 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2296 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2297 uvec_proc_vars): Removed.
2298 (scm_i_generalized_vector_creator): Removed.
2299 (scm_i_generalized_vector_type): New.
2300
2301 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2302 scm_make_typed_array, scm_array_type, scm_list_to_array,
2303 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2304 (scm_array_creator): Removed.
2305 (scm_array_p): Deprecated second PROT argument.
2306 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2307 Deprecated, reimplemented in terms of scm_make_typed_array and
2308 scm_list_to_typed_array.
2309 (scm_i_proc_make_vector, scm_i_proc_make_string,
2310 scm_i_proc_make_bitvector): Removed.
2311 (type_creator_table, init_type_creator_table, type_to_creator,
2312 make_typed_vector): New.
2313 (scm_i_convert_old_prototype): Removed.
2314 (prototype_to_type): New.
2315 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2316 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2317 minor added clarity.
2318 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2319 instead of scm_make_uve.
2320 (tag_creator_table, scm_i_tag_to_creator): Removed.
2321 (tag_to_type): New.
2322 (scm_i_read_array): Use scm_list_to_typed_array instead of
2323 scm_list_to_uniform_array.
2324
277e8472
MV
23252004-12-27 Marius Vollmer <mvo@zagadka.de>
2326
32b26202
MV
2327 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2328 (scm_bitvector_writable_elements): New.
2329 (scm_bitvector_release, scm_bitvector_release_elements):
2330 Renamed former to latter. Added explicit call to
2331 scm_remember_upto_here_1.
2332 (scm_frame_bitvector_release,
2333 scm_frame_bitvector_release_elements): Renamed former to latter.
2334 (scm_bitvector_release_writable_elements,
2335 scm_bitvector_release_writable_elements): New.
2336 Changed all uses as required by the changes above.
2337
2338 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2339 scm_u8vector_elements, etc): Made return value "const".
2340 (scm_uniform_vector_writable_elements,
2341 scm_u8vector_writable_elements, etc): New.
2342 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2343 Renamed former to latter. Added explicit call to
2344 scm_remember_upto_here_1.
2345 (scm_frame_uniform_vector_release,
2346 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2347 (scm_uniform_vector_release_writable_elements,
2348 scm_frame_uniform_vector_release_writable_elements): New. Takes
2349 crown of longest identifier yet.
2350 Changed all uses as required by the changes above.
2351
277e8472
MV
2352 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2353 void.
2354 (scm_is_vector, scm_vector_p, scm_vector_length,
2355 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2356 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2357 scm_vector_move_left_x, scm_vector_move_right_x,
2358 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2359 (scm_vector_elements, scm_vector_release_elements,
2360 scm_vector_frame_release_elements, scm_vector_writable_elements,
2361 scm_vector_release_writable_elements,
2362 scm_vector_frame_release_writable_elements): New.
2363 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2364 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2365
2366 * ramap.c (scm_ramapc, scm_raeql): Use
2367 scm_c_generalized_vector_length instead of
2368 scm_uniform_vector_length.
2369 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2370 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2371
49c51610
MV
23722004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2373
2374 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2375 member for relocating debug frames.
2376 (scm_make_continuation): Set it.
2377
2378 * stacks.c (read_frame, read_frames, scm_make_stack,
2379 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2380 of continuations instead of calculating the offset ourselves.
2381 Relocate 'vect' member of scm_t_debug_frame.
2382
3b2ee265
KR
23832004-12-16 Kevin Ryde <user42@zip.com.au>
2384
2385 * ramap.c (scm_array_map_x): Check for at least one source argument.
2386
e120686a
KR
23872004-12-14 Kevin Ryde <user42@zip.com.au>
2388
2389 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2390 the C code so for the final call to the predicate procedure is a tail
2391 call, per SRFI-13 spec.
2392
680b5237
KR
23932004-12-10 Kevin Ryde <user42@zip.com.au>
2394
2395 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2396 recent revision to the reference manual.
2397
2398 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2399 with "%", C99 says it's well-defined.
2400
2401 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2402 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2403 bother trying to fit scm_from_ulong, not really worth the trouble if
2404 addresses are more than 4 bytes usually.
2405
446d320c
KR
24062004-11-30 Kevin Ryde <user42@zip.com.au>
2407
2408 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2409 arm32. Reported by Greg Troxel.
2410
f2654760
MV
24112004-11-14 mvo <mvo@zagadka.de>
2412
2413 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2414
2415 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2416
d550e35f
MV
24172004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2418
2419 Enclosed arrays are now their own smob. This has been done to
2420 make the code more explicit about them and to prepare for the time
f2654760
MV
2421 when generalized vectors include arbitrary one-dimensional
2422 arrays. (Uptonow, enclosed arrays have been recognized by their
2423 use of an array as their storage 'vector'. When all generalized
2424 vectors are allowed as storage, including one-dimensional arrays,
2425 this will no longer work.)
d550e35f
MV
2426
2427 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2428 New.
2429 (exactly_one_third, singp): Removed.
2430 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2431 scm_shared_array_offset, scm_shared_array_increments): Handle
2432 enclosed arrays explicitely.
2433 (scm_array_rank): Likewise. Also, do not return zero for
2434 non-arrays, signal an error instead since arrays with rank zero do
2435 exist.
2436 (scm_i_make_ra): New, for specifying the tag of the new array.
2437 (scm_make_enclosed_array): Use it.
2438 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2439 (scm_make_shared_array): Use scm_c_generalized_vector_length
2440 instead of scm_uniform_vector_length.
2441 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2442 (scm_i_cvref): New, doing the job of scm_cvref.
2443 (scm_cvref): Use scm_i_cvref.
2444 (scm_array_ref): Do not accept non-arrays when no indices are
2445 given. Use scm_i_cvref to do the actual access.
2446 ("uniform-array-set1"): Do not register.
2447 (scm_array_set_x, scm_uniform_array_read_x,
2448 scm_uniform_array_write): Handle enclosed arrays explicitly.
2449 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2450 handle enclosed arrays.
2451 (scm_array_to_list): Handle enclosed arrays explicitly.
2452 (rapr1): Removed.
2453 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2454 enclosed arrays.
2455 (scm_i_print_enclosed_array): New.
2456 (tag_proto_table, tag_creator_table): Renamed former to latter.
2457 Added "a" and "b" for strings and bitvectors, resp.
2458 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2459 latter. Tag "a" is in the table now, no need to handle it as a
2460 legacy tag.
2461 (scm_raprin1): Just call scm_iprin1.
2462 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2463 explicitly.
2464 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2465 Use scm_i_print_array as printer for scm_tc16_array.
2466
2ed34885
MV
24672004-11-10 Marius Vollmer <mvo@zagadka.de>
2468
823086c1
MV
2469 * ramap.c (cind): Changed second arg to be pointer to long instead
2470 of uniform vector.
2471 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 2472 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
2473 (scm_array_index_map_x): Likewise.
2474
2475 * unif.c: Changed all uses of scm_array_prototype to
2476 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2477 prototype is known.
2478 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2479 in terms of scm_uniform_vector_read_x and
2480 scm_uniform_vector_write, respectively. Strings and
2481 bitvector support has been dropped.
2482
2ed34885
MV
2483 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2484 needed files directly. Include config.h, <unistd.h> and <io.h>
2485 when available.
2486 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2487
2c72f253
MV
24882004-11-09 Marius Vollmer <mvo@zagadka.de>
2489
2490 * gh_data.c (gh_uniform_vector_length): Properly use
2491 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2492
3cc0a296
MV
24932004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2494
2495 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2496 New.
2497 (scm_i_uniform_vector_creator): Removed.
2498 (scm_i_generalized_vector_creator): New.
2499 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2500 handle generalized vectors, only uniform numeric vectors.
2501 (alloc_uvec): Do length check here...
2502 (make_uvec): ...but not here.
2503 (coerce_to_uvec): Use new generalized vector functions to handle
2504 all kinds of vectors in one go.
2505
2506 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2507 remaining scm_tc7_unused tags to get a neatly ordered list.
2508
2509 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2510 longer handle scm_tc7_bvect bitvectors.
2511
2512 * ramap.c: Use the new generalized vector functions to handle all
2513 vector like things.
2514
2515 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2516 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2517 scm_generalized_vector_length, scm_generalized_vector_ref,
2518 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2519 scm_is_generalized_vector, scm_c_generalized_vector_length,
2520 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2521 New.
2522
2523 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2524 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2525 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2526 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2527 scm_c_bitvector_length, scm_c_bitvector_ref,
2528 scm_c_bitvector_set_x, scm_bitvector_elements,
2529 scm_bitvector_release, scm_frame_bitvector_release,
2530 scm_tc16_bitvector, bitvector_free, bitvector_print,
2531 bitvector_equalp, count_ones, find_first_one): New.
2532 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2533 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2534 using the new C API for bitvectors and maybe count_ones or
2535 find_first_one, as appropriate.
2536 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2537 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2538 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2539 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2540 new functions from above.
2541 (scm_i_proc_make_vector, scm_i_proc_make_string,
2542 scm_i_proc_make_bitvector): Made non-static for use in
2543 scm_i_generalized_vector_creator.
2544 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2545 (scm_make_uve): Validate that the created object is a generalized
2546 vector.
2547 (scm_i_legacy_tag): Removed.
2548 (scm_i_print_array): Do it here.
2549 (scm_raprin1): Only print enclosed arrays.
2550
2551 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2552
c24d026b
MV
25532004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2554
1f2328fe
MV
2555 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2556 added portability.
2557
2558 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2559 for "space". Thanks to Bruce Korb!
2560
c24d026b
MV
2561 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2562 only after dest has been set. Thanks to Hyper Division!
2563
2564 * gh_data.c (gh_uniform_vector_length): Use
2565 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2566
d4ea47c8
MV
25672004-11-03 Marius Vollmer <mvo@zagadka.de>
2568
2569 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2570 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2571 SCM_SET_UVECTOR_LENGTH): Removed.
2572
236288e2
MV
25732004-11-02 Marius Vollmer <mvo@zagadka.de>
2574
9a5fa6e9 2575 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
2576 Thanks!
2577
2578 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2579 first and the second line of the SCM_DEFINE macro call, since old
2580 preprocessors cannot handle definitions that are split into two
2581 lines.
2582
2583 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2584 declarations.
2585
2586 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2587 scm_t_uint32 to fix the mismatch between the function declaration
2588 and definition.
2589
2590 * sort.c (quicksort): Don't use C99 variable declarations.
2591
2592 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2593 SCM_BOOL_F if no type matches.
2594
2595 * threads.c (thread_print): Cast a pointer to size_t when printing
2596 with scm_uintprint.
2597
2598 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
2599 defined.
2600 (scm_array_prototype): Deprecated.
2601
f738b51d
MV
26022004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2603
5d1015ec
MV
2604 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
2605 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
2606 more efficient access to the u32vector.
2607
034486df
MV
2608 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
2609 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
2610 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
2611
2612 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
2613 instead of the old-style dvectors.
2614
2615 * gh_data.c: Use new-style uniform arrays in place of old-style
2616 ones.
2617
2618 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
2619 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
2620
2621 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
2622 instead of old-sytle uvectors.
2623
2624 * convert.c, convert.i.c: Rewritten completely, using
2625 scm_any_to_u8vector, etc and other new-style uniform vector
2626 functions.
2627
2628 * random.c (scm_random_solid_sphere_x,
2629 scm_random_hollow_sphere_x): Do not validate vector argument, this
2630 is already done elsewhere.
2631
2632 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
2633 scm_any_to_u8vector, etc): New.
2634 (scm_uniform_element_size, scm_uniform_vector_length): Do no
2635 longer handle old-style uniform vectors.
2636
f738b51d
MV
2637 * read.c (scm_lreadr): Bugfix: include the last bit in the
2638 bit vector.
2639
5e9c05a1
MV
26402004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2641
327114a2
MV
2642 * unif.h, unif.c (scm_array_creator): New.
2643 (scm_i_get_old_prototype): New.
2644 (scm_array_prototype): use it to return old-style prototype, never
2645 return creators.
2646 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
2647 arg of SCM_UNDEFINED. The latter is wrong.
2648
5e9c05a1
MV
2649 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
2650 (make_uve): Removed.
2651 (scm_i_proc_make_vector, scm_i_proc_make_string,
2652 scm_i_proc_make_u1vector): New.
2653 (scm_init_unif): Initialize them.
2654 (scm_i_convert_old_prototype): New.
2655 (scm_make_uve): Use it to get the creator procedure. Removed all
2656 old code that created old-style uniform vectors.
2657 (scm_array_p): Handle generic vectors.
2658 (scm_dimensions_to_uniform_array): Do not fill new array with
2659 prototype when that is a procedure.
2660 (scm_list_to_uniform_array): Also accept a list of lower bounds as
2661 the NDIM argument.
2662 (scm_i_print_array): Print rank for shared or non-zero-origin
2663 vectors.
2664 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
2665 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
2666 which I do not understand yet.
2667 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 2668
5e9c05a1
MV
2669 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
2670 (iflo2str): Use icmplx2str for complex numbers.
2671
2672 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
2673 scm_i_uniform_vector_prototype): Removed.
2674 (scm_i_uniform_vector_creator): New.
2675 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
2676 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
2677 Updated all tables and generic functions to support them.
2678 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
2679 (scm_init_srfi_4): Initialize them.
2680
2681 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
2682 sizeof(CTYPE) as explained in the comment.
2683
2684 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 2685 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
2686 'i' and 'e' between introducing numbers and uniform vectors. Do
2687 not call scm_i_read_homogenous_vector, since that is also handled
2688 by scm_i_read_array now.
2689
f984af07
MV
26902004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2691
2692 First cut at integrating uniform vectors from srfi-4 with the rest
2693 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
2694 vector. The plan is to gradually replace one type after the other
2695 until none is left and then to consider general cleanups and
2696 optimizations.
2697
2698 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
2699
2700 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
2701 scm_uniform_vector_ref, scm_uniform_vector_set_x,
2702 scm_uniform_vector_to_list, scm_is_uniform_vector,
2703 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
2704 scm_uniform_vector_elements, scm_uniform_vector_element_size,
2705 scm_uniform_vector_release): New.
2706 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
2707 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
2708 from unif.h, unif.c and extended to handle both the old and new
2709 uniform vectors.
2710
2711 * tags.h (scm_tc7_byvect): Commented out.
2712
2713 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
2714 the former to the latter.
2715 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
2716 srfi-4.h, srfi-4.c.
2717 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
2718 (scm_array_p, scm_array_rank, scm_array_dimensions,
2719 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
2720 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
2721 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
2722 vectors. Removed code for scm_tc7_byvect.
2723 (scm_dimensions_to_uniform_array): Fill array with 0 when
2724 prototype is #\nul.
2725 (scm_i_print_array_dimension, scm_i_legacy_tag,
2726 scm_i_print_array): New.
2727 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
2728 for scm_tc7_byvect.
2729
2730 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
2731 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
2732 uniform vectors. Removed code for scm_tc7_byvect
2733
2734 * print.c (iprin1): Removed code for scm_tc7_byvect.
2735 * objects.c (scm_class_of): Likewise.
2736 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
2737 * gc-card.c (scm_i_sweep_card): Likewise.
2738 * evalext.c (scm_self_evaluating_p): Likewise.
2739 * eq.c (scm_equal_p): Likewise.
2740
2741 * gh_data.c (gh_chars2byvect): Reimplemented with
2742 scm_make_s8vector.
2743 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
2744
2745 * srfi-4.c (take_uvec): New.
2746 (alloc_uvec): Use it.
2747 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
2748
2749 * random.c (vector_scale, vector_scale_x): Renamed former to the
2750 latter, since it modifies its argument.
2751 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
2752 Do not use scm_universal_vector_length for non-uniform vectors.
2753 Use scm_f64vector_elements to access innards of uniform vectors.
2754
2755 * convert.i.c: Convert srfi-4 style uniform vectors when
2756 requested.
2757 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
2758 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
2759
79d52182
MV
27602004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2761
2762 * numbers.h, numbers.c (scm_i_print_double): New.
2763
2764 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
2765 ../srfi/ but heavily modified.
2766 * Makefile.am: Add them in all the right places.
2767 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
2768 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
2769 '#u', and '#s'.
2770
2771 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
2772 and made non-static. Changed all uses.
2773
6191ccec
MV
27742004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2775
e64e80b0
MV
2776 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
2777 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
2778 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
2779 scm_uintprint to print unsigned integers, raw heap words, and
2780 adresses, using a cast to scm_t_bits to turn pointers into
2781 integers.
2782
2783 * unif.c: Include "libguile/print.h".
2784
c90ac3a8
MV
2785 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
2786 scm_t_intmax values.
2787 (scm_uint2str): New, for scm_t_uintmax.
2788 (scm_iint2str): Argument type changed to scm_t_intmax,
2789 reimplemented in terms of scm_uint2str.
2790
2791 * print.c, print.h (scm_uintprint): New, for printing
2792 scm_t_uintmax values.
2793 (scm_intprint): Argument type changed to scm_t_intmax.
2794
77c2594f
MV
2795 * sort.c (quicksort, scm_merge, scm_merge_list_x,
2796 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
2797 strategic places so that the loops can be interrupted.
2798
6191ccec
MV
2799 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
2800 "-I$(top_srcdir)/libguile-ltdl".
2801 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
2802 "../libguile-ltdl/libguile-ltdl.a".
2803
2804 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
2805 all references to scm_lt_* with just lt_*. Include <ltdl.h>
2806 instead of <libguile-ltdl.h>.
2807
77600f3e
MV
28082004-10-20 Marius Vollmer <mvo@zagadka.de>
2809
2810 * sort.c (quicksort): Copy pivot out of the array while
2811 constructing the partitions; it could get overwritten otherwise.
2812 Because of the ultimate insertion sort, this bug did not cause
2813 quicksort to fail, it just put all the burdon on the insertion
2814 sort and was thus very slow. Thanks to Rolan Orre for reporting
2815 the slowness!
2816
5000379b
MV
28172004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2818
192cd792
MV
2819 * numbers.c (scm_i_range_error): New.
2820 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
2821 scm_out_of_range.
2822
2823 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 2824 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
2825
2826 * unif.c (scm_array_p): When no prototype is given, explicitely
2827 test for allowable types, do not simply return true. Thanks to
2828 Roland Orre for reporting this!
2829
5000379b
MV
2830 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
2831
2832 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
2833 segment to scm_max_segment_size.
2834
497eb0b7
HWN
28352004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
2836
1367aa5e
HWN
2837 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
2838
497eb0b7
HWN
2839 * inline.h (scm_double_cell): abort if GC running.
2840 (scm_cell): idem.
2841
aef0bdb4
MV
28422004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2843
2844 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
2845 pos == 0.
2846
2847 Keywords no longer store a 'dash symbol'. Instead, they store a
2848 symbol with their real name.
2849
2850 * keywords.h, keywords.c, deprecated.h, deprecated.c
2851 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
2852 terms of scm_is_keyword and scm_keyword_dash_symbol.
2853
2854 * keywords.h, keywords.c, discouraged.h, discouraged.c
2855 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
2856 scm_c_make_keyword): Discouraged.
2857
2858 * keywords.h, keywords.c (scm_symbol_to_keyword,
2859 scm_keyword_to_symbol): Implemented in C.
2860 (scm_is_keyword, scm_from_locale_keyword,
2861 scm_from_locale_keywordn): New.
2862
2863 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
2864
2865 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
2866 scm_from_locale_keyword instead of scm_c_make_keyword.
2867
2868 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
2869 better error message.
2870
2871 * deprecated.c: Include discouraged.h and keywords.h.
2872
2873 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
2874 reading '#:' or ':'. See NEWS for consequences.
2875
818deb11
MV
28762004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2877
43c25626
MV
2878 * read.c (scm_lreadr): Revert change from 2004-09-22: string
2879 literals are now read-write again (until SCM_STRING_CHARS is
2880 removed).
2881
2882 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
2883 strings with an error message that blames SCM_STRING_CHARS.
2884
2885 * options.c (change_option_setting): Use scm_car instead of
2886 explicit type check plus SCM_CAR.
2887
2888 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
2889 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
2890 (scm_iprin1): Use them instead of the previoulsy hardcoded
2891 strings.
2892 (scm_init_print): Initialize them.
2893
2894 * backtrace.c (display_frame_expr): Do not remove control
2895 characters from the final string. Print it directly using
2896 scm_display.
2897
818deb11
MV
2898 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
2899 Thanks to Roland Orre!
2900
d748089e
KR
29012004-09-29 Kevin Ryde <user42@zip.com.au>
2902
2903 * regex-posix.c (scm_regexp_exec): Correction to last change, should
2904 be whole original string in match struct, not offsetted substring.
2905
0ff7e3ff
HWN
29062004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
2907
2908 * gc.c (scm_gc_unprotect_object): abort if called during GC.
2909
ad7de4b8
MV
29102004-09-24 Marius Vollmer <mvo@zagadka.de>
2911
2edf319f
MV
2912 * Makefile.am (EXTRA_DIST): Added gettext.h.
2913
d180337b
MV
2914 * smob.c, smob.h (scm_assert_smob_type): New.
2915
05d7cf89 2916 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
2917 Include GUILE_CFLAGS.
2918 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
2919 now.
2920 (libpath.h): Put GUILE_CFLAGS in the build-info.
2921
c9fedf8a
MV
29222004-09-23 Marius Vollmer <mvo@zagadka.de>
2923
2924 * print.h (scm_print_state): Added highlight_objects.
2925 * print.c (make_print_state, scm_free_print_state): Initialize it
2926 to SCM_EOL.
2927 (scm_iprin1): Wrap output in '{...}' when object is contained in
2928 highlight_objects.
2929
2930 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
2931 scm_backtrace_with_highlights): New. Set highlight_objects of
2932 printstate.
2933
2934 * error.c (scm_error_scm): Document new meaning of data/rest
2935 argument for out-of-range and wrong-type-arg errors.
2936 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
2937 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
2938 exception so that it gets highlighted in the backtrace.
2939 Don't talk about "argument" when not giving a position.
2940
2941 * throw.c (handler_message): The rest argument is the fourth
2942 argument, not everything after the third. Call
2943 scm_display_backtrace_with_highlights, passing the rest argument
2944 when appropriate.
2945
d5ac9b2a
MV
29462004-09-22 Marius Vollmer <mvo@zagadka.de>
2947
2948 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
2949 <bruno@clisp.org>:
2950
2951 * i18n.c: Handle --disable-nls (thanks Bruno).
2952
2953 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
2954 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
2955
2956 * i18n.c (scm_i_to_lc_category): New name and export. Support all
2957 LC categories.
05d7cf89 2958 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
2959
2960 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
2961 scm_bind_textdomain_codeset): Make wrappers similar to C function
2962 they wrap.
2963
2964 * i18n.h: New file.
2965 * i18n.c: New file.
2966 * gettext.h: New file, taken from GNU gettext.
2967 * init.c: Include libguile/i18n.h.
2968 (scm_init_guile_1): Add call to scm_init_i18n().
2969 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
2970 (DOT_X_FILES): Add i18n.x.
2971 (DOT_DOC_FILES): Add i18n.doc.
2972 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
2973 (modinclude_HEADERS): Add i18n.h.
2974
d2e53ed6
MV
29752004-09-22 Marius Vollmer <mvo@zagadka.de>
2976
2cdfe016
MV
2977 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
2978
d2e53ed6
MV
2979 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
2980 discouraged.h. Replaced all uses with scm_is_pair.
2981 (SCM_I_CONSP): New name for SCM_CONSP.
2982
2983 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
2984 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
2985 scm_cadr, etc): New.
2986 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
2987 uses with scm_is_null.
5dd82006 2988
d2e53ed6
MV
2989 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
2990 instead of explicit code.
5dd82006 2991
5dfdf243
MV
29922004-09-22 Marius Vollmer <mvo@zagadka.de>
2993
b50c53e5
MV
2994 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2995 Reworded logic a bit so that #f is returned immediately when s1 is
2996 too short to contain s2.
2997
5dfdf243 2998 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 2999 zero-terminated locale string before matching against it.
5dfdf243
MV
3000
3001 * strings.h, strings.c (scm_substring_read_only,
3002 scm_c_substring_read_only, scm_i_substring_read_only): New.
3003 (RO_STRING_TAG, IS_RO_STRING): New.
3004 (scm_i_string_writable_chars): Bail on read-only strings.
3005
3006 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3007 literals, thus making them read-only as specified by R5RS.
3008
22ab5ba3
MV
30092004-09-22 Marius Vollmer <mvo@zagadka.de>
3010
3011 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3012 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3013
2663421c
MV
30142004-09-21 Marius Vollmer <mvo@zagadka.de>
3015
0d83cb90
MV
3016 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3017 numbers.c.
3018 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3019 Thanks to Andreas Vögele!
0d83cb90 3020
2663421c
MV
3021 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3022 just on a line of its own.
3023
3024 * srfi-13.c (scm_string_any, scm_string_every,
3025 scm_string_tabulate, string_upcase_x, string_down_case_x,
3026 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3027 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3028 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3029 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3030 indices, which can also be negative.
3031
b00b73f9
MV
30322004-09-20 Marius Vollmer <mvo@zagadka.de>
3033
3034 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3035
3036 * threads.c (scm_threads_mark_stacks): Call
3037 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3038 only used once.
3039
adba74f3
HWN
30402004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3041
05d7cf89 3042 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3043 Bugfix: when subtracting unsigned values, make sure that result
3044 does not wrap.
3045
f6de32c8
KR
30462004-09-09 Kevin Ryde <user42@zip.com.au>
3047
3048 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3049 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3050 by Andreas Vögele.
f6de32c8 3051
e548be5f
MV
30522004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3053
eb8d0af1
MV
3054 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3055
e548be5f
MV
3056 * eq.c (real_eqv): Pretend that all NaNs are equal.
3057
3058 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3059
e7acba81
MV
30602004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3061
874fbad1
MV
3062 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3063 use size_t for some locals instead of int.
3064
e7acba81
MV
3065 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3066 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3067 (skip_scsh_block_comment): Use scm_input_error instead of
3068 scm_misc_error in case of EOF.
3069
5de12658
KR
30702004-09-07 Kevin Ryde <user42@zip.com.au>
3071
3072 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3073 Bug report by Bill Schottstaedt.
3074
3075 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3076 column.
3077 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3078
3079 * posix.c (scm_access): Update docstring per manual.
3080
3081 * posix.c (scm_nice): Correction to error detection. Reported by
3082 Matthias Koeppe.
3083
3084 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3085 throw error before unlocking mutex with SCM_ALLOW_INTS.
3086
e227addf
KR
30872004-09-06 Kevin Ryde <user42@zip.com.au>
3088
3089 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3090 available. This also gets around CLK_TCK being absent when
3091 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3092
edea856c
SJ
30932004-09-03 Stefan Jahn <stefan@lkcc.org>
3094
3095 * threads.c (scm_threads_mark_stacks): Fixed local variable
3096 definitions.
3097
e7acba81 3098 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3099 local variable definitions.
3100
3101 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3102 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3103 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3104 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3105 scm_makfrom0str().
3106
874fbad1 3107 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3108 part.
3109
3110 * numbers.c (scm_init_numbers): Removed check_sanity() call
3111 inside GUILE_DEBUG. The function has been removed somewhen...
3112
3113 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3114 MinGW32 because it conflicts with its pthread headers.
3115
d9eb2d67
MV
31162004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3117
3118 * strings.c (SCM_STRINGP): Accept all strings.
3119 (SCM_STRING_CHARS): Reject shared substrings here.
3120
3121 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3122 the Copyright years.
3123
c495c342
KR
31242004-08-27 Kevin Ryde <user42@zip.com.au>
3125
3126 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3127 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3128 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3129
57aa5515
MV
31302004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3131
3132 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3133 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3134 scm_i_symbol_is_interned, scm_i_mem2symbol,
3135 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3136
ce25760f
MV
31372004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3138
19ff6ffc
MV
3139 * srfi-13.c: First cut at thread-safeness and proper use of
3140 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3141 been inserted. Made sure that no internal string pointer is used
3142 across a SCM_TICK or a possible GC.
3143
ce25760f
MV
3144 * script.c (scm_compile_shell_switches): Use
3145 scm_from_locale_string instead of scm_makfrom0str.
3146
3147 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3148 always been.
3149
c5080b51
MV
31502004-08-25 Marius Vollmer <mvo@zagadka.de>
3151
3152 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3153 strop.c.
3154
3155 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3156 * strop.h, strop.c: Removed, they are now empty.
3157 * Makefile.am: Updated for new and removed files.
3158
3159 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3160 to scm_string_to_symbol.
3161
3162 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3163 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3164 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3165 charset instead of libc functions.
3166
3167 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3168 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3169 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3170 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3171 instead of explicit code.
3172
3173 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3174 "srfi-13.h" instead of "strop.h".
3175
3176 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3177 scm_init_srfi_14. Do not call scm_init_strop.
3178
4b0d27f2
MV
31792004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3180
3181 * numbers.c (scm_inf_p): Synced docstring back from manual.
3182
3ece39d6
MV
31832004-08-22 Marius Vollmer <mvo@zagadka.de>
3184
3185 * strings.c (get_str_buf_start): New helper function.
3186 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3187 scm_i_string_char, scm_i_string_writable_chars): Use it.
3188 (scm_i_substring_copy): Make START argument optional for C
3189 callers, for upcoming SRFI-13 integration.
3190
31912004-08-21 Marius Vollmer <mvo@zagadka.de>
3192
3193 From Richard Todd, Thanks!
3194
3195 * script.c (scm_compile_shell_switches): added '-L' switch to add
3196 to the %load-path.
3197
5fa0939c
DH
31982004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3199
3200 * eval.c (unmemoize_exprs): When dropping internal body markers
3201 from the output during unmemoization, also drop those that are not
3202 immediately at the beginning of a body.
3203
2146fdeb
MV
32042004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3205
c1f54b3d
MV
3206 * eval.c (scm_lookupcar1): Report "Variable used before given a
3207 value" insetad of an "Unbound" one for variables that are found
3208 but still contain SCM_UNDEFINED.
2146fdeb
MV
3209
3210 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3211 expects a null-terminated string in the locale encoding, but
3212 scm_i_string_writable_chars doesn't give that. Fixed by letting
3213 mkstemp modify a locale version of the tmpl argument and copying
3214 the result back into tmpl.
3215
3216 * strop.c (scm_substring_move_x): Store into str2, not str1.
3217
d4f76919
KR
32182004-08-20 Kevin Ryde <user42@zip.com.au>
3219
3220 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3221 to modify the input string.
3222
b5247a6b
MV
32232004-08-19 Marius Vollmer <mvo@zagadka.de>
3224
3225 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3226 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3227 scm_c_symbol_length.
3228
f26b9395
MV
32292004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3230
3231 New string implementation, with copy-on-write strings and
3232 mutation-sharing substrings, and a new internal string API.
3233 Symbols can now share memory with strings.
3234
3235 * tags.h (scm_tc7_stringbuf): New tag.
3236
3237 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3238 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3239 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3240 uses.
3241 (scm_i_make_string, scm_c_make_string): New, to replace
3242 scm_allocate_string. Updated all uses.
3243 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3244 SCM_STRING_LENGTH): Deprecated.
3245 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3246 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3247 Discouraged. Replaced all uses with scm_from_locale_string or
3248 similar, as appropriate.
3249 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3250 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3251 scm_substring_shared, scm_substring_copy): New.
3252
3253 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3254 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3255 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3256 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3257 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3258 Deprecated.
3259 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3260 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3261 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3262 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3263 Updated all uses.
3264 (scm_gensym): Generate only the number suffix in the buffer, just
3265 string-append the prefix.
3266
3267 * error.c (scm_memory_error): Do not try to throw, just abort.
3268 Throwing will not work anyway.
3269
3270 * gh.h, gh-data.c (gh_set_substr): Made src const.
3271
3272 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3273 (scm_mode_bits): Use it.
3274 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3275 a vector normally and fill that instead of consing a list with a
3276 blocked GC.
3277
3278 * read.c (scm_i_casei_streq): New, for counted strings.
3279
3280 * threads.c (gc_section_count): Removed, thread-sleeping can not
3281 be nested.
3282 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3283 admin mutex so that we can be put to sleep by other threads while
3284 blocking on that mutex. Lock all the heap mutex of all threads,
3285 including ourselves.
3286 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3287 call scm_i_enter_guile.
3288 (scm_thread_mark_stacks): Expect all threads to be suspended.
3289
3290 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3291 scm_gc_mallocated, for now.
3292 (scm_init_storage): Initialize it.
3293 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3294
3295 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3296 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3297 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3298 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3299
cd505b38
MV
3300 * strop.c (scm_string_copy): Use scm_c_substring to get a
3301 copy-on-write string.
3302
8a807b26
KR
33032004-08-18 Kevin Ryde <user42@zip.com.au>
3304
3305 * arbiters.c (FETCH_STORE): New macro.
3306 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3307 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3308 scm_try_arbiter and scm_release_arbiter.
3309 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3310 for speed on i386, otherwise using mutex.
3311
3312 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3313 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3314 exact and inexact is #f.)
3315
3316 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3317 to get thread safety of scm_ttyname.
3318
3319 * ports.c (ttyname): Remove prototype, unused.
3320
d6cd4c36 3321 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3322 Reported by Michael Tuexen.
d6cd4c36 3323
fa0c0a4b
MV
33242004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3325
3326 * load.c (scm_init_load_path): Do not pass NULL to
3327 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3328 not set. Thanks to Bill Schottstaedt.
3329
70f7ee41
MV
33302004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3331
3332 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3333 locale strings instead of accessing their internals.
3334 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3335 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3336 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3337
3338 * simpos.c (scm_system): Convert SCM strings to locale strings
3339 instead of accessing their internals.
3340
3341 * script.c (scm_compile_shell_switches): Convert version to locale
3342 string before printing it.
3343
3344 * rdelim.c (scm_read_delimited_x): Avoid
3345 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3346 of scm_from_long for the returned number of read characters.
3347
3348 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3349 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3350
3351 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3352 Use them instead of SCM_SYSCALL when one or two strings need to be
3353 converted into locale strings.
3354 (my_rename): New, gathers platform dependent code for renaming.
3355 (scm_rename): Use it.
3356 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3357 strings instead of accessing their internals.
3358 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3359 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3360 SCM_STRING_LENGTH.
3361
3362 * extensions.c (load_extension): Convert lib and init to locale
3363 strings instead of accessing the internals directly.
3364 (scm_c_load_extension): Use scm_from_locale_string instead of
3365 scm_makfrom0str.
3366
3367 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3368 scm_fdes_to_port, but take mode bits directly instead of as a C
3369 string.
3370 (scm_i_fdes_to_port): Implement using above.
3371 (scm_open_file): Use scm_i_fdes_to_port together with
3372 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3373 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3374 with scm_i_mode_bits to avoid accessing internals of SCM string
3375 from C.
3376
3377 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3378 SCM string as argument.
3379
3380 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3381 bits directly instead of C string.
3382 (scm_void_port): Implement using above.
3383 (scm_sys_make_void_port): Use scm_i_void_port together with
3384 scm_i_mode_bits to avoid accessing internals of SCM string.
3385
3386 * strings.h, strings.c (scm_i_get_substring_spec): New.
3387
3388 * socket.c, rw.c, deprecated.h, validate.h
3389 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3390 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3391 scm_to_locale_string, etc.
3392 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3393 above, plus scm_i_get_substring_spec.
3394
3395 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3396 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3397 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3398 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3399 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3400 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3401 with more explicit scm_remember_upto_here_1, etc, or introduced
3402 them in the first place.
3403
3404 * posix.c (WITH_STRING): New helper macro. Use it where one
3405 locale string is needed for a short piece of code.
3406 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3407 when one locale string is needed.
3408 (scm_mkstemp): Convert tmpl to a locale string.
3409 (scm_putenv): Rewritten to use only C strings.
3410 (scm_setlocale, scm_crpt): Convert argument strings to locale
3411 strings.
3412
34132004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3414
3415 * load.c (scm_primitive_load_path): Do not check for absolute
3416 filenames when scm_sys_search_load_path returns false, which will
3417 return absolute filenames unchanged.
3418
bb26cc2d
MV
34192004-08-11 Marius Vollmer <mvo@zagadka.de>
3420
3421 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3422 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3423 of an alist. Thanks to Matthias Koeppe!
3424
02573e4c
MV
34252004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3426
3427 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3428 Moved from string.h to deprecated.h.
3429
3430 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3431
f9751e86 3432 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
3433 SCM_I_MAKE_STRING_TAG, changed all uses.
3434 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3435 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3436 respectively. For a short time, the old names are still there as
3437 aliases. Not all uses have been changed yet, but the ones in
3438 strings.c have.
3439 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3440 SCM_T_BITS_MAX.
3441 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3442 scm_take_locale_string, scm_take_locale_stringn,
3443 scm_to_locale_string, scm_to_locale_stringn,
3444 scm_to_locale_stringbuf): New.
3445 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3446 deprecated.[hc]. Implemented in terms of the new functions above.
3447 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3448 scm_makfrom0str): Reimplemented in terms of the new functions from
3449 above. They will be discouraged shortly.
3450 (scm_substring): Do not use scm_mem2string.
3451 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3452 to replace similar code from posix.c, simpos.c, and dynl.c.
3453 (scm_string_append): Use memcpy instead of explicit loop. Do not
3454 use register keyword. Use plain 'char' instead of 'unsigned
3455 char'.
3456
3457 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3458 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3459
3460 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3461 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3462 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3463 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3464
3465 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3466 string. This avoids a conversion round-trip.
3467
3468 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3469 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3470 SCM_I_STRING_LENGTH, respectively.
3471 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3472
3473 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3474 of a string, call scm_display on the string itself.
3475
3476 * dynwind.c, dynwind.h (scm_frame_free): New.
3477
3478 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3479 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3480 Replaced uses of SCM_STRING_CHARS with proper uses of
3481 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3482 Replaced scm_mem2string with scm_from_locale_string.
3483
3484 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3485 Removed, replaced all uses with scm_i_allocate_string_pointers.
3486
3487 * load.h, load.c (scm_internal_parse_path): Removed.
3488 (scm_parse_path): Use scm_string_split to do the work.
3489 (scm_init_load_path): Use scm_parse_path instead of
3490 scm_internal_parse_path.
3491 (scm_search_path): Rewritten string handling part of the code in
3492 terms of scm_to_locale_stringbuf and so that it is thread safe.
3493
3494 * error.c (scm_error_scm): Throw directly instead of calling
3495 scm_error, this avoids the back and forth conversion of SUBR and
3496 MESSAGE and also plugs a memory leak.
3497 (scm_error): Call scm_error_scm.
3498
3499 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3500 (display_header): Print FNAME when it is true, not
3501 merely when it is a string.
3502
3503 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3504 unceremoniously. They were unused by Guile itself, and external
3505 use should stop immediately.
3506
3507
409eb4e5
MV
35082004-08-10 Marius Vollmer <mvo@zagadka.de>
3509
3510 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3511 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3512 deprecated versions installed in deprecated.h and deprecated.c.
3513 Changed all uses.
3514
a00eaf19
RB
35152004-08-06 Rob Browning <rlb@defaultvalue.org>
3516
3517 * net_db.c (scm_resolv_error): don't cause an exception while
3518 trying to throw an exception -- call scm_misc_error with correct
3519 arguments. The previous arguments needed a format escape that
3520 wasn't in any of the format strings.
3521
bcb88c93
KR
35222004-08-06 Kevin Ryde <user42@zip.com.au>
3523
8f094b97
KR
3524 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3525 so as not to depend on signedness of plain char. For byvect range
3526 check, throw out-of-range rather than wrong-type-arg.
3527
bcb88c93
KR
3528 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3529 signed byte range checks by using scm_to_schar and scm_from_schar,
3530 don't want to depend on signedness of C char.
3531
29e61124
KR
35322004-08-05 Kevin Ryde <user42@zip.com.au>
3533
3534 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3535 SCM_DEFER_INTS.
3536 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3537 guaranteed if multiple threads compete to unlock.
3538 Update docstrings per doc/ref/api-scheduling.texi.
3539
99de794f
KR
3540 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3541 stat on the filename, to be certain a file rename can't mean we get
3542 info on one filesystem object but open another. This fstat usage is
3543 similar to Emacs copy-file.
3544
29e61124
KR
3545 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3546
3547 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3548 SIGINT and SIGQUIT, since those values are ints.
3549
759aa8f9
MV
35502004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3551
7241f213
MV
3552 * num2integral.i.c, num2float.i.c: Removed.
3553 * Makefile.am (noinst_HEADERS): Updated.
3554
f9656a9f
MV
3555 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3556 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
3557 (scm_complex_p): New, export as "complex?" to Scheme.
3558 (scm_number_p): Export as "number?" to Scheme.
3559 (scm_is_complex, scm_is_number): New.
3560 (scm_c_make_rectangular, scm_c_make_polar): New.
3561 (scm_make_rectangular, scm_make_polar): Use above.
3562 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3563 New.
3564 (scm_make_complex): Discouraged by moving to discouraged.h and
3565 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3566
759aa8f9
MV
3567 * discouraged.h, discouraged.c, numbers.c, numbers.h
3568 (scm_is_rational): New.
3569 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3570 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3571 Removed prototypes.
3572 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3573 Discouraged by moving to discouraged.h and discouraged.c.
3574 Replaced all uses with scm_from_double.
3575 (scm_num2float, scm_num2double): Discouraged by moving prototype
3576 to discouraged.h and rewriting in terms of scm_to_double.
3577 Replaced all uses with scm_to_double.
3578 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3579 explicit code.
3580 (scm_from_double): Do not implement in terms of scm_make_real, use
3581 explicit code.
3582
531bf3e6
MV
35832004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3584
759aa8f9
MV
3585 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3586
531bf3e6
MV
3587 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3588 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3589
3590 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3591 Renamed to SCM_I_* in order to avoid collisions with the versions
3592 defined in deprecated.h.
3593
3594 * discouraged.h, discouraged.c: New files.
3595
3596 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
3597 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
3598 deprecated to being discouraged by moving to discouraged.h.
3599
3600 * numbers.h, numbers.c, discouraged.h, discouraged.c
3601 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
3602 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
3603 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
3604 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
3605 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
3606 scm_num2ulong_long): Discouraged by moving to discouraged.h and
3607 discouraged.c and reimplementing in terms of scm_from_* and
3608 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
3609 functions.
3610
3611 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
3612 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
3613 scm_i_size2big, scm_i_ptrdiff2big): Removed.
3614 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
3615 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
3616 explicit code.
3617
5ec82e96
KR
36182004-08-02 Kevin Ryde <user42@zip.com.au>
3619
3620 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
3621 and current usage and migration.
3622
58f28989
KR
36232004-07-31 Kevin Ryde <user42@zip.com.au>
3624
3625 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
3626 it's not thread safe.
3627 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
3628 advantage of this.
3629 * fports.c (scm_open_file): Use scm_strerror likewise.
3630 * filesys.c (scm_stat, scm_lstat): Ditto.
3631
3632 * filesys.c (scm_copy_file): Avoid fd leak when destination file
3633 cannot be opened.
3634
3635 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
3636 update, for thread safety.
3637 (gensym_counter): Move into scm_gensym which is its only user.
3638 (scm_init_symbols): No need to explicitly initialize gensym_counter.
3639
03696aab
MV
36402004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3641
51fdb325
MV
3642 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
3643 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
3644 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
3645 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
3646 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
3647 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
3648 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
3649 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
3650 defined in terms of scm_to_signed_integer, etc, but in terms of
3651 scm_to_int8, etc.
3652
3653 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
3654
03696aab
MV
3655 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
3656 no longer used.
3657
3658 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
3659 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
3660
3661 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
3662 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
3663 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
3664 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
3665 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
3666 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
3667 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
3668
3669 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
3670 the functions below.
3671
3672 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
3673 conv-uinteger.i.c.
3674
3675 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
3676 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
3677 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
3678 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
3679 scm_from_uint64): Turned from macros into proper functions.
3680 (scm_to_signed_integer, scm_to_unsigned_integer,
3681 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
3682 conv-integer.i.c and conv-uinteger.i.c, as well.
3683
3684 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
3685 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
3686 the limits. Those are always defined.
3687
1f15779e
KR
36882004-07-29 Kevin Ryde <user42@zip.com.au>
3689
3690 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
3691
48360eb3
KR
36922004-07-28 Kevin Ryde <user42@zip.com.au>
3693
3694 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
3695 safety.
3696
c3f3c841
KR
3697 * unif.c (scm_array_set_x): For svect, use scm_num2short for
3698 consistency with other vector types and to get arg and func name into
3699 error message.
3700
c82f8ed6
MV
37012004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3702
3703 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
3704 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
3705 scm_from_bool, respectively.
3706 (SCM_NINUMP): Added.
3707
3708 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
3709 deprecated.h. Replaced all uses with scm_is_eq.
3710
317b4c4a
KR
37112004-07-24 Kevin Ryde <user42@zip.com.au>
3712
3713 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
3714 * posix.c (scm_crypt): Use it to protect static data in crypt().
3715
e11e83f3
MV
37162004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3717
3718 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 3719 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
3720 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
3721 versions to deprecated.h and deprecated.c. Changed all uses to
3722 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
3723 scm_from_*, as appropriate.
3724
3725 * dynwind.c (scm_i_dowinds): Removed unused code that would call
3726 the unexisting scm_cross_dynwind_binding_scope for inums on the
3727 windlist.
3728
a55c2b68
MV
37292004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3730
3731 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 3732 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
3733 byte-wise address to a SCM integer. Changed all uses.
3734 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
3735 scm_to_ipv6 and added type and range checking, for converting from
3736 an IPv& byte-wise address to a SCM integer. Changed all uses.
3737 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
3738 is now done by scm_to_ipv6.
3739
3740 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
3741 not accept inexact integers.
3742
3743 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
3744 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
3745 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
3746 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
3747 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
3748 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
3749 fixnum/bignum distinction visible. Changed all uses to
3750 scm_to_size_t or similar.
3751
37522004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3753
3754 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
3755
48a06bd5
KR
37562004-07-10 Kevin Ryde <user42@zip.com.au>
3757
3758 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
3759 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
3760 such a size causes divide-by-zeros in scm_hasher.
3761
052fbfd9
KR
3762 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
3763 leak.
3764
43240c9c
MV
37652004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3766
3767 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
3768 Rewritten using the same logic as scm_to_signed_integer and
3769 scm_to_unsigned_integer, respectively, which is better(tm). Also,
3770 use CHAR_BIT instead of hardcoding 8.
3771 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
3772 SCM_I_LLONG_MIN etc. instead.
3773
3774 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
3775 SCM_I_MAKINUM and changed all uses.
3776 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
3777
a3de8e7b
MV
3778 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
3779 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
3780 them by assuming twos-complement.
3781
c9eb03bb
MV
37822004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3783
3784 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
3785 configure now produces.
3786 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
3787 definitions, giving the limits of the integer types defined by
3788 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
3789 LLONG_MIN or LONG_LONG_MIN is hard to get at.
3790
3791 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
3792 SHORT_MIN.
3793 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
3794 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
3795 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
3796 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
3797 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
3798 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
3799 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
3800 scm_from_uintmax): New.
3801
7888309b
MV
38022004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3803
3804 * tags.h (scm_is_eq): New.
3805
3806 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
3807 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
3808 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
3809 scm_from_bool, and scm_is_bool, respectively.
3810
3811 * boolean.h (scm_is_bool): Fix bug in prototype.
3812 (scm_from_bool): The argument is "x" not "f", stupid.
3813
3814 * boolean.c (scm_is_bool): Fix typo.
3815
3816 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
3817 scm_is_unsigned_integer, scm_to_signed_integer,
3818 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
3819 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
3820 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
3821 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
3822 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
3823 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
3824 New.
3825
800570a6
MV
38262004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3827
3828 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
3829 scm_to_bool): New.
3830
9fcf3cbb
DH
38312004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3832
3833 * backtrace.c (display_expression, display_frame): Call
3834 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
3835 single memoized expression.
3836
3837 * debug.c (memoized_print): Don't try to unmemoize the memoized
3838 object, since we can't know whether it holds a single expression
3839 or a body.
3840
3841 (scm_mem_to_proc): Removed check for lambda expression, since it
3842 was moot anyway. Whoever uses these functions for debugging
3843 purposes should know what they do: Creating invalid memoized code
3844 will cause crashes, independent of whether this check is present
3845 or not.
3846
3847 (scm_proc_to_mem): Take the closure's code as it is and don't
3848 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
3849 memoized code should not be modified.
3850
3851 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
3852 scm_unmemoize from public use, but made scm_i_unmemoize_expr
3853 available as a guile internal function instead. However,
3854 scm_i_unmemoize_expr will only work on memoized objects that hold
3855 a single memoized expression. It won't work with bodies.
3856
3857 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
3858 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
3859 i. e. a list of expressions.
3860
3861 * eval.c (unmemoize_exprs): Drop internal body markers from the
3862 output during unmemoization.
3863
3864 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
3865 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
3866 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
3867 as guile internal functions instead. scm_i_unmemoize_expr will
3868 only work on a single memoized expression, while
3869 scm_i_unmemocopy_body will only work on bodies.
3870
90df793f
DH
38712004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3872
3873 * eval.c (unmemoize_exprs): Handle semi-memoized code.
3874
3875 (scm_cons_source, scm_primitive_eval): Prefer higher level
3876 predicate SCM_FALSEP over SCM_IMP.
3877
8048c00b
RB
38782004-06-15 Rob Browning <rlb@defaultvalue.org>
3879
3880 * script.c (scm_shell_usage): minor phrasing change.
3881
3882 * gc_os_dep.c: update ifdefery for macosx.
3883 (scm_get_stack_base): separate result initialization from
3884 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 3885 3.3. Thanks to Andreas Vögele.
8048c00b 3886
d93294d4
HWN
38872004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
3888
3889 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
3890
212e58ed
DH
38912004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3892
3893 * list.[ch] (scm_i_finite_list_copy): New internal function to
3894 copy lists that are known to be finite (though not necessarily
3895 proper).
3896
3897 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
3898 a closure's argument list like an expression of a body.
3899
3900 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
3901 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
3902 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
3903 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
3904 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
3905 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
3906 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
3907 unmemoize_builtin_macro): New static functions and symbols.
3908
3909 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
3910 now has a slightly different meaning: The memoized form that is
3911 receives as its argument is now interpreted as a sequence of
3912 expressions from a body.
3913
3914 (unmemocar, scm_unmemocar): Since the whole functionality of
3915 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
3916 has its old content back and is deprecated, while unmemocar has
3917 been removed.
3918
3919 (SCM_BIT7): Removed.
3920
3921 (CEVAL): For unmemoizing a single expression, call
3922 unmemoize_expression instead of scm_unmemocopy, which now expects
3923 a sequence of body expressions. Eliminated unnecessary empty
3924 environment frame when executing let* forms. Eliminated
3925 unmemoization step from evaluator.
3926
9ccea370
MV
39272004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3928
3929 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
3930 macroexp and made static. Added new version of scm_macroexp that
3931 emits a deprecation warning and then calls macroexp.
3932 (scm_m_undefine): Issue deprecation warning.
3933
57d23e25
DH
39342004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3935
3936 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
3937 Modified to make set! work on symbols that represent syntactic
3938 keywords.
3939
141521ad
HWN
39402004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
3941
3942 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
3943 compound expression as lvalue errors.
3944
7c2f56a4
MV
39452004-05-24 Marius Vollmer <mvo@zagadka.de>
3946
3947 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
3948 WINDER_DATA to a SCM.
3949
366ecaec
DH
39502004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3951
3952 * goops.c (compute_getters_n_setters, create_standard_classes,
3953 scm_add_slot): Compute closures by calling scm_i_eval_x on a
3954 lambda expression rather than creating them with scm_closure.
3955
26ecfa39
DH
39562004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3957
3958 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
3959 misplaced syntactic keywords. This will not work unless guile's
3960 defmacro feature is deprecated.
3961
3962 (scm_m_case): Fixed a bug that caused the list of labels to grow
3963 with every case form.
3964
f865229a
KR
39652004-05-19 Kevin Ryde <user42@zip.com.au>
3966
3967 * numbers.c (scm_round_number): For inum and big, just return x. For
3968 real, use scm_round for 2^54-1 etc problems covered there.
3969
3970 * numbers.c (trunc): Remove #define to scm_truncate when the C library
3971 doesn't provide trunc. This was for when `truncate' was done as a
3972 scm_tc7_dsubr, no longer required.
3973
3974 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
3975 to stack marking call, two parameters and no cast on t->base.
3976
63947c7a
MV
39772004-05-18 Marius Vollmer <mvo@zagadka.de>
3978
3979 * hashtab.c (rehash_after_gc): Bug fix: properly link the
3980 processed hashtables back into the weak_hashtables list. Thanks
3981 to Bill Schottstaedt!
3982
e7313a9d
DH
39832004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3984
3985 * eval.c (unmemoize_quote): New static function.
3986
3987 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
3988 representation of 'quote' and '@slot-ref' to an improper list.
3989 This reduces execution time, the number of cells used to hold the
3990 memoized code, and thus also reduces garbage collection time.
3991
3992 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
3993
3994 (SCM_CEVAL): Changed macro handling to also work with macros that
3995 return improper lists. Added an assertion, that the code returned
3996 by a macro transformer will not lead to cycles in the memoized
3997 code.
3998
e5156567
DH
39992004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4000
4001 No functional change, just rearrangements of functions within the
4002 file.
4003
4004 * eval.c (scm_ilookup, scm_unbound_variable_key,
4005 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4006 the definitions used for execution, since that's where they will
4007 belong to later.
4008
651f07f8
DH
40092004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4010
4011 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4012 throughout guile, has not been part of an official release yet,
4013 and the concept of sloppy predicates has never been a good idea.
4014
4015 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4016 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4017 Simplified.
4018
770e048f
DH
40192004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4020
4021 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4022 to make explicit what happens.
4023
2ff08405
DH
40242004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4025
4026 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4027 explicit what happens.
4028
4029 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4030 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4031
89afb9cd
MV
40322004-05-11 Marius Vollmer <mvo@zagadka.de>
4033
4034 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4035 is indeed a procedure when it isn't a number.
4036
3d5ebfa9
MV
40372004-05-10 Marius Vollmer <mvo@zagadka.de>
4038
4039 Convert floating point numbers into strings with an arbitrary
4040 radix. Thanks to Richard Todd!
4041
4042 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4043 fit.
4044 (fx): Removed.
4045 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4046 number_chars): New, to support variable radices.
4047 (idbl2str): Use above instead of the old base-10 only tables.
4048 (iflo2str): Pass on new RADIX argument to idbl2str.
4049 (scm_number_to_string): Pass radix to iflo2str.
4050 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4051 iflo2str.
4052 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4053 possible radices.
4054
3ae69bb4
KR
40552004-05-10 Kevin Ryde <user42@zip.com.au>
4056
4057 * numbers.c (scm_logbit_p): Correction to test above the end of an
4058 inum. Reported by Jan Konecny.
4059
27968825
MV
40602004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4061
4062 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4063 scm_t_bits. Updated all users.
4064 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4065 duplicating the code.
4066 (SCM_CELL_OBJECT_LOC): New.
4067 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4068 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4069
4070 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4071 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4072 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4073 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4074 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4075 SCM_SMOB_OBJECT_3_LOC): New.
4076 * smob.c (scm_i_set_smob_flags): New function.
4077
4078 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4079 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4080 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4081 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4082 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4083 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4084
4085 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4086 taking the address of SCM_CELL_WORD_1, the latter being no longer
4087 an lvalue.
4088
4089 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4090 of casting SCM_CELL_WORD_LOC.
4091
3cf17ef0
KR
40922004-05-02 Kevin Ryde <user42@zip.com.au>
4093
37026925 4094 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4095 --disable-deprecated. Reported by Andreas Vögele.
37026925 4096
3cf17ef0 4097 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4098 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4099
c5854598
KR
4100 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4101 code has support for. Fixes building with AIX cc, which is ansi but
4102 doesn't define __STDC__. Reported by Keith Crane.
4103 (var_start): Remove macro, this variation no longer required.
4104 (scm_list_n): Use va_start directly.
4105
f26c1a32
KR
41062004-05-01 Kevin Ryde <user42@zip.com.au>
4107
4108 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4109 is now gone. Reported by Andreas Vögele.
f26c1a32 4110
dfa6017e
KR
41112004-04-28 Kevin Ryde <user42@zip.com.au>
4112
4113 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4114 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4115 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4116 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4117 Also cast through unsigned char to avoid passing negatives to those
4118 macros if input contains 8-bit values.
4119
4120 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4121 corrections to range check for signed numbers. Remove
4122 scm_remember_upto_here_1(num) from these checks, since num is used
4123 subsequently anyway.
4124
4125 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4126 avoid warning from gcc 3.4. Reported by Hyperdivision.
4127
4128 * numbers.c (scm_bit_extract): Use min instead of MIN.
4129 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4130 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4131
4132 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4133 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4134
a0d06a00 4135 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4136 Reported by Andreas Vögele.
a0d06a00 4137
dfa6017e
KR
4138 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4139 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4140 by Andreas Vögele.
dfa6017e 4141
36245b66
DH
41422004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4143
4144 * eval.c (s_macro_keyword): New static identifier.
4145
4146 (scm_m_define): Change order to first create binding and
4147 evaluating the expression afterwards.
4148
4149 (scm_m_set_x): Memoize complete set! expression. Only leave
4150 symbols if no binding exists at memoization time. Throw error if
4151 assigning to a syntactic keyword.
4152
4153 (lazy_memoize_variable): New function.
4154
4155 (CEVAL): When execution set!, perform lazy memoization if
4156 unmemoized symbol is detected.
4157
4158 * modules.c (module_variable): Return variables with unbound
4159 value.
4160
4161 * tags.h: Fix comment.
4162
4d81111e
KR
41632004-04-25 Kevin Ryde <user42@zip.com.au>
4164
da8bcb2f
KR
4165 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4166 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4167 in 8-bit locales, and ensures consistency with char-upper-case? and
4168 char-lower-case? which already use ctype.h.
4169 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4170 Remove.
4171 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4172
4d81111e
KR
4173 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4174 call. Reported by Hyperdivision.
4175
4176 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4177 Reported by Hyperdivision.
4178
4179 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4180 Hyperdivision.
4181
7e6e6b37
DH
41822004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4183
4184 Hide the implementation of ilocs and isyms in eval.c.
4185
4186 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4187 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4188 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4189 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4190 eval.h to eval.c.
4191
4192 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4193 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4194 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4195 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4196 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4197 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4198 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4199 renamed to ISYMNUM.
4200
4201 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4202 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4203 Extracted printing of ilocs and isyms to guile internal functions
4204 scm_i_print_iloc, scm_i_print_isym of eval.c.
4205
caab294f
KR
42062004-04-22 Kevin Ryde <user42@zip.com.au>
4207
7aaf4758
KR
4208 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4209
caab294f
KR
4210 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4211 rounding in x+0.5 when x is a big value already an integer. In
4212 certain hardware rounding cases x+0.5 can give an adjacent integer,
4213 leading to that as the result, when we really just wanted x itself.
4214
b1cb24ff
DH
42152004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4216
4217 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4218
4219 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4220 added const qualifiers, cast intentionally unused expressions to
4221 void for emphasis, improved comment.
4222
5065b40d
DH
42232004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4224
4225 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4226 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4227 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4228 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4229 Defined the tc8-tag for flags to be 0x04, which will mean that
4230 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4231 to the reduced number of bits and the simpler bit pattern for
4232 SCM_BOOL_F, certain machines may be able to use more efficient
4233 processor instructions to deal with SCM_BOOL_F.
4234
4235 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4236 never been defined in a released version, thus no need to
4237 deprecate them.
4238
4239 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4240 instead of tc9 tags.
4241
4242 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4243 of tc9 tags.
4244
4245 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4246 could have used this definition.
4247
4248 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4249 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4250 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4251 as isyms, as special isyms don't exist any more.
4252
9fa6c119
KR
42532004-04-18 Kevin Ryde <user42@zip.com.au>
4254
e08d2eee
KR
4255 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4256 safety.
4257
9fa6c119
KR
4258 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4259 explicit swapping code.
4260
c9cdd396
KR
42612004-04-15 Kevin Ryde <user42@zip.com.au>
4262
4263 * cpp_sig_symbols.in: Add SIGSYS.
4264
4265 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4266 recursion.
4267
4268 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4269 frac/big and frac/frac, use scm_less_p for exact comparison.
4270
83ac9c59
KR
4271 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4272 with big/inum.
4273
84a4be9a
KR
4274 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4275
84fad130
HWN
42762004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4277
6b69393d
HWN
4278 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4279
84fad130
HWN
4280 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4281 scm_c_{up,down}case.
4282 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4283 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4284
c3110a30
KR
42852004-04-06 Kevin Ryde <user42@zip.com.au>
4286
0b288f36
KR
4287 * numbers.c (scm_ash): Remove stray "}" in docstring.
4288
ea2508c8
KR
4289 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4290 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4291 calling mpz_cmp_ui in most cases.
4292
c3110a30
KR
4293 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4294 for big == abs(most-negative-fixnum) special case.
4295 (abs_most_negative_fixnum): Remove, no longer used.
4296
4297 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4298 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4299 calling (sigaction NSIG).
4300
4301 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4302 and fork error cases to do this.
4303
dec40cd2
DH
43042004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4305
4306 * eval.c (CEVAL): Don't distinguish between short and long
4307 instructions when dispatching - just always dispatch on the
4308 instruction code, which is common for short and long instructions.
4309 Further, removed unnecessary goto statements and added comment.
4310
0e7bb795
DH
43112004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4312
4313 * eval.c (scm_unmemocopy): Don't distinguish between short and
4314 long instructions when dispatching - just always dispatch on the
4315 instruction code, which is common for short and long instructions.
4316 Further, removed unnecessary goto statements, fixed indentation
4317 and replaced SCM_IMP predicates by SCM_NULLP.
4318
f9986767
DH
43192004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4320
4321 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4322 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4323 'checkmacro'.
4324
fbc42231
KR
43252004-03-31 Kevin Ryde <user42@zip.com.au>
4326
4327 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4328
434f2f7a
DH
43292004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4330
4331 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4332 SCM_DEBUGGINGP:
4333
4334 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4335 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4336 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4337 single interface that also matches the naming conventions.
4338 Probably scm_debug_mode_p should be part of the private interface
4339 anyway.
4340
4341 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4342 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4343 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4344 to scm_debug_mode_p.
4345
4346
4347 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4348
4349 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4350 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4351 from debug.h to eval.h.
4352
4353 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4354 more, just leave it with setting scm_debug_mode_p, which is
4355 equivalent for practical purposes.
4356
4357 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4358 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4359
4360 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4361
4362 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4363 static and renamed it to ceval throughout. Provide a new exported
4364 but deprecated function scm_ceval as a wrapper for backwards
4365 compatibility. The same is done for the deval/scm_deval pair of
4366 functions.
4367
4368 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4369 throughout. Defined CEVAL to ceval or deval, based on compilation
4370 phase.
4371
4372 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4373 to ceval and deval instead of calling *scm_ceval_ptr.
4374
4375 * eval.c (dispatching_eval): New deprecated static function.
4376
4377 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4378 to emulate its old behaviour as closely as possible.
4379
4380
4381 Change the evaluator such that only expressions for which pair? is
4382 true are passed to CEVAL, and such that all other expressions are
4383 evaluated outside of CEVAL:
4384
4385 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4386 expression that is assumed to be memoized already. All but
4387 expressions of the form '(<form> <form> ...)' are evaluated inline
4388 without calling an evaluator.
4389
4390 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4391 expressions of the form '(<form> <form> ...)' inline without
4392 calling an evaluator.
4393
4394 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4395 the special case of unmemoized symbols passed on the top level.
4396
4397 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4398 is known that the expression passed to CEVAL is of the form
4399 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4400 now it is known that the input expression of CEVAL is a pair.
4401
44022004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4403
4404 * eval.c (is_self_quoting_p): New static function.
4405
4406 (scm_m_quote): Use is_self_quoting_p.
4407
4408 (copy_tree): Corrected typo in comment.
4409
702551e6
HWN
44102004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4411
bfefbf18
HWN
4412 * eval.c (s_scm_copy_tree): idem.
4413
4414 * list.c (s_scm_filter): remove "pointer" from doc string.
4415
702551e6
HWN
4416 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4417
4418 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4419
4420 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4421 (display_frame): idem.
4422 (display_backtrace_file_and_line): idem.
4423
4424 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4425 arguments.
4426
3cd23214
KR
44272004-03-26 Kevin Ryde <user42@zip.com.au>
4428
88a7ae1f
KR
4429 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4430
3cd23214
KR
4431 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4432 big==0 since that never occurs.
4433
4434 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4435 scm_modular_expt, matching scheme level name `modulo-expt'.
4436
4437 * numbers.c (scm_modular_expt): Return a negative remainder for a
4438 negative divisor, the same as `modulo' does.
4439
44402004-03-26 Eric Hanchrow <offby1@blarg.net>
4441
4442 * numbers.c, numbers.h (scm_modular_expt): New function.
4443
2926035a
KR
44442004-03-25 Kevin Ryde <user42@zip.com.au>
4445
4446 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4447 return inexact as required by r5rs.
4448
62360b89
DH
44492004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4450
4451 * eval.c: Separated some definitions relevant for execution from
4452 the memoization part of the file.
4453
4454 (copy_tree): New static function
4455
4456 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4457 structures are detected now and will lead to an exception instead
4458 of forcing guile to run in an endless loop, using up all the
4459 system's memory. Second, arrays in the cdr of an improper list
4460 are now copied. See the new test cases in eval.test.
4461
44622004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
4463
4464 * posix.c (scm_gethostname): Make sure len is initialised before
4465 it is used. Restructured to (hopefully) represent possible
4466 configurations more clearly in the code. Added unwind handler.
4467
3bd3bae8
KR
44682004-03-23 Kevin Ryde <user42@zip.com.au>
4469
4470 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4471 MAXHOSTNAMELEN when available.
4472
254bf78d
MV
44732004-03-21 Marius Vollmer <mvo@zagadka.de>
4474
4475 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4476 terminator. Rewritten the logic as a state machine, I must have
4477 been doing too much VHDL lately...
4478
4479 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4480 themselves. Thanks to Han-Wen Nienhuys!
4481
4482 * list.c: Changed docstrings so that they no longer talk about
4483 returning 'pointers' to something.
4484
009c34a2
HWN
44852004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4486
4487 * gc.c: remove set_debug_cell_accesses! when
4488 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4489 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4490 debugging conditionally.
4491
54733c95
KR
44922004-03-21 Kevin Ryde <user42@zip.com.au>
4493
4494 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4495
bbaf8747
KR
44962004-03-20 Kevin Ryde <user42@zip.com.au>
4497
4498 * posix.c (scm_gethostname): Preserve errno across free() call.
4499
726f82e7
HWN
45002004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4501
4502 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4503 free cells.
4504
e1350d6a
KR
45052004-03-14 Kevin Ryde <user42@zip.com.au>
4506
4507 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4508 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4509
62055253
KR
45102004-03-07 Kevin Ryde <user42@zip.com.au>
4511
4512 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4513 than "GMT" always.
4514 (filltime): Make zname parameter "const".
4515
92e64b87
MD
45162004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4517
4518 * threads.c, threads.h (scm_c_scm2thread): New function.
4519
004ad931
KR
45202004-02-29 Kevin Ryde <user42@zip.com.au>
4521
4522 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4523 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4524 particular don't assume "defined (__alpha__) && ! defined (linux)"
4525 means OSF. Remove "SCO" code, which was not really SCO specific and
4526 which John W. Eaton advises should be long past being needed.
4527
4528 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4529 error throw.
4530
72ea45ac
KR
45312004-02-24 Kevin Ryde <user42@zip.com.au>
4532
4533 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4534
2af0602e
KR
45352004-02-22 Kevin Ryde <user42@zip.com.au>
4536
4537 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4538 complex, same as for two args. (Handle only inum, big, real, frac).
4539
b114eafe
KR
45402004-02-21 Kevin Ryde <user42@zip.com.au>
4541
4542 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4543 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 4544 Reported by Andreas Voegele.
b114eafe 4545
1e55d288
NJ
45462004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4547
4548 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4549 validation.
4550
4551 * read.c (scm_lreadparen): Removed.
4552 (scm_lreadparen1): Renamed scm_i_lreadparen.
4553
eb741d98
HWN
45542004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4555
4556 * list.c (scm_list_n): validate non-immediate arguments;
4557 this will catch forgotten a SCM_UNDEFINED.
4558
4e28ba5e
MV
45592004-02-18 Marius Vollmer <mvo@zagadka.de>
4560
4561 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4562 Thanks to Bill Schottstaedt!
4563
4564 * socket.h (scm_gethost): Removed prototype it is already in
4565 "net_db.h". Thanks to Bill Schottstaedt!
4566
ef861ead
KR
45672004-02-18 Kevin Ryde <user42@zip.com.au>
4568
4569 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4570 order parameter to mpz_import, in fact with just one word there's no
4571 order to worry about at all.
4572
4573 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4574 and frac==complex, make an exact comparison rather than converting
4575 with fraction2double.
4576
4577 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4578 shared library, since environ is not directly available there.
4579
4580 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4581 standard.
4582
4583 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4584 errno EINVAL in case localtime and gmtime don't set it.
4585 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4586 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4587
ae43d08e 45882004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 4589
c9ea6462
KR
4590 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4591 which were permitted in the past for these.
4592
292dfa7f
KR
4593 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
4594 previous change to numbers.c.
4595
ae43d08e
KR
4596 * script.c (scm_shell_usage): Print bug-guile email address, as per
4597 GNU standard. Reported by Han-Wen Nienhuys.
4598
711a9fd7
MD
45992004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4600
4601 * unif.c (scm_make_uve): Removed local variable and simplified
4602 code in order to avoid compiler used uninitialized warnings.
4603
4604 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
4605 scm_hash_map.
4606 (scm_hash_fold): Use scm_call_3 directly in the call to
4607 scm_internal_hash_fold instead of going via fold_proc (which is
4608 now removed).
4609 (scm_hash_for_each): Use a trampoline +
4610 scm_internal_hash_for_each_handle.
4611 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
4612 functions.
4613
3da7f6b2
KR
46142004-02-12 Kevin Ryde <user42@zip.com.au>
4615
344a212f
KR
4616 * ports.c (scm_port_line): In docstring, note first line is 0.
4617 (scm_set_port_line_x): In docstring, note first line is 0.
4618 (scm_port_column): In docstring, there's no default to current input
4619 port, and remove shared port-line @defun.
4620 (scm_set_port_column_x): In docstring, there's no default to current
4621 input port, note first column is 0, remove shared set-port-line!
4622 @defun.
4623
3da7f6b2
KR
4624 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
4625 convert args the same way that array-set! does.
4626
4627 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
4628 for dvect.
4629 (scm_array_p): Add missing "break"s in switch, fix llvect test look
4630 for "l" not "s", fix dvect to be false for singp(prot) since such a
4631 value is for fvect.
4632 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
4633 (exactly_one_third): New variable.
4634 (scm_init_unif): Initialize it.
3da7f6b2 4635
cd21f5eb
NJ
46362004-02-10 Neil Jerram <neil@ossau.uklinux.net>
4637
4638 * read.c (scm_read_opts): Change `escaped-parens' to
4639 `elisp-strings'.
4640
16353acc
NJ
46412004-02-08 Neil Jerram <neil@ossau.uklinux.net>
4642
4643 * read.c (scm_read_opts): New opts `elisp-vectors' and
4644 `escaped-parens'.
4645 (s_vector): New.
4646 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
4647 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
4648 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
4649 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
4650 `escaped-parens' option set.
4651 (scm_read_token): If elisp vector syntax active, disallow [ and ]
4652 in tokens.
4653 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
4654 (scm_lreadparen1): New.
4655
4656 * read.h: Remove conditionally compiled last arg to
4657 scm_lreadparen.
4658 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
4659
f62b9dff
HWN
46602004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
4661
4662 * eval.c (m_expand_body): remove stray variable new_body.
4663
ef5b6b61
MV
46642004-01-22 Marius Vollmer <mvo@zagadka.de>
4665
4666 * eval.c (m_expand_body): Rewrite the expression in place (by
4667 overwriting FORMS) also when a letrec is constructed, not only
4668 when no definitions are found. Do not return rewritten expression
4669 to emphasize the in-place rewriting. Changed all users.
4670
7eec4c37
HWN
46712004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
4672
4673 * gc.c: add protected_object_count, a number that is dumped from
4674 gc_stats()
4675
25ffbdac
MV
46762004-01-11 Marius Vollmer <mvo@zagadka.de>
4677
4678 * dynwind.h, dynwind.c (scm_frame_unwind,
4679 scm_frame_unwind_handler): Renamed and changed all uses.
4680 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
4681
08568c95
KR
46822004-01-11 Kevin Ryde <user42@zip.com.au>
4683
4684 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
4685 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
4686 changes made to scheme-compound.texi.
4687
5565749c
MV
46882004-01-10 Marius Vollmer <mvo@zagadka.de>
4689
25ffbdac
MV
4690 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
4691 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
4692
4693 * guile-snarf.in: Use mkdir to create a unique temporary directory
4694 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 4695
fc6bb283
MV
46962004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4697
7ebccde8
MV
4698 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
4699 argument since it is always zero now. Changed all callers.
4700 Removed code for handling fluids.
96e3b2f8
MV
4701
4702 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
4703 the wind chain explicitely. Use scm_c_with_fluid for the common
4704 case of only one fluid.
4705 (scm_with_fluid): New.
4706 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
4707
fc6bb283 4708 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
4709 (scm_with_fluid): New.
4710 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
4711
4712 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
4713 do the unwinding directly. It is simple enough.
4714
4715 * dynwind.h, dynwind.c: Did the following renamings:
4716 scm_begin_frame -> scm_frame_begin,
4717 scm_end_frame -> scm_frame_end,
4718 scm_on_unwind -> scm_frame_unwind,
4719 scm_on_rewind -> scm_frame_rewind,
4720 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
4721 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
4722 Changed all uses.
4723
4724 * aync.h, async.c: Did the follwing renamings:
4725 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
4726 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
4727 Changed all uses.
4728
4729 * ports.h, ports.c: Did the follwing renamings:
4730 scm_with_current_input_port -> scm_frame_current_input_port,
4731 scm_with_current_output_port -> scm_frame_current_output_port,
4732 scm_with_current_error_port -> scm_frame_current_error_port.
4733 Changed all uses.
4734
298ab996
KR
47352004-01-07 Kevin Ryde <user42@zip.com.au>
4736
4737 * numbers.c (s_bignum): Remove, not used since gmp bignums.
4738 Reported by Richard Todd.
4739
ba40113e
KR
4740 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
4741 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
4742
298ab996
KR
4743 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
4744 traversing the args list, fixes segv if an improper list is given.
4745 Reported by Rouben Rostamian.
4746
aacff585
MV
47472004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4748
4749 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
4750 swap_data on stack, use a 'malloc obj'.
4751
4752 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
4753 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
4754 scm_i_... since they are internal. Changed all uses.
4755
4756 * dynwind.c (frame_print): Removed, use the default printer.
4757 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
4758 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
4759 to protect SCM values.
4760
4761 * dynwind.h (SCM_F_WIND_EXPLICITELY,
4762 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
4763 Changed all uses.
4764 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
4765
49c00ecc
MV
47662004-01-05 Marius Vollmer <mvo@zagadka.de>
4767
4768 * ports.h, ports.c (scm_with_current_input_port,
4769 scm_with_current_output_port, scm_with_current_error_port): New.
4770
4771 * async.h, async.c (scm_with_blocked_asyncs,
4772 scm_with_unblocked_asyncs): New.
4773
dab514a8
MV
47742004-01-03 Marius Vollmer <mvo@zagadka.de>
4775
4776 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
4777 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
4778 New.
4779 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
4780 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
4781 function when the outermost wind point has been reached. The
4782 latter is used to copy a continuation stack at the right time.
4783 scm_dowinds remains available.
4784 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
4785 tc16_guard, guards_print): Removed.
4786 (scm_internal_dynamic_wind): Reimplemented using frames.
4787
4788 * continuations.c (copy_stack): New, do only the stack copying
4789 part of copy_stack_and_call.
4790 (copy_stack_and_call): Copy the stack after unwinding and before
4791 rewinding.
4792 (scm_dynthrow): Do not call scm_dowinds, this is now done by
4793 copy_stack_and_call.
4794
441a25d9
KR
47952004-01-04 Kevin Ryde <user42@zip.com.au>
4796
4797 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 4798 can give bad results due to rounding.
441a25d9 4799
e0499207
KR
4800 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
4801 setzone/restorezone protection for DOS.
4802
89fcf1b4
MV
48032003-12-26 Marius Vollmer <mvo@zagadka.de>
4804
4805 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
4806 and scm_t_uintmax to be defined in scmconfig.h
4807
caff34d4
KR
48082003-12-03 Kevin Ryde <user42@zip.com.au>
4809
4810 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
4811
4812 * numbers.c (scm_make_ratio): Check for numerator equal to
4813 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
4814 giving integer -1.
4815
4816 * numbers.c (scm_real_part): Return fraction unchanged rather than
4817 converting to flonum.
4818
2d0b85ac
DH
48192003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4820
4821 * modules.c (module_variable): Fixed (and thus simplified) the
4822 definition of SCM_BOUND_THING_P to reflect the fact that since
4823 after the 1.4 series of guile, obarrays only hold variable
4824 objects.
4825
2297981d
MV
48262003-11-30 Marius Vollmer <mvo@zagadka.de>
4827
4828 * numbers.c (scm_logand): It's "#b...", not "#\b...".
4829
4830 From Paul Jarc:
4831
4832 * read.c (scm_lreadr): Signal an error for invalid escape
4833 sequences in strings. Code cleanups too.
4834
4835 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
4836 writing control characters in strings.
4837
48382003-11-21 Marius Vollmer <mvo@zagadka.de>
4839
4840 * ports.c (scm_drain_input): Bug fix: only access the port after
4841 checking that it indeed is one.
4842
5c264007
DH
48432003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4844
4845 * eval.c (s_bad_define): New static identifier.
4846
4847 (m_body): Fixed comment.
4848
4849 (scm_m_define): Don't generate memoized code for definitions that
4850 are not on the top level. As a consequence, no memoized code at
4851 all is generated for definitions any more: Top level definitions
4852 are executed immediately during memoization and internal
4853 definitions are handled separately in m_expand_body.
4854
4855 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
4856 definitions. Consequently, there is no unmemoizing code any more
4857 that might modify the environment. Thus, the old scm_unmemocopy
4858 is removed and the old unmemocopy is renamed to scm_unmemocopy.
4859
4860 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
4861 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
4862 over SCM_NIMP in places, where the argument is known to be part of
4863 a proper list.
4864
018d4730
KR
48652003-11-21 Kevin Ryde <user42@zip.com.au>
4866
4867 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
4868 for bignums.
4869
4870 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
4871 to share some shifting.
4872
4873 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
4874 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
4875 since gc does this.
4876
4bca30d8
MV
48772003-11-19 Marius Vollmer <mvo@zagadka.de>
4878
fb16d26e
MV
4879 * numbers.c (scm_make_ratio): Rewritten to have a simpler
4880 structure. Previously, not all cases with a negative denominator
4881 were covered.
4882
4bca30d8
MV
4883 * numbers.c (mem2decimal_from_point): use scm_divide instead of
4884 scm_divide2real when forming the fractional part. This allows
4885 "#e1.2" to yield 6/5.
4886
4887 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
4888 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
4889 fractions were equal to each other regardless of value. Ooops.
4890
4891 * numbers.c (scm_rationalize): Return an inexact result when given
4892 inexact arguments.
4893
4894 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
4895 non-numbers.
4896
bdf26b60
MV
48972003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4898
4899 Support for exact fractions from Bill Schottstaedt! Thanks!
4900
4901 * print.c (scm_iprin1): Handle fractions.
4902
4903 * objects.h (scm_class_fraction): New.
4904 * objects.c (scm_class_fraction): New.
4905 (scm_class_of): Handle fractions.
4906
4907 * hash.c (scm_hasher): Handle fractions.
4908
4909 * numbers.c: New code for handling fraction all over the place.
4910 (scm_odd_p, scm_even_p): Handle inexact integers.
4911 (scm_rational_p): New function, same as scm_real_p.
4912 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
4913 New exact functions that replace the inexact 'dsubr'
4914 implementations.
4915 (scm_numerator, scm_denominator): New.
4916
4917 * numbers.h (SCM_NUMP): Recognize fractions.
4918 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
4919 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
4920 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
4921 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
4922 SCM_FRACTION_REDUCED): New.
4923 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
4924 New prototypes.
4925 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
4926 scm_rational_p): New prototypes.
4927 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
4928 scm_i_print_fraction): New prototypes.
4929
4930 * goops.c (create_standard_classes): Create "<fraction>" class.
4931
4932 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
4933
4934 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
4935 case in the switch, but do nothing for now.
4936
4937 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
4938 to doubles when calling 'dsubr' functions.
4939
4940 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
4941
28fda544
RB
49422003-11-18 Rob Browning <rlb@defaultvalue.org>
4943
4944 * gen-scmconfig.c (main): remove public definition of
4945 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
4946 direct typedef of long_long and ulong_long inside deprecated block
4947 when appropriate.
4948
4949 * deprecated.h: move long_long and ulong_long definitions to
4950 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
4951 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
4952
b58e7420
MV
49532003-11-17 Marius Vollmer <mvo@zagadka.de>
4954
9a1d7d7c
MV
4955 * hash.c (scm_string_hash): New hashing algorithm that takes the
4956 complete string into account.
4957
b58e7420
MV
4958 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
4959 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
4960 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
4961 SCM_ASSYNT.
b58e7420
MV
4962
4963 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
4964 the "-e" option instead of scm_str2symbol. This allows things
4965 like (@ ...) to be specified for the entry point.
4966
461bffb1
DH
49672003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4968
4969 * eval.c (scm_m_letstar): Create memoized code in place to
4970 minimize consing.
4971
6f81708a
DH
49722003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4973
4974 * eval.c (s_splicing): Commented and reformulated.
4975
4976 (lookup_global_symbol, lookup_symbol): New static functions.
4977
4978 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
4979
4980 (try_macro_lookup, literal_p): Use lookup_symbol instead of
4981 creating a temporary pair for scm_lookupcar.
4982
4983 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
4984 created deprecated wrapper function scm_unmemocar.
4985
4986 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
4987 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
4988 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
4989 undefineds, sym_three_question_marks): Moved around without
4990 modifications.
4991
4992 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
4993
910b5125
DH
49942003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4995
4996 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
4997 m_expand_body, scm_m_expand_body): Grouped together with m_body.
4998 No further modifications.
4999
c86c440b
DH
50002003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5001
5002 * eval.c (s_mixed_body_forms): New static identifier.
5003
5004 (canonicalize_define, scm_m_define): The check for a bad
5005 expression is performed in canonicalize_define now.
5006
5007 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5008 static helper functions for m_expand_body.
5009
5010 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5011 expand user defined macros. Fixed handling of the definition/
5012 expression boundary. Fixed handling of definitions grouped with
5013 'begin. Use canonicalize_define to expand definitions.
5014
3890131a
MV
50152003-11-13 Marius Vollmer <mvo@zagadka.de>
5016
b58e7420
MV
5017 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5018 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5019
5df36eac
MV
5020 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5021 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5022 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5023 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5024 New macros from Paul Jarc. Thanks!
5025
3890131a
MV
5026 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5027 return NULL when the machine type is unknown. Previously,
5028 gc_os_dep.c would refuse to compile.
5029
430b8401
DH
50302003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5031
5032 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5033 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5034 scm_m_body to m_body.
5035
328dc9a3
DH
50362003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5037
5038 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5039 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5040 scm_m_expand_body to m_expand_body and made it static. Added
5041 deprecated wrapper scm_m_expand_body.
5042
5043 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5044 of scm_m_expand_body.
5045
c2337a61
KR
50462003-11-09 Kevin Ryde <user42@zip.com.au>
5047
5048 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5049 argument. Reported by Mike Gran.
5050
ced8edb0
DH
50512003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5052
5053 * eval.c (s_missing_body_expression): New static identifier.
5054
5055 (s_body): Removed.
5056
5057 (scm_m_expand_body): Fixed core dump when passing a body with
5058 defines, but without expressions (see additions to syntax.test).
5059 Use ASSERT_SYNTAX to signal syntax errors.
5060
0f572ba7
DH
50612003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5062
5063 * eval.c (canonicalize_define): New static helper function.
5064
5065 (memoize_define, canonicalize_define): Extract handling of
5066 function currying to canonicalize_define.
5067
2510c810
DH
50682003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5069
5070 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5071 Make sure that error checking in debug mode is not worse than in
5072 standard mode.
5073
34adf7ea
DH
50742003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5075
5076 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5077 handled in scm_m_body any more, but rather in scm_m_lambda.
5078
5079 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5080 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5081 calling functions of scm_m_body.
5082
5083 (scm_m_lambda): Avoid unnecessary consing when creating the
5084 memoized code.
5085
89bff2fc
DH
50862003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5087
5088 * eval.c (s_expression): Added comment.
5089
5090 (s_empty_combination, error_unbound_variable): New static
5091 identifiers.
5092
5093 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5094 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5095 signal syntax errors.
5096
5097 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5098 scheme objects.
5099
60a49842
DH
51002003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5101
5102 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5103 Grouped together with unmemocopy, without modifications.
5104
5105 (build_binding_list, unmemocopy): Renamed names of list arguments
5106 and variables to reflect the actual order of the list elements.
5107
70c1c108
DH
51082003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5109
5110 * eval.c (s_defun): New static identifier.
5111
5112 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5113 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5114 when creating the memoized code.
5115
0ee39677
KR
51162003-10-19 Kevin Ryde <user42@zip.com.au>
5117
5118 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5119
5120 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5121 in accordance with R5RS, which just mpz_get_d doesn't really give.
5122
9a848baf
DH
51232003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5124
5125 * eval.c (s_bad_slot_number): New static identifier.
5126
5127 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5128 signal syntax errors. Avoid unnecessary consing when creating the
5129 memoized code.
5130
da48db62
DH
51312003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5132
5133 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5134 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5135 errors. Avoid unnecessary consing when creating the memoized
5136 code.
5137
5138 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5139 standard case. Make sure line and file information are copied to
5140 every created expression.
5141
82b3e2c6
DH
51422003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5143
5144 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5145 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5146 when creating the memoized code.
5147
5148 (scm_m_atbind): Reversed the order, in which the init expressions
5149 are stored and executed. The order of execution is now equal to
5150 the order in which the initializers of the let-forms are executed.
5151 Use check_bindings and transform_bindings.
5152
5153 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5154 !SCM_NULLP. Added some comments.
5155
21628685
DH
51562003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5157
5158 * eval.c: Sorted include files alphabetically.
5159
5160 (scm_m_begin): Added comment.
5161
5162 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5163 unnecessary consing when creating the memoized code.
5164
5165 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5166 syntax errors. Be more specific about the kind of error that was
5167 detected.
5168
5169 (scm_m_quote, unmemocopy): As an optimization, vector constants
5170 are now inserted unquoted into the memoized code. During
5171 unmemoization the quotes are added again to provide syntactically
5172 correct code.
5173
d6754c23
DH
51742003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5175
5176 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5177 scm_m_expand_body, check_bindings): Extracted syntax checking of
5178 bindings to new static function check_bindings.
5179
5180 (scm_m_let, memoize_named_let): Extracted handling of named let to
5181 new static function memoize_named_let.
5182
5183 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5184 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5185 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5186 unnecessary consing when creating the memoized code.
5187
03a3e941
DH
51882003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5189
5190 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5191 static identifiers.
5192
5193 (s_clauses, s_formals, s_duplicate_formals): Removed.
5194
5195 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5196 specific about the kind of error that was detected. Prepare for
5197 easier integration of changes for separated memoization.
5198
da48db62 51992003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5200
5201 * eval.c (s_duplicate_binding): New static identifier.
5202
5203 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5204
5205 (scm_m_define): Added comment about how we check for duplicate
5206 formals.
5207
5208 (scm_m_do): Added check for duplicate bindings.
5209
5210 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5211 unnecessary consing when creating the memoized code.
5212
5213 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5214 scm_c_improper_memq to c_improper_memq, since it is not exported.
5215
5216 (transform_bindings): Call scm_c_memq rather than
5217 scm_c_improper_memq.
5218
5219 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5220
da48db62 52212003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5222
5223 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5224 static identifiers.
5225
5226 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5227 specific about the kind of error that was detected. Avoid use of
5228 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5229 code, this way also making sure that file name, line number
5230 information etc. remain available.
5231
da48db62 52322003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5233
5234 * eval.c (memoize_as_thunk_prototype): New static function.
5235
5236 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5237 Avoid unnecessary consing when creating the memoized code.
5238
9b9a35b6
KR
52392003-10-12 Kevin Ryde <user42@zip.com.au>
5240
5241 * list.c (scm_append): Track argument number and use in error.
5242
cc56ba80
DH
52432003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5244
5245 * eval.c (s_missing_expression, s_bad_variable): New static
5246 identifiers.
5247
5248 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5249 R5RS terminology for the naming of variables. Be more specific
5250 about the kind of error that was detected. Make sure file name,
5251 line number etc. are added to all freshly created expressions.
5252 Avoid unnecessary consing when creating the memoized code.
5253
609a8b86
DH
52542003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5255
5256 * eval.c (s_extra_expression, s_misplaced_else_clause,
5257 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5258
5259 (s_extra_case_clause): Removed.
5260
5261 (scm_m_case, scm_m_cond): If a clause appears after an else
5262 clause, report a misplaced else clause.
5263
5264 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5265 specific about the kind of error that was detected. Handle bound
5266 'else and '=>. Avoid unnecessary consing when creating the
5267 memoized code.
5268
5269 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5270 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5271 syntactic keyword '=>.
5272
58a2510b
DH
52732003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5274
5275 * eval.c (scm_m_case): Allow empty lists of case labels.
5276
2a6f7afe
DH
52772003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5278
5279 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5280
5281 * print.c (scm_isymnames): Add names for the new memoizer codes.
5282
5283 * eval.c (s_missing_clauses, s_bad_case_clause,
5284 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5285 literal_p): New static identifiers.
5286
5287 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5288 specific about the kind of error that was detected. Check for
5289 duplicate case labels. Handle bound 'else. Avoid unnecessary
5290 consing when creating the memoized code.
5291
5292 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5293 the syntactic keyword 'else.
5294
e6729603
DH
52952003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5296
5297 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5298 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5299
5300 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5301 unnecessary consing when creating the memoized code.
5302
9ddeb776
KR
53032003-10-09 Kevin Ryde <user42@zip.com.au>
5304
5305 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5306 cast gives for values bigger than a long, or for nan or inf.
5307
df5af69a
DH
53082003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5309
5310 * smob.h (scm_make_smob_type): Made the declaration match the
5311 definition.
5312
da0e6c2b
MV
53132003-10-07 Marius Vollmer <mvo@zagadka.de>
5314
5315 * goops.c, objects.h, smob.c, smob.h: Make type names char
5316 const * instead of char *. Thanks to Paul Jarc!
5317
591924eb
KR
53182003-10-02 Kevin Ryde <user42@zip.com.au>
5319
ff6ea7b9 5320 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5321 rather than scm_strport_to_string, so as to guard against the port
5322 having been closed by the called procedure. Reported by Nic Ferrier.
5323
f03314f9
DH
53242003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5325
5326 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5327
5328 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5329 tags.h to deprecated.h.
5330
534c55a9
DH
53312003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5332
5333 This set of patches introduces a new tc7 code scm_tc7_number for
5334 numbers. Bignums, reals and complex numbers are turned from smobs
5335 into subtypes of scm_tc7_number.
5336
5337 * tags.h (scm_tc7_number): New.
5338
5339 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5340 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5341 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5342 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5343 (scm_class_of), print.c (scm_iprin1), smob.c
5344 (scm_smob_prehistory): Don't handle bignums, reals and complex
5345 numbers as subtypes of scm_tc7_smob any more.
5346
5347 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5348 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5349
29c4382a
DH
53502003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5351
5352 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5353 sizeof (scm_t_complex) to determine the memory size of the
5354 malloc'd area for complex numbers.
5355
47ae1f0e
DH
53562003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5357
5358 * numbers.c (scm_bigequal): Fixed.
5359
859b6b2f
MV
53602003-09-16 Marius Vollmer <mvo@zagadka.de>
5361
5362 * stime.c (scm_current_time): 'time' does not set errno so don't
5363 use SCM_SYSERROR for reporting errors.
5364
e17d318f
DH
53652003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5366
5367 This set of patches eliminates the dependency between the
5368 implementation of evaluator specific memoization codes and special
5369 constants like #f, '() etc. ('flags'), which are not evaluator
5370 specific. The goal is to remove definitions of evaluator
5371 memoization codes completely from the public interface. This will
5372 make it possible to experiment more freely with optimizations of
5373 guile's internal representation of memoized code.
5374
5375 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5376
5377 * print.c (iflagnames): New array, holding the printed names of
5378 guile's special constants ('flags').
5379
5380 (scm_isymnames): Now holds only the printed names of the
5381 memoization codes.
5382
5383 (scm_iprin1): Separate the handling of memoization codes and
5384 guile's special constants.
5385
5386 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5387 SCM_IFLAGNUM): new
5388
5389 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5390 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5391 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5392 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5393 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5394 values.
5395
5396 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5397
5398 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5399 tc9 macros and scm_tc9_flag.
5400
eecac806
MV
54012003-09-15 Marius Vollmer <mvo@zagadka.de>
5402
5403 * posix.c (scm_setgroups): Check that the gid list is not too
5404 long. Thanks to Paul Jarc!
5405
22f2cf2d
DH
54062003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5407
5408 * tags.h: Reduced the number of short instructions from 14 to 13.
5409 The typecode of the former 14th short instruction is now used to
5410 represent long instructions. Changed some comments to reflect
5411 this fact.
5412
5413 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5414 previously used by SCM_IM_DEFINE.
5415
5416 (SCM_IM_DEFINE): Turned into a long instruction.
5417
5418 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5419 instruction.
5420
5421 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5422 code that is separate from all instructions, one level of dispatch
5423 for long instructions can be eliminated.
5424
5425 * print.c (scm_isymnames): Removed some commented code.
5426
62f548e1
MV
54272003-09-12 Marius Vollmer <mvo@zagadka.de>
5428
97a61c5f
MV
5429 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5430 compiler on IA64.
5431
50e0ba57
MV
5432 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5433
5434 * modules.c (scm_module_reverse_lookup): Check that the obarray
5435 really is a hashtable and do nothing if not.
5436
62f548e1
MV
5437 * inline.h: Use "extern inline" only with GCC. Use "static
5438 inline" else.
5439
0d5e3480
DH
54402003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5441
5442 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5443 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5444
5445 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5446 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5447 deprecated.h.
5448
6b412e91
DH
54492003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5450
5451 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5452 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5453
5454 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5455 0.0==some_expression to some_expression==0.0. The latter is
5456 better readable. The former is preferred by some people, since it
5457 leads to a compiler error when confusing == with =. However, when
5458 using gcc, a warning will be issued if in an if-statement an
5459 assigment appears. Since many Guile developers are using gcc,
5460 such errors will not remain unnoticed anyway. We can therefore
5461 focus on better readability.
5462
7e3b25bf
DH
54632003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5464
5465 * tags.h: Added description of Guile's type system. Removed some
5466 old and misleading comments.
5467
3ea39242
DH
54682003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5469
5470 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5471 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5472
5d7d39ff
DH
54732003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5474
5475 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5476
5477 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5478 respective SLOPPY macro.
5479
baa84a20
DH
54802003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5481
5482 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5483 type string, not SCM_TYP7S.
5484
ba15f500
KR
54852003-09-03 Kevin Ryde <user42@zip.com.au>
5486
5487 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5488 2s-complement.
5489
53bb8782
KR
5490 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5491 current timezone requiring SCM_DEFER_INTS.
5492
defdc4b4
NJ
54932003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5494
5495 * script.c (scm_compile_shell_switches): Make -s switch optional
5496 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5497 VanDevender for the patch!)
5498
0f008a15
KR
54992003-08-30 Kevin Ryde <user42@zip.com.au>
5500
5501 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5502 and to have non-integer types rejected as per other logical funcs.
5503
438a3ba1
KR
55042003-08-28 Kevin Ryde <user42@zip.com.au>
5505
5506 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5507
98dceb37
KR
55082003-08-23 Kevin Ryde <user42@zip.com.au>
5509
5510 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5511 thread safe, and could take a long time too.
5512
1fa79a38
KR
55132003-08-22 Kevin Ryde <user42@zip.com.au>
5514
5515 * numbers.c (scm_difference): Correction to bignum - negative inum.
5516
d97f9b42
KR
55172003-08-14 Kevin Ryde <user42@zip.com.au>
5518
5519 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5520 [__GNUC__]: Use volatile asm macros rather than a function call.
5521 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5522 macros while defining functions.
5523
5524 * simpos.c (getenv): Use <stdlib.h> for prototype.
5525 (scm_system): In docstring, refer to status:exit-val rather than
5526 "functions above".
5527
b9052fcc
KR
55282003-08-09 Kevin Ryde <user42@zip.com.au>
5529
5530 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5531 list set by source-properties! rather than an SRCPROPS object,
5532
8e5b4b9e
KR
55332003-07-29 Kevin Ryde <user42@zip.com.au>
5534
5535 * properties.c (scm_primitive_property_ref): In docstring, note
5536 parameters to not-found-proc, use hyphens rather than underscores for
5537 that parameter name.
5538 (scm_primitive_property_set_x): In docstring, VAL is the value
5539 parameter not CODE.
5540
20703ac4
MV
55412003-07-27 Marius Vollmer <mvo@zagadka.de>
5542
c6ccee34
MV
5543 * print.c (scm_print_symbol_name): handle more weird characters by
5544 escaping the symbol name properly. Thanks to Paul Jarc!
5545
2f4931bf
MV
5546 * posix.h (scm_setgroups): New prototype.
5547 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5548 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5549 Don't use SCM_WRITABLE_VELTS.
5550
265c456f
MV
5551 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5552 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5553 Matthias Koeppe!
5554
20703ac4
MV
5555 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5556 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5557 compiles when SCM_C_INLINE is undefined.
5558
59c4bb82
DH
55592003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5560
5561 * __scm.h: Reformulated the architecture and compiler properties
5562 in terms of properties of scm_t_bits and SCM variables rather than
5563 in terms of c standard types. This is since it is not known which
5564 of the standard types scm_t_bits and SCM variables will be defined
5565 to.
5566
d7850c8d
KR
55672003-07-24 Kevin Ryde <user42@zip.com.au>
5568
5569 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5570 and real.
5571
8a0c514f
KR
55722003-07-18 Kevin Ryde <user42@zip.com.au>
5573
5574 * numbers.c (scm_product): In complex * bignum, correction to
5575 REAL/IMAG fetch, x is the complex, not y.
5576
0aacf84e
MD
55772003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5578
5579 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5580 scm_inf_p test as Scheme values.
5581 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5582 and a positive inum.
5583 Use GNU indentation style.
5584
192de9a4
DH
55852003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5586
5587 * values.c (scm_values): Build lists of length 1 by using
5588 scm_list_1 instead of using scm_cons.
5589
bbb4438a
KR
55902003-07-10 Kevin Ryde <user42@zip.com.au>
5591
b58c85ce
KR
5592 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5593 * list.c (scm_list_n): Ditto.
5594
bbb4438a
KR
5595 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
5596
287f8ad1
KR
55972003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
5598
5599 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
5600 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
5601 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
5602 the other using intptr_t.
5603
005d2366
KR
56042003-07-08 Kevin Ryde <user42@zip.com.au>
5605
0aacf84e 5606 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
5607 (scm_magnitude): Use hypot.
5608
5609 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
5610 @footnote since it doesn't go through to guile-procedures.txt.
5611
5612 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
5613 outside @var to quieten makeinfo, and use @code.
5614
cbfe8e62
HWN
56152003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5616
5617 * gc-malloc.c (decrease_mtrigger): new function
5618 (increase_mtrigger): new function, separate debug registering and
5619 mtrigger administration.
5620 (scm_gc_realloc): bugfix: do mtrigger administration before the
5621 actual realloc, for the realloc might invalidate a GC-d segment of
5622 memory. Thanks to Sam Hocevar for pointing this out.
5623 (scm_gc_realloc): use scm_malloc_reregister instead of
5624 unregistering and registering in sequence.
5625
aeb4c2e1
HWN
56262003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5627
5628 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
5629
4c27f8d2
HWN
56302003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5631
5632 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
5633 clauses.
5634
983e697d
MV
56352003-06-29 Marius Vollmer <mvo@zagadka.de>
5636
5637 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
5638 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
5639 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
5640 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
5641 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
5642 the release_1_6 branch.
5643
78b6566e
SJ
56442003-06-25 Stefan Jahn <stefan@lkcc.org>
5645
5646 * continuations.c: Redeclaration of getcontext() via the
5647 __asm__ ("getcontext") directive.
5648
5649 * continuations.h: Include <ucontext.h> instead of
5650 <sys/ucontext.h>.
5651
1ebb8497
KR
56522003-06-21 Kevin Ryde <user42@zip.com.au>
5653
5654 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
5655 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
5656 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
5657 available.
5658 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
5659 (isfinite): Remove, conflicts with C99 isfinite().
5660
fbf85ba4
MV
56612003-06-19 Marius Vollmer <mvo@zagadka.de>
5662
5663 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
5664 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
5665 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
5666 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
5667 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
5668 the release_1_6 branch.
5669
fcc5d734
SJ
56702003-06-14 Stefan Jahn <stefan@lkcc.org>
5671
5672 * threads.h: Redefined scm_getspecific() and scm_setspecific()
5673 to be functions instead of macros.
5674
5675 * threads.c: Conditionalized inclusion of <sys/time.h> and
5676 <unistd.h>.
5677 (scm_getspecific, scm_setspecific): Made these two function
5678 real part of the API.
5679
5680 * posix.c (s_scm_putenv): Added some code to make a
5681 (putenv "FOO="), i.e. setting an empty string, work also on
5682 Win32 systems. Thanks to Kevin Ryde for the proposal.
5683
c3ae8e07
KR
56842003-06-12 Kevin Ryde <user42@zip.com.au>
5685
75b14838
KR
5686 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
5687 freebsd to comment about need to use unsetenv.
c3ae8e07 5688
9d9fa092
MV
56892003-06-02 Marius Vollmer <mvo@zagadka.de>
5690
5691 * ports.c (scm_peek_char): Safe the column of the port around the
5692 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
5693
f2478375
KR
56942003-06-07 Kevin Ryde <user42@zip.com.au>
5695
5696 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
5697 and friends required by scm_t_bits setups.
5698
6375e040
DH
56992003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5700
5701 * tags.h (scm_tc2_int): Added.
5702
5703 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
5704 scm_tc2_int.
5705
5706 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
5707 scm_tcs_closures): Hard coded values replaced by symbolic ones.
5708
f5c6ec2f
DH
57092003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5710
5711 * eval.c: Partially undid my patch from 2003-05-31. This patch
5712 caused the segfault referenced in the previous changelog entry.
5713
47dbd81e
DH
57142003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5715
5716 * tags.h: Fixed comment about the immediate type code layout.
5717
5718 * eval.c: Fixed handling of non-special instructions. Without
5719 this patch, guile will segfault on (#\0) and similar instructions.
5720
3ec52c51
KR
57212003-06-05 Kevin Ryde <user42@zip.com.au>
5722
5723 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
5724 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
5725
e418bd7c
KR
5726 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
5727 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
5728
d0624e39
DH
57292003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5730
5731 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
5732 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
5733 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
5734 generalized it to apply not only to C level functions but also to
5735 scheme level functions.
5736
5737 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
5738 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
5739 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
5740 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
5741 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
5742 respectively.
5743
5744 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
5745 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
5746 eval.h into eval.c and a copy is placed into deprecated.h.
5747
5748 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
5749 into eval.c. This definition was not part of the API in any
5750 officially released version of guile and thus does not need to go
5751 through a phase of deprecation.
5752
e90c3a89
DH
57532003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5754
d0624e39
DH
5755 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
5756 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
5757 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
5758 definitions are make static and renamed from scm_s_xxx to s_xxx.
5759 In deprecated.c the original definitions are copied.
5760
d0624e39
DH
5761 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
5762 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
5763 eval.h into eval.c and a copy (slightly modified to work in user
5764 code) is placed into deprecated.h.
5765
5766 * eval.c: Use the local static s_xxx definitions instead of the
5767 scm_s_xxx definitions throughout.
5768
14b18ed6
DH
57692003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5770
5771 This set of patches separates the representation of the cxr family
5772 of functions (car, cdr etc.) from the dsubr family of functions
5773 (i. e. functions that take a double precision floating point
5774 argument). Further, the algorithm for handling the cxr function
5775 is improved.
5776
5777 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
5778 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
5779 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
5780 cosh, tanh), objects.c (scm_class_of), procprop.c
5781 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
5782 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
5783 typecode for the dsubr family of functions.
5784
5785 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
5786 ramap_dsubr.
5787
5788 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
5789 (scm_init_pairs): Make use of the (now usable) second cell element
5790 of a scm_tc7_cxr function to implement the cxr family of functions
5791 more efficiently.
5792
2ca0d207
DH
57932003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
5794
5795 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
5796 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
5797 end of an if-else-if-sequence of checks.
5798
9a069bdd
DH
57992003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5800
5801 * eval.c (SCM_CEVAL): Improved readability of call-with-values
5802 execution. Generalize apply_closure to apply_proc and use that
5803 for call-with-values.
5804
e910e9d2
DH
58052003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5806
5807 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
5808 a non closure.
5809
1e498fbd
SJ
58102003-05-30 Stefan Jahn <stefan@lkcc.org>
5811
5812 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
5813 appropriately for mingw32 hosts.
5814
5815 * numbers.h: Defining copysign(), isnan() and finite() to
5816 be prefixed by a single '_' for mingw32 hosts.
5817
c47e2599
KR
58182003-05-30 Kevin Ryde <user42@zip.com.au>
5819
5820 * numbers.c (z_negative_one): New variable.
5821 (scm_init_numbers): Initialize it.
5822 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
5823
2e945bcc
SJ
58242003-05-29 Stefan Jahn <stefan@lkcc.org>
5825
5826 * win32-dirent.c: Use malloc() instead of scm_malloc().
5827
5828 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
5829 warning.
5830
5831 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
5832 mingw32 build.
5833
5834 * modules.c (s_scm_module_import_interface): Renamed local
5835 variable interface to _interface. Seems like 'interface'
5836 is a special compiler directive for the mingw32 compiler.
5837
5838 * mkstemp.c: Provide prototype to avoid compiler warning.
5839
5840 * load.c (s_scm_search_path): Fixed absolute and relative
5841 path detections for native Windows platforms.
5842
5843 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
5844 to build on mingw32).
5845
5846 * gc-freelist.c ("s_scm_map_free_list",
5847 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
5848
5849 * fports.c (fport_fill_input): Disable use of
5850 fport_wait_for_input() on Win32 platforms.
5851
5852 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
5853
5854 * Makefile.am: Modified some rules for cross compiling.
5855
ddd8f927
DH
58562003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5857
5858 * eval.c (SCM_CEVAL): In case of an application, all checks for a
5859 proper function object and the correct number of arguments are now
5860 performed in the application part of SCM_CEVAL.
5861
5862 (scm_badformalsp): Removed.
5863
f8ba2197
DH
58642003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5865
5866 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
5867
79f55b7c
MD
58682003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5869
a502595f
MD
5870 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
5871 always being false by inserting preprocessor conditional. (Thanks
5872 to Bruce Korb.)
5873
79f55b7c
MD
5874 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
5875 (void *) in order to avoid an aliasing warning; thanks to Bruce
5876 Korb.)
5877
5878 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
5879
5880 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
5881 SCM_STACK_PTR.
5882
5883 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
5884 thread->base --> t->base.
5885
5886 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
5887
47dee228
MV
58882003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5889
5890 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
5891 scm_variable_set_name_hint, scm_builtin_variable,
5892 scm_internal_with_fluids, scm_make_gsubr,
5893 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
5894 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
5895 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
5896 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
5897 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
5898 scm_make_subr_with_generic, scm_make_subr_opt,
5899 scm_call_catching_errors, scm_make_smob_type_mfpe,
5900 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
5901 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
5902 branch. Some have been slightly rewritten.
5903 (scm_i_object_chars, scm_i_object_length): New, to support
5904 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
5905
e681d187
DH
59062003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
5907
5908 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
5909 names and inits in the memoized code of do.
5910
7e59d9d4
MD
59112003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5912
5913 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
5914 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
5915 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
5916 a compilation error if error-on-warning is enabled).
5917
9950a42c
MV
59182003-05-17 Marius Vollmer <mvo@zagadka.de>
5919
5920 * c-tokenize.lex: Gobble up complete lines after a '#'. This
5921 removes preprocessor directives from the snarfage that might
5922 otherwise confuse us. These directives appear when compiling with
5923 "-g3", for example.
5924
0068984b
HWN
59252003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5926
26e68795
HWN
5927 * ChangeLog: add my surname
5928
0068984b
HWN
5929 * srcprop.c (scm_finish_srcprop): use
5930 scm_gc_register_collectable_memory()
5931 (scm_make_srcprops): idem.
5932
131805f0
HWN
59332003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5934
5935 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
5936 wrap-around for scm_mtrigger
5937 (scm_gc_register_collectable_memory): abort on overflowing
5938 scm_mallocated().
5939
d4611024
KR
59402003-05-13 Kevin Ryde <user42@zip.com.au>
5941
5942 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
5943 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
5944
7aaf8dc9
MD
59452003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5946
dfd03fb9
MD
5947 * backtrace.c (scm_display_error_message): Introduced fancy
5948 printing with max level 7 and length 10. (Purpose: avoid printing
5949 gigantic objects in error messages.)
5950
5951 * print.c, print.h (scm_i_port_with_print_state): New function.
5952
5953 * print.c (scm_iprin1, scm_printer_apply,
5954 scm_port_with_print_state): Use scm_i_port_with_print_state.
5955 (scm_simple_format): Modified not to destroy print states.
5956 (print_state_mutex): New mutex.
5957 (scm_make_print_state, scm_free_print_state, scm_prin1):
5958 Lock/unlock print_state_mutex.
5959
7aaf8dc9
MD
5960 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
5961 Use current names in definitions.
5962
a4d9ffa1
KR
59632003-05-10 Kevin Ryde <user42@zip.com.au>
5964
5965 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
5966
d25e96a4
KR
5967 * numbers.c (scm_integer_length): On negative bignums, adjust
5968 mpz_sizeinbase to account for it looking at absolute value where we
5969 want ones-complement.
5970
5971 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
5972 since we're only using the ulong return value, and x might not fit.
5973
5bf6a6f0
DH
59742003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5975
5976 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
5977 read. This will allow to make the definition in read.c static.
5978
f58c472a
DH
59792003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5980
5981 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
5982 from evalext to eval. This will allow to make some of the
5983 definitions in eval.c static.
5984
90382aeb
KR
59852003-05-06 Kevin Ryde <user42@zip.com.au>
5986
5987 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
5988 (scm_logcount): Use mpz_com, not mpz_neg.
5989
3b88ed2a
DH
59902003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5991
5992 The purpose of this patch is to make guile's internal memoizers
5993 distinguishable from memoizing macros created on the scheme level
5994 or from user provided primitive memoizing macros. The reason is,
5995 that the internal memoizers are the only ones that are allowed to
5996 transform their scheme input into memoizer byte code, while all
5997 other memoizing macros may only transform scheme code into new
5998 scheme code.
5999
6000 To achieve this, a new macro type 'builtin-macro!' is introduced.
6001 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6002 this will change when the memoizer and executor are separated.
6003
6004 * macros.[ch] (scm_i_makbimacro): New.
6005
6006 * macros.h (SCM_BUILTIN_MACRO_P): New.
6007
6008 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6009
6010 * eval.c, goops.c: All of guile's primitive memoizing macros are
6011 primitive builtin-macros now.
6012
6013 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6014 builtin-macros are handled equally to memoizing macros.
6015
b0780eb1
MV
60162003-05-04 Marius Vollmer <mvo@zagadka.de>
6017
6018 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6019 work around a bug in GCC 2.95.2 but is now a bug in itself.
6020
1cbf4fe9
MV
60212003-05-02 Marius Vollmer <mvo@zagadka.de>
6022
6023 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6024 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6025 scm_tcs_symbols): New.
6026
1a61d41b
MV
60272003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6028
096ecbaf
MV
6029 * deprecated.h, deprecated.c (scm_protect_object,
6030 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6031 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6032 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6033 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6034 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6035 scm_ptob_descriptor, scm_port_rw_active,
6036 scm_close_all_ports_except): New.
6037
1a61d41b
MV
6038 * ports.c (scm_c_port_for_each): New function, mostly copied from
6039 scm_port_for_each.
6040 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6041 * ports.h (scm_c_port_for_each): New prototype.
6042
c8e1d354
MD
60432003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6044
6045 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6046 macro was introduced in anticipation of GOOPS method compilation
6047 code.)
6048
6049 * goops.c: Removed binding of @dispatch.
6050
a4aa2134
DH
60512003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6052
6053 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6054 instructions that bind the macros on the scheme level back to
6055 goops.c in order to make sure again that the bindings go into the
6056 (oop goops) module and are not visible from the outside.
6057
9fbee57e
DH
60582003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6059
6060 * eval.c: Non functional change: Separated R5RS and non-R5RS
6061 macros into different sections of the file and ordered the
6062 memoizers alphabetically.
6063
12841895
DH
60642003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6065
6066 * eval.c (scm_ilookup): Rewritten to improve readability.
6067
6a3f13f0
DH
60682003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6069
6070 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6071 Partially reverted patch from 2003-04-23 in oder to find a better
6072 compromise between readability and debuggability.
6073
b0c5d67b
DH
60742003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6075
6076 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6077 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6078 definitions of the special goops memoizers from goops.[ch] to
6079 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6080 throughout guile.
6081
b9ad392e
MD
60822003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6083
6084 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6085
6086 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6087
6088 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6089
6090 * ioext.c (scm_fdes_to_ports): Ditto.
6091
6092 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6093 lock/unlock scm_i_port_table_mutex.
6094
6095 * strports.c (scm_mkstrport): Ditto.
6096
6097 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6098
6099 * fports.c (scm_fdes_to_port): Ditto.
6100
d0b07b5d
DH
61012003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6102
6103 This set of patches contains no functional changes, only debatable
6104 minor stylistic ones. Still, in order to prepare a patch between
6105 my local copy and the CVS version, I decided to submit the changes
6106 below. Then, the patch will hopefully only contain relevant
6107 modifications :-)
6108
6109 * eval.c (iqq): Added const specifier.
6110
6111 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6112 Use NULL instead of 0 to indicate that a pointer is returned.
6113 Removed some misleading 'fall through' comments.
6114
6115 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6116 Split up long expressions into smaller ones to be more debugging
6117 friendly.
6118
a98e8e98
DH
61192003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6120
6121 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6122 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6123 rather than casting to SCM.
6124
c178c3a6
DH
61252003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6126
6127 * sort.c, pairs.h: Removed unnecessary includes.
6128
d339981a
DH
61292003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6130
6131 * sort.c: Replaced hand-made trampline code by the new official
6132 mechanism from eval.c. This fixes a segfault in the new test file
6133 sort.test.
6134
6135 (quicksort, compare_function, scm_restricted_vector_sort_x,
6136 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6137 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6138 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6139 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6140 eval.c.
6141
6142 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6143 cmp_fun_t): Removed.
6144
6145 (compare_function): Added.
6146
6147 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6148 arithmetics with index arithmetics. Changed quicksort to work on
6149 an array of SCM values instead of an array of characters. Avoid
6150 bytewise copying of SCM elements. Avoid allocating memory on the
6151 stack with alloca. Fixed some comments.
6152
821f18a4
DH
61532003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6154
6155 * eval.c (EXTEND_ENV): Eliminated.
6156
6157 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6158 EXTEND_ENV.
6159
94fb5a6e
DH
61602003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6161
6162 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6163
6164 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6165 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6166
6167 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6168 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6169 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6170 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6171 functions such that they check if the object is a non-immediate.
6172 Further, renamed identifiers to use the scm_dbg_ prefix and made
6173 their inclusion into the lib dependent of the
6174 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6175
fce0b22d
DH
61762003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6177
6178 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6179 debug option.
6180
1685446c
DH
61812003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6182
821f18a4 6183 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6184 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6185 any calls to SCM_NCONSP any more.
6186
6187 * unif.c (l2ra): Eliminate redundant check.
6188
9ff1720f
DH
61892003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6190
6191 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6192 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6193 SCM_NNULLP. Now, guile itself does not include any calls to
6194 SCM_NNULLP any more.
6195
05b15362
DH
61962003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6197
6198 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6199 scm_copy_tree): Place assignment expressions which are part of
6200 other expressions into an expression of their own.
6201
0c88d7df
DH
62022003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6203
6204 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6205 compare SCM values with !=.
6206
5cb22e96
DH
62072003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6208
6209 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6210 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6211 and definition of the memoizer for the generalized set! macro from
6212 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6213 define the macro object.
6214
6215 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6216 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6217 eval.c, it is made static and renamed to s_set_x.
6218
6219 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6220 over SCM_N<foo>.
6221
a44a9715
DH
62222003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6223
6224 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6225 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6226 to undefineds and registered the object as a permanent object.
6227
6228 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6229 static in eval.c, renamed it to f_apply and registered the object
6230 as a permanent object.
6231
1b43d24c
DH
62322003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6233
5cb22e96 6234 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6235 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6236
aec16f99
DH
62372003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6238
6239 * numbers.c (scm_logtest): Fixed argument bug in the call to
6240 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6241
f96460ce
DH
62422003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6243
6244 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6245 type errors that showed up when compiling with SCM_DEBUG defined.
6246
d0f6ceb8
DH
62472003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6248
6249 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6250 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6251 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6252 fix compile errors with --disable-deprecated.
6253
19a7a089
RB
62542003-04-17 Rob Browning <rlb@defaultvalue.org>
6255
6256 * numbers.c (scm_integer_expt): fix case where we were declaring
6257 vars in the middle of a statement block. Thanks to Thamer
6258 Al-Harbash.
6259
47cd67db
MD
62602003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6261
0fd7dcd3
MD
6262 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6263 change.
6264
47cd67db
MD
6265 * eq.c (scm_eqv_p): Turned into a primitive generic.
6266
3b8b889c
RB
62672003-04-16 Rob Browning <rlb@defaultvalue.org>
6268
312006bb
RB
6269 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6270 Thanks to Boyd Gerber.
6271 Added check for __arm__ in addition to arm for LINUX and copied
6272 __s390__ defines from upstream libgc. Thanks to James Treacy for
6273 reporting the problems.
c7ef2ea1 6274
3b8b889c
RB
6275 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6276
6277 * socket.c: use SCM_CHAR_BIT.
6278
6279 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6280
6281 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6282
43261b39
MD
62832003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6284
6285 * feature.c (scm_init_feature): Always add threads feature.
6286
58241edc
MD
62872003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6288
6289 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6290 scm_at_assert_bound_ref. (We don't want the unbound check. See
6291 oop/goops/active-slot.scm.)
6292
94e91275
RB
62932003-04-14 Rob Browning <rlb@defaultvalue.org>
6294
6295 * tags.h: scm_t_intptr should have been intptr_t.
6296
3071ea27
RB
62972003-04-13 Rob Browning <rlb@defaultvalue.org>
6298
6299 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6300 test. Instead use
6301 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6302 as gc_os_dep.c suggests is appropriate.
6303
6304 * goops.c (prep_hashsets): make static to match prototype.
6305 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6306 Chin.
6307
6308 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6309 Albert Chin.
6310
6311 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6312 Klausner.
6313
21ab2aeb
MD
63142003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6315
6316 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6317 indicated through extra fields in getters-n-setters.
6318 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6319 (Thanks to Andy Wingo.)
6320
dff96e95
HWN
63212003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6322
6323 * gc-segment.c: add comment
6324
07921c76
RB
63252003-04-07 Rob Browning <rlb@defaultvalue.org>
6326
b5331f10
RB
6327 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6328 clash.
6329
07921c76
RB
6330 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6331 and add regression test to standalone/.
6332
63332003-04-06 Rob Browning <rlb@defaultvalue.org>
6334
6335 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6336 Thanks to Dale P. Smith.
6337
6338 * random.c: #include gmp.h.
6339 (scm_c_random_bignum): normalize result on return.
6340
6341 * init.c: #include gmp.h.
6342
6343 * numbers.h: remove the gmp.h #include (not needed now).
6344
6345 * posix.h: change occurences of "id" to something else so we don't
6346 cause trouble when included via objective-c (can't hurt, might
6347 help). Still have usage in debug.h, though.
6348
938f6b7c
MD
63492003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6350
372691d8
MD
6351 * random.c (scm_c_random_bignum): Don't generate a random number
6352 equal to m (the second argument of scm_c_random_bignum); only
6353 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6354 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6355 scm_var_random_state.
372691d8 6356
938f6b7c
MD
6357 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6358 clause.
6359
6cdb8c3f
RB
63602003-04-05 Rob Browning <rlb@defaultvalue.org>
6361
938f6b7c 6362 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6363 uses before any code.
6364
15635be5
MD
63652003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6366
1ecfd013
MD
6367 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6368 not top_srcdir.
6369
15635be5
MD
6370 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6371 processing it in order to avoid an infinite loop.
6372
6373 * print.c (scm_prin1): Remember old state of pstate->writingp.
6374
73be1d9e
MV
63752003-04-05 Marius Vollmer <mvo@zagadka.de>
6376
6377 * Changed license terms to the plain LGPL thru-out.
6378
ad815c06
RB
63792003-04-04 Rob Browning <rlb@defaultvalue.org>
6380
6381 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6382 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6383 rewrite to handle GMP bignums.
6384
6385
6386 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6387
6388 * ports.c (scm_getc): minor tweak.
6389
6390 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6391 rewrite to handle GMP bignums.
6392
6393 * numbers.c: rewrite *many* functions to handle GMP bignums.
6394
6395 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6396 handle GMP bignums.
6397
6398 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6399
6400 * init.c (check_config): remove SCM_BIGDIG conditionals.
6401 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6402
6403 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6404
6405 * eval.c: remove SCM_BIGDIG conditionals.
6406
6407 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6408
6cdb8c3f
RB
64092003-03-31 Rob Browning <rlb@defaultvalue.org>
6410
6411 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6412 to Kevin Ryde.)
6413
64142003-03-27 Rob Browning <rlb@defaultvalue.org>
6415
6416 * threads.h: fix various preprocessor usages of new public
6417 symbols to expect 0 or 1 values rather than 1 or undefined.
6418 i.e. change #ifdef to #if, etc.
6419
6420 * threads.c: fix various preprocessor usages of new public
6421 symbols to expect 0 or 1 values rather than 1 or undefined.
6422 i.e. change #ifdef to #if, etc.
6423
6424 * tags.h: fix various preprocessor usages of new public
6425 symbols to expect 0 or 1 values rather than 1 or undefined.
6426 i.e. change #ifdef to #if, etc.
6427
6428 * stacks.c: fix various preprocessor usages of new public
6429 symbols to expect 0 or 1 values rather than 1 or undefined.
6430 i.e. change #ifdef to #if, etc.
6431
6432 * stackchk.h: fix various preprocessor usages of new public
6433 symbols to expect 0 or 1 values rather than 1 or undefined.
6434 i.e. change #ifdef to #if, etc.
6435
6436 * stackchk.c: fix various preprocessor usages of new public
6437 symbols to expect 0 or 1 values rather than 1 or undefined.
6438 i.e. change #ifdef to #if, etc.
6439
6440 * sort.c: fix various preprocessor usages of new public
6441 symbols to expect 0 or 1 values rather than 1 or undefined.
6442 i.e. change #ifdef to #if, etc.
6443
6444 * read.c: fix various preprocessor usages of new public
6445 symbols to expect 0 or 1 values rather than 1 or undefined.
6446 i.e. change #ifdef to #if, etc.
6447
6448 * random.c: fix various preprocessor usages of new public
6449 symbols to expect 0 or 1 values rather than 1 or undefined.
6450 i.e. change #ifdef to #if, etc.
6451
6452 * print.c: fix various preprocessor usages of new public
6453 symbols to expect 0 or 1 values rather than 1 or undefined.
6454 i.e. change #ifdef to #if, etc.
6455
6456 * objects.c: fix various preprocessor usages of new public
6457 symbols to expect 0 or 1 values rather than 1 or undefined.
6458 i.e. change #ifdef to #if, etc.
6459
6460 * numbers.h: fix various preprocessor usages of new public
6461 symbols to expect 0 or 1 values rather than 1 or undefined.
6462 i.e. change #ifdef to #if, etc.
6463
6464 * null-threads.c: fix various preprocessor usages of new public
6465 symbols to expect 0 or 1 values rather than 1 or undefined.
6466 i.e. change #ifdef to #if, etc.
6467
6468 * lang.c: fix various preprocessor usages of new public
6469 symbols to expect 0 or 1 values rather than 1 or undefined.
6470 i.e. change #ifdef to #if, etc.
6471
6472 * lang.h: fix various preprocessor usages of new public
6473 symbols to expect 0 or 1 values rather than 1 or undefined.
6474 i.e. change #ifdef to #if, etc.
6475
6476 * iselect.h: fix various preprocessor usages of new public
6477 symbols to expect 0 or 1 values rather than 1 or undefined.
6478 i.e. change #ifdef to #if, etc.
6479
6480 * init.c: fix various preprocessor usages of new public
6481 symbols to expect 0 or 1 values rather than 1 or undefined.
6482 i.e. change #ifdef to #if, etc.
6483
6484 * gh_data.c: fix various preprocessor usages of new public
6485 symbols to expect 0 or 1 values rather than 1 or undefined.
6486 i.e. change #ifdef to #if, etc.
6487
6488 * gh.h: fix various preprocessor usages of new public
6489 symbols to expect 0 or 1 values rather than 1 or undefined.
6490 i.e. change #ifdef to #if, etc.
6491
6492 * gen-scmconfig.c: change most new public symbols to be defined to
6493 0 or 1 rather than being either 1 or undefined.
6494
6495 * gc_os_dep.c: fix various preprocessor usages of new public
6496 symbols to expect 0 or 1 values rather than 1 or undefined.
6497 i.e. change #ifdef to #if, etc.
6498 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6499
6500 * gc.h: fix various preprocessor usages of new public
6501 symbols to expect 0 or 1 values rather than 1 or undefined.
6502 i.e. change #ifdef to #if, etc.
6503
6504 * gc-card.c: fix various preprocessor usages of new public
6505 symbols to expect 0 or 1 values rather than 1 or undefined.
6506 i.e. change #ifdef to #if, etc.
6507
6508 * gc-mark.c: fix various preprocessor usages of new public
6509 symbols to expect 0 or 1 values rather than 1 or undefined.
6510 i.e. change #ifdef to #if, etc.
6511
6512 * feature.c: fix various preprocessor usages of new public
6513 symbols to expect 0 or 1 values rather than 1 or undefined.
6514 i.e. change #ifdef to #if, etc.
6515
6516 * evalext.c: fix various preprocessor usages of new public
6517 symbols to expect 0 or 1 values rather than 1 or undefined.
6518 i.e. change #ifdef to #if, etc.
6519
6520 * eval.h: fix various preprocessor usages of new public
6521 symbols to expect 0 or 1 values rather than 1 or undefined.
6522 i.e. change #ifdef to #if, etc.
6523
6524 * eval.c: fix various preprocessor usages of new public
6525 symbols to expect 0 or 1 values rather than 1 or undefined.
6526 i.e. change #ifdef to #if, etc.
6527
6528 * eq.c: fix various preprocessor usages of new public
6529 symbols to expect 0 or 1 values rather than 1 or undefined.
6530 i.e. change #ifdef to #if, etc.
6531
6532 * coop.c: fix various preprocessor usages of new public
6533 symbols to expect 0 or 1 values rather than 1 or undefined.
6534 i.e. change #ifdef to #if, etc.
6535
6536 * coop-threads.c: fix various preprocessor usages of new public
6537 symbols to expect 0 or 1 values rather than 1 or undefined.
6538 i.e. change #ifdef to #if, etc.
6539
6540 * coop-pthreads.c: fix various preprocessor usages of new public
6541 symbols to expect 0 or 1 values rather than 1 or undefined.
6542 i.e. change #ifdef to #if, etc.
6543
6544 * coop-defs.h: fix various preprocessor usages of new public
6545 symbols to expect 0 or 1 values rather than 1 or undefined.
6546 i.e. change #ifdef to #if, etc.
6547
6548 * convert.i.c: fix various preprocessor usages of new public
6549 symbols to expect 0 or 1 values rather than 1 or undefined.
6550 i.e. change #ifdef to #if, etc.
6551
6552 * continuations.c: fix various preprocessor usages of new public
6553 symbols to expect 0 or 1 values rather than 1 or undefined.
6554 i.e. change #ifdef to #if, etc.
6555
6556 * _scm.h: fix various preprocessor usages of new public symbols to
6557 expect 0 or 1 values rather than 1 or undefined. i.e. change
6558 #ifdef to #if, etc.
6559
d11d697a
MV
65602003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6561
9686f86d
MV
6562 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6563
6564 * deprecated.c, deprecated.h: New files, to collect deprecated
6565 things in one place.
6566 * Makefile.am: Added them in all the right places.
6567
d11d697a
MV
6568 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6569 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6570 builds work.
9686f86d
MV
6571 (DOT_X_FILES): Removed "iselect.x".
6572 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 6573
e3c0c3b9
RB
65742003-03-25 Rob Browning <rlb@defaultvalue.org>
6575
6576 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6577 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6578
6579 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6580
6581 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6582
6583 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6584 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6585
6586 * threads.h: replace usage of struct timespect with
6587 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6588 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6589 favor of scm_t_timespec from scmconfig.h.
6590
6591 * threads.c: move libguile/_scm.h include to the top so we pick up
6592 any critical defines like _GNU_SOURCE early. Replace usage of
6593 struct timespect with scm_t_timespec. Replace usage of
6594 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
6595 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
6596
6597 * threads-plugin.h: replace usage of struct timespect with
6598 scm_t_timespec.
6599
6600 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
6601 usage of struct timespect with scm_t_timespec.
6602
6603 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
6604 HAVE_INTTYPES_H handling to scmconfig.h. #include
6605 "libguile/__scm.h". Rework handling for scm_t_bits,
6606 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
6607 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
6608 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
6609 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
6610 SCM_HAVE_ARRAYS.
6611
6612 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
6613
6614 * struct.c: #include <config.h> if HAVE_CONFIG_H.
6615
6616 * strports.c: #include <config.h> if HAVE_CONFIG_H.
6617
6618 * strop.c: #include <config.h> if HAVE_CONFIG_H.
6619
6620 * stime.h: move handling of time related headers to scmconfig.h.
6621
6622 * stime.c: #include <config.h> if HAVE_CONFIG_H.
6623
6624 * stacks.c: replace usage of STACK_GROWS_UP with
6625 SCM_STACK_GROWS_UP.
6626
6627 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6628 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6629
6630 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6631 of uint32 and HAVE_UINT_32 with scm_t_int32.
6632
6633 * smob.c: #include <config.h> if HAVE_CONFIG_H.
6634
6635 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
6636
6637 * script.c: #include <config.h> if HAVE_CONFIG_H.
6638
6639 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
6640
6641 * scmconfig.h.top: new file -- preamble for scmconfig.h.
6642
6643 * rw.c: #include <config.h> if HAVE_CONFIG_H.
6644
6645 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
6646
6647 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6648
6649 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
6650
6651 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6652 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
6653 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
6654 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6655
6656 * ramap.c: replace usage of HAVE_LONG_LONGS with
6657 "SCM_SIZEOF_LONG_LONG != 0".
6658
6659 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
6660 "libguile/scmconfig.h".
6661
6662 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
6663
6664 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6665 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6666
6667 * posix.c: #include <config.h> if HAVE_CONFIG_H.
6668
6669 * ports.c: #include <config.h> if HAVE_CONFIG_H.
6670
6671 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6672
6673 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
6674 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
6675 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
6676 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
6677 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
6678 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
6679 "SCM_SIZEOF_LONG_LONG != 0".
6680
6681 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6682 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
6683 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
6684 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
6685
6686 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
6687
6688 * null-threads.h: replace usage of struct timespect with
6689 scm_t_timespec.
6690
6691 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
6692
6693 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
6694 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
6695 scm_t_uint64 and rename usages.
6696
6697 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
6698
6699 * load.c: #include <config.h> if HAVE_CONFIG_H.
6700
6701 * iselect.h: move handling of time related headers to scmconfig.h.
6702 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
6703 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
6704 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
6705
6706 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6707 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6708 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
6709
6710 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
6711
6712 * inline.h: #include "libguile/__scm.h" at the top. Change code
6713 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
6714 what to do instead of creating a new public #define. Rename usage
6715 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6716 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
6717 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
6718
6719 * inline.c: rearrange handling -- now we just #define
6720 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
6721 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
6722 appropriate, and we use that in inline.h along with the above
6723 define to determine how to respond.
6724
6725 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6726 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6727
6728 * guile.c: #include <config.h> if HAVE_CONFIG_H.
6729
6730 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6731 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6732
6733 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6734
6735 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
6736
6737 * gen-scmconfig.c: new file -- see comments in file for details.
6738
6739 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
6740
6741 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
6742 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
6743
6744 * gc.h: replace usage of SIZEOF_LONG with
6745 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
6746 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
6747 since we handle that in scmconfig.h now.
6748
6749 * gc.c: #include <config.h> if HAVE_CONFIG_H.
6750
6751 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6752 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
6753 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6754
6755 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
6756
6757 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6758 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6759
6760 * fports.c: #include <config.h> if HAVE_CONFIG_H.
6761
6762 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
6763
6764 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6765 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
6766
6767 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
6768
6769 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6770 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6771
6772 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
6773 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
6774 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
6775 with "SCM_SIZEOF_LONG_LONG != 0".
6776
6777 * error.c: #include <config.h> if HAVE_CONFIG_H.
6778
6779 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6780 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
6781 with "SCM_SIZEOF_LONG_LONG != 0".
6782
6783 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
6784
6785 * coop.c: replace usage of struct timespect with scm_t_timespec.
6786 #include <config.h> if HAVE_CONFIG_H.
6787
6788 * coop-threads.c: #include "libguile/_scm.h" early. Replace
6789 usage of struct timespect with scm_t_timespec. Replace usage of
6790 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
6791
6792 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
6793 usage of struct timespect with scm_t_timespec. Replace usage of
6794 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
6795
6796 * coop-defs.h: move handling of time related headers to
6797 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
6798 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
6799 timespect with scm_t_timespec.
6800
6801 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6802
6803 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6804
6805 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6806 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6807
6808 * continuations.c: move libguile/_scm.h include to the top so we
6809 pick up any critical defines like _GNU_SOURCE early.
6810
6811 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
6812
6813 * async.c: #include <config.h> if HAVE_CONFIG_H.
6814
6815 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
6816
6817 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
6818 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
6819
6820 * __scm.h: move libguile/scmconfig.h include up to the top, so
6821 we're sure to pick up any critical defines like _GNU_SOURCE early.
6822 #include <limits.h> removed in favor of scmconfig.h inclusion when
6823 appropriate. STDC_HEADERS based inclusion of stdlib.h,
6824 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
6825 scmconfig.h inclusion when appropriate. Various Win32 related
6826 definitions removed in favor of scmconfig.h inclusion when
6827 appropriate.
6828 (HAVE_UINTPTR_T): definition removed (see NEWS).
6829 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
6830 (HAVE_LONG_LONGS): definition removed (see NEWS).
6831 (HAVE_LONG_LONG): definition removed (see NEWS).
6832 (HAVE_PTRDIFF_T): definition removed (see NEWS).
6833
6834 * Makefile.am: scmconfig.h is now generated by building and
6835 running gen-scmconfig.h and capturing its output. gen-scmconfig
6836 uses config.h and the configure.in generated gen-scmconfig.h to
6837 decide what to output. See gen-scmconfig.c for details.
6838 (noinst_PROGRAMS): add gen-scmconfig.
6839 (gen_scmconfig_SOURCES): new variable.
6840 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
6841 cross-compiling right.
6842 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
6843 (BUILT_SOURCES): add scmconfig.h.
6844
25e0bf97
MV
68452003-03-19 Marius Vollmer <mvo@zagadka.de>
6846
6847 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
6848 Adrian Bunk. Thanks!
6849
74b6d6e4
MD
68502003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6851
6852 * goops.c (make_class_from_template): New fourth arg:
6853 applicablep.
6854 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
6855 cpls.
6856
6857 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
6858
6859 * goops.c, objects.c, objects.h (scm_make_extended_class): New
6860 second arg: applicablep.
6861 (scm_i_inherit_applicable): New function.
6862
6863 * goops.c, goops.h (scm_class_applicable,
6864 scm_class_extended_accessor): New classes.
6865
5c9e7dad
DH
68662003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6867
6868 * procs.c (scm_procedure_documentation): Removed redundant
6869 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
6870 predicates.
6871
f8af5c6d
MD
68722003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6873
c614a00b
MD
6874 * list.c, list.h (scm_filter, scm_filter_x): New functions.
6875
109c2c9f
MD
6876 * modules.c (scm_module_import_interface): New function.
6877
f8af5c6d
MD
6878 * goops.c, goops.h (scm_class_accessor_method): Renamed from
6879 scm_class_accessor.
6880 (scm_class_accessor): New class.
6881
a48d60b1
MD
68822003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6883
6884 * goops.c (scm_primitive_generic_generic): Enable primitive
6885 generic if not enabled.
6886 (scm_sys_goops_loaded): Setup unextended primitive generics.
6887
6888 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
6889
6890 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
6891 snarf macros.
6892
6893 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
6894 testing example. All uses of SCM_GPROC should be converted.)
6895
6896 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
6897 scm_assoc.
6898
6899 * eq.c (scm_equal_p): Turned into a primitive generic.
6900
84edc049
RB
69012003-02-27 Rob Browning <rlb@defaultvalue.org>
6902
6903 * Makefile.am (scmconfig.h): new target -- generate file from
6904 ../config.h.
6905 (modinclude_HEADERS): remove version.h.
6906 (nodist_modinclude_HEADERS): add version.h.
6907
ea5c9285
MD
69082003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6909
b4a1358c
MD
6910 This fixes a serious GC bug, introduced during the latest
6911 reorganization of the GC, which disabled freeing of structs and
6912 GOOPS objects:
6913
6914 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
6915 SCM_EOL.
53af8255
MD
6916 (scm_struct_prehistory): Move scm_free_structs to
6917 scm_before_mark_c_hook.
ea5c9285 6918
b4a1358c
MD
6919 * gc-card.c (sweep_card): Check that we haven't swept structs on
6920 this card before. That can happen if scm_i_sweep_all_segments has
6921 been called from some other place than scm_igc.
6922
c35738c1
MD
69232003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6924
231a4ea8
MD
6925 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
6926 (since hash tables now adapt their size).
6927
6928 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
6929 (current number of prehistory bindings; hashtable code will select
6930 a prime which is greater than this value).
6931
6932 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
6933 (current number of initial symbols).
6934
6935 * properties.c (scm_init_properties): Don't specify size of
6936 scm_properties_whash.
6937
6938 * objprop.c (scm_init_objprop): Don't specify size of
6939 scm_object_whash.
6940
6941 * keywords.c (scm_init_keywords): Don't specify a hash table size.
6942
c35738c1
MD
6943 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
6944
6945 The following changes introduce the use of resizable hash tables
6946 throughout Guile. It also renames the old *-hash-table* functions
6947 to *-alist-vector* and places them, together with the rest of the
6948 weak vector support, in the module (ice-9 weak-vector). We should
6949 probably introduce a new, better, API for weak references, for
6950 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
6951 look like and are used like ordinary pairs.)
6952
6953 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
6954 leaf_environment_fold, obarray_remove_all): Use hashtable
6955 accessors.
6956
6957 * gc.c (scm_init_storage): Moved hook initialization to
6958 scm_storage_prehistory.
6959 (scm_storage_prehistory): New function.
6960 (scm_igc): Added commentary about placement of
6961 scm_after_sweep_c_hook.
6962
6963 * gc-mark.c (scm_mark_all): Use hashtable accessors.
6964 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
6965 SCM_WVECT_WEAK_VALUE_P.
6966
6967 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
6968 functions.
6969 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
6970 Removed.
6971 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
6972 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
6973
6974 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
6975 calls to scm_storage_prehistory and scm_hashtab_prehistory.
6976
6977 * modules.c (module-reverse-lookup): Use hashtable accessors.
6978
6979 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
6980
6981 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
6982 scm_make_weak_value_alist_vector,
6983 scm_make_doubly_weak_alist_vector): New functions.
6984
6985 * weaks.c (scm_init_weaks_builtins): New function.
6986
6987 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
6988 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
6989 SCM_WVECT_NOSCAN_P): New macros.
6990
6991 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
6992 and SCM_WVECT_WEAK_VALUE_P.
6993
6994 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
6995 allocate_weak_vector and exported.
6996
0a4c1355
MD
69972003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6998
6999 * hashtab.c: Undid thread safety. (We decided that it's better to
7000 let the user explicitly protect the tables (or not) according what
7001 is suitable for the application.)
7002
87ca11ff
MD
70032003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7004
7005 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7006 thread safe and handle resizing tables.
7007 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7008 SCM_DEFER/ALLOW_INTS.
7009
f59a096e
MD
70102003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7011
7012 * hashtab.c (scm_vector_to_hash_table,
7013 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7014 functions.
7015 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7016 safe and handle resizing tables.
7017
7018 * weaks.c (scm_make_weak_key_hash_table,
7019 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7020 Size argument made optional. Return resizable table if not
7021 specified.
7022
4b612c5b
MD
70232003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7024
7025 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7026 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7027
b3d7f6df
MD
70282003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7029
7030 * debug.c (scm_procedure_source): Handle all objects for which
7031 procedure? is #t. (Thanks to Bill Schottstaedt.)
7032
756414cf
MD
70332003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7034
361d631f
MD
7035 * futures.c (mark_futures): Don't need to mark data of recycled
7036 futures.
7037 (scan_futures, cleanup_undead): Be smarter about marking
7038 futures---avoid unnecessary passes through future lists.
7039
756414cf
MD
7040 * futures.h, futures.c: New files; Introduced recycling of
7041 futures. For fine-grained threading this lifts performance to
7042 another level. We can now use parallelization in inner loops of
7043 Guile programs without impossible overhead.
7044
7045 * threads.h, threads.c: Moved futures to their own file.
7046
7047 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7048 (DOT_X_FILES): Added futures.x.
7049 (DOT_DOC_FILES): Added futures.doc.
7050 (modinclude_HEADERS): Added futures.h.
7051
7052 * threads.c, threads.h (scm_i_create_thread): Renamed from
7053 create_thread and made global.
7054
7055 * futures.c (scm_make_future): New procedure.
7056
7057 * eval.c: #include "libguile/futures.h".
7058
7059 * init.c: #include "futures.h"
7060 (scm_init_guile_1): Call scm_init_futures.
7061
7062 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7063
7064 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7065
7066 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7067 functions.
7068
7069 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7070
b4debead
MD
70712003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7072
7073 * threads.c (create_thread): Don't unwind dynwind chain of parent
7074 thread before creation. Just start the new thread with an empty
7075 dynwind chain.
7076
93f26b7b
MD
70772003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7078
7079 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7080
38d8927c
MD
70812003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7082
41c96c32
MD
7083 * threads.c (scm_timed_wait_condition_variable): Support timed
7084 waiting also for simple condition variables.
7085
38d8927c
MD
7086 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7087 of calling the procedure change-object-class.
7088
9cf5d9b7
MD
70892003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7090
7091 * ramap.c (scm_ramapc): Typo in error message.
7092
bbf8d523
MD
70932003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7094
b46fae00
MD
7095 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7096 slots with instance allocation.
7097
bbf8d523
MD
7098 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7099 class.
7100 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7101
7102 * goops.c (scm_generic_function_methods): Support extended
7103 generic functions.
7104
ebf9b47c
MD
71052002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7106
7107 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7108 Thanks to Neil for pointing this out!
ebf9b47c 7109
14a9ba3f
NJ
71102002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7111
7112 * lang.h: Remove declarations matching definitions removed from
7113 lang.c (just below).
7114
c6a040a8
NJ
71152002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7116
6054d805
NJ
7117 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7118 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7119 and already commented out.
7120
c6a040a8
NJ
7121 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7122 scm_lreadparen): Support reading vectors with Elisp syntax if
7123 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7124 is not currently defined, and there isn't even a configure switch
7125 to enable it yet.)
7126
3742c12f
MV
71272002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7128
7129 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7130 builds work.
7131 (EXTRA_DIST): Added version.h.in.
7132
fb50ef08
MD
71332002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7134
7135 This change makes it possible for one thread to do lazy sweeping
7136 while other threads are running. Now only the mark phase need to
7137 have all threads asleep. We should look further into this issue.
7138 Presently, I've put the locking of scm_i_sweep_mutex at
7139 "conservative" places due to my current lack of knowledge about
7140 the garbage collector. Please feel free to restrict these regions
7141 further to allow for maximal parallelism!
7142
7143 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7144
7145 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7146 scm_gc_register_collectable_memory): Substitute locking of
7147 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7148 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7149 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7150 the single-thread section (which now only contains the mark
7151 phase).
7152 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7153 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7154
7155 * threads.c (gc_section_mutex): Removed.
7156
9ed24633
MD
71572002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7158
0d48aca5
MD
7159 * threads.c (create_thread): Clear parent field in root state in
7160 order not to unnecessarily remember dead threads.
7161
9ed24633
MD
7162 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7163 (scm_trampoline_1, scm_trampoline_2): Use them.
7164
29717c89
MD
71652002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7166
7167 Partial introduction of real plugin interface.
7168
7169 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7170 (EXTRA_DIST): Added threads-plugin.c.
7171
7172 * threads-plugin.h, threads-plugin.c: New files.
7173
7174 * threads.h: #include "libguile/threads-plugin.h".
7175
7176 * threads.c: #include "libguile/threads-plugin.c".
7177
7178 * pthread-threads.c: Temporarily remove debugging functions.
7179
7180 * threads.c, threads.h (scm_yield): Added back.
7181
e29e0b09
MD
71822002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7183
7184 * threads.c (really_launch): Detach before unlocking
7185 thread_admin_mutex in order not to risk being joined.
7186 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7187 thread_admin_mutex locked during GC.
7188
7189 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7190 functions.
7191
0b6843b1 71922002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7193
6da2dfc4
MD
7194 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7195 support for debugging mutex operations.
7196
1b92fb6b
MD
7197 * threads.c (scm_thread): Removed filed joining_threads.
7198 (thread_print): Print thread number as well as address of thread
7199 structure.
0b6843b1
MD
7200 (scm_join_thread): Bugfix.
7201 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7202 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7203 scm_broadcast_condition_variable): Use the low-level API.
7204 (scm_all_threads): Return copy of thread list (to prevent
7205 unintended destruction).
7206 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7207
93cd4dcd
MD
7208 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7209 pthread "native" recursive mutex support.
7210
2ff4f181
MD
72112002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7212
28d52ebb
MD
7213 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7214 Simply lock a thread C API recursive mutex.
7215 (SCM_NONREC_CRITICAL_SECTION_START,
7216 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7217 SCM_REC_CRITICAL_SECTION_END): Removed.
7218
7219 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7220 direct calls to scm_rec_mutex_lock / unlock around the three calls
7221 to scm_m_expand_body.
7222
7223 * eval.c, eval.h (promise_free): New function.
7224 (scm_force): Rewritten; Now thread-safe; Removed
7225 SCM_DEFER/ALLOW_INTS.
7226
7227 * pthread-threads.h: Added partially implemented plugin interface
7228 for recursive mutexes. These are, for now, only intended to be
7229 used internally within the Guile implementation.
7230
7231 * pthread-threads.c: New file.
7232
7233 * threads.c: Conditionally #include "pthread-threads.c".
7234
7235 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7236 thread-safe;
7237
7238 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7239 SCM_GLOBAL_REC_MUTEX): New macros.
7240
7241 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7242 macros---use mutexes instead.
7243
7244 * tags.h (SCM_IM_FUTURE): New tag.
7245
7246 * eval.c (scm_m_future): New primitive macro.
7247 (SCM_CEVAL): Support futures.
7248 (unmemocopy): Support unmemoization of futures.
7249
7250 * print.c (scm_isymnames): Name of future isym.
7251
2ff4f181
MD
7252 * version.c: Unmade some changes to my private copy that got
7253 committed by mistake.
7254
392d2833
MD
72552002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7256
e200ddee
MD
7257 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7258 2002-12-10.
7259
392d2833
MD
7260 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7261
7262 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7263 logical place.
7264
7265 * threads.c (create_thread): Remember root object until the handle
7266 of the new thread is on all_threads list.
7267
7268 * root.c (scm_make_root): Moved copying of fluids until after
7269 creation of root handle so that the fluids are GC protected. Also
7270 removed the critical section.
7271
c4c52ebe
MD
72722002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7273
960c408c
MD
7274 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7275
3cdde9d6 7276 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7277 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7278 (scm_realloc): Serialize call to realloc
7279 (scm_calloc): Same for calloc.
7280 Thanks to Wolfgang Jaehrling!
7281 (Now we have to make sure all calls to malloc/realloc are made
7282 through scm_malloc.)
7283
960c408c
MD
7284 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7285
c4c52ebe
MD
7286 * threads.c (really_launch): Release heap (to prevent deadlock).
7287 (create_thread): Release heap before locking thread admin mutex.
7288
b0dc3d71
MD
72892002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7290
7291 * threads.c (scm_i_thread_invalidate_freelists): New
7292 function.
7293
7294 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7295
7296 * modules.c (scm_export): Inserted a return statement.
7297
06e80f59
HWN
72982002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7299
7300 * modules.c (scm_export): new function
7301
7302 * gc-card.c: add a note about malloc()/free() overhead.
7303
a12611c3
MD
73042002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7305
7306 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7307 in srcdir.
7308
c7fabadf
MD
73092002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7310
7311 These changes remove scm_ints_disabled (which hasn't has any
7312 effect in Guile for quite some time).
7313
7314 * async.c, error.h (scm_ints_disabled): Removed.
7315
7316 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7317 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7318 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7319 (old_ints): Removed.
7320
7321 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7322 critical section.
7323 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7324 SCM_ALLOW_INTS.
7325
9bc4701c
MD
73262002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7327
52340b65
MD
7328 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7329 Removed accidental #if 0 around these functions.
7330
9bc4701c
MD
7331 These changes are the start of support for preemptive
7332 multithreading. Marius and I have agreed that I commit this code
7333 into the repository although it isn't thoroughly tested and surely
7334 introduces many bugs. The bugs should only be exposed when using
7335 threads, though. Signalling and error handling for threads is
7336 very likely broken. Work on making the implementation cleaner and
7337 more efficient is needed.
7338
7339 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7340 (SCM_NONREC_CRITICAL_SECTION_START,
7341 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7342 SCM_REC_CRITICAL_SECTION_END): New macros.
7343 (SCM_CRITICAL_SECTION_START/END): Defined here.
7344
7345 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7346 the three calls to scm_m_expand_body.
7347
7348 * gc.h: #include "libguile/pthread-threads.h";
7349 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7350
7351 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7352 scm_t_key;
7353
7354 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7355 access.
7356
7357 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7358
7359 * gc-freelist.c, threads.c (really_launch): Use
7360 SCM_FREELIST_CREATE.
7361
7362 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7363
7364 * gc.c (scm_i_expensive_validation_check, scm_gc,
7365 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7366 heap administration so that those pieces of code are executed
7367 single-threaded. We might consider rewriting these code sections
7368 in terms of a "call_gc_code_singly_threaded" construct instead of
7369 calling the pair of scm_i_thread_put_to_sleep () and
7370 scm_i_thread_wake_up (). Also, we would want to have as many of
7371 these sections eleminated.
7372
7373 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7374
7375 * inline.h: #include "libguile/threads.h"
7376
7377 * pthread-threads.h: Macros now conform more closely to the
7378 pthreads interface. Some of them now take a second argument.
7379
7380 * threads.c, threads.h: Many changes.
7381
73822002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7383
7384 * Makefile.am (version.h): Changed $^ --> $< in rule for
7385 version.h.
7386
b2cbe8d8
RB
73872002-12-08 Rob Browning <rlb@defaultvalue.org>
7388
7389 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7390 (SCM_MINOR_VERSION): use @--@ substitution now.
7391 (SCM_MICRO_VERSION): use @--@ substitution now.
7392 (scm_effective_version): new function prototype.
7393
7394 * version.c (scm_effective_version): new function, also add
7395 effective-version.
7396
7397 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7398 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7399 SCM_LIBRARY_DIR.
7400 (version.h): generate this here rather than configure.in. This
7401 approach tracks source edits better (i.e. more immediately).
7402 Might be worth considering for other .in files too.
7403
5441c65c
MV
74042002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7405
7406 Reorganized thread package selection. A thread package now only
7407 implements a small set of pthread like functions and Guile
7408 implements the rest on top of that. Guile's implementation is
7409 what the "coop-pthreads" package has been previously. Support for
7410 "coop" threads has been removed until I get time to add it again.
7411
7412 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7413 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7414 null-threads.c, coop-pthreads.c.
7415 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7416 pthread-threads.h.
7417
7418 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7419
7420 * threads.h: Do not include "libguile/coop-defs.h". Include
7421 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7422 (previously deprecated) C level thread API prototypes. They are
7423 now in the thread package specific headers, "null-threads.h" and
7424 "pthread-threads.h".
7425 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7426 New.
7427 (scm_threads_init): Removed.
7428 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7429 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7430 SCM_I_THREAD_SWITCH_COUNT): Define here.
7431 (scm_single_thread_p): Removed.
7432 (scm_call_with_new_thread): Take two args directly instead of list
7433 of two args.
7434 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7435 SCM_SET_THREAD_LOCAL_DATA): Define here.
7436
7437 * threads.c: Merged with "coop-pthreads.c".
7438
7439 * null-threads.h: Implement pthread-like API as a set of macros.
7440
7441 * pthread-threads.h: New, implement pthread-like API by deferring
7442 to pthread itself.
7443
7444 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7445 has been lost in the reorganization.
7446
504d99c5
MD
74472002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7448
7449 The following change makes it possible to move procedure
7450 application dispatch outside inner loops. The motivation was
7451 clean implementation of efficient replacements of R5RS primitives
7452 in SRFI-1.
7453
7454 The semantics is clear: scm_trampoline_N returns an optimized
7455 version of scm_call_N (or NULL if the procedure isn't applicable
7456 on N args).
7457
7458 Applying the optimization to map and for-each increases efficiency
7459 noticeably. For example, (map abs ls) is 8 times faster than
7460 before.
7461
7462 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7463
7464 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7465
7466 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7467 (map, for-each): Handle also application on two args as a special
7468 case; Use trampolines.
7469
7470 Other changes:
7471
7472 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7473 (subr2oless): Removed.
7474 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7475 vector GC protected.
7476
7477 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7478 scm_out_of_range.
7479
63dd3413
DH
74802002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7481
7482 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7483
4ba5f279
MD
74842002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7485
7486 * debug.c (scm_make_iloc): Added missing "return".
7487
56ae231f
MV
74882002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7489
7490 * strports.c (scm_eval_string_in_module): Validate second arg to
7491 be a module. Thanks to Arno Peters!
7492
80b28865
DH
74932002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7494
7495 * .cvsignore: remove goops.c
7496
c88b1456
DH
74972002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7498
7499 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7500 module_variable, scm_module_lookup_closure,
7501 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7502 scm_system_module_env_p): Don't compare SCM values with C
7503 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7504 over SCM_NFALSEP.
7505
a8a19efc
DH
75062002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7507
7508 * eval.h (SCM_MAKE_ILOC): New macro.
7509
7510 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7511 the iloc bitpattern here.
7512
76734914
MD
75132002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7514
7515 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7516 part of the API, otherwise it's difficult to write Guile
7517 extensions using non-blocking I/O => moved #include
7518 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7519
7520 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7521 s_unlock_mutex.
7522
8b5b4a75
MV
75232002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7524
7525 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7526 are defined in configure.in.
7527
7528 * threads.c: Removed SCM_API from function definitions. SCM_API
7529 is only for declarations.
7530
e5a83084
MD
75312002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7532
9be8bb45
MD
7533 * coop-pthreads.h: Added support for thread specific data to the
7534 generic C API for the coop-pthreads case.
7535
e5a83084
MD
7536 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7537 change.
6c214b62 7538 (scm_cond_broadcast): Added missing function.
e5a83084 7539
7edf178e
MV
75402002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7541
7542 * coop.c (coop_next_runnable_thread): Removed, wich should have
7543 happened when GUILE_ISELECT was hard-wired.
7544
7f5b1b77
MV
75452002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7546
7caa1b07
MV
7547 * Makefile.am (libguile_la_SOURCES): Added threads.c
7548 (DOT_DOC_FILES): Added threads.doc.
7549 (DOT_X_FILES): Added threads.x.
7550 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7551 (noinst_HEADERS): Added coop-pthreads.c.
7552 (modinclude_HEADERS): Added coop-pthreads.h.
7553
7554 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7555 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7556
bb11cbf4
MV
7557 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7558 Thanks to Bill Schottstaedt!
7559
1d4cbbed
MV
7560 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7561
7f5b1b77
MV
7562 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7563 SCM_COPT_THREADS is defined.
7564 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7565 is defined.
7566
7567 * coop-pthreads.c: Some harmless renamings of internal stuff.
7568 (create_thread): New, generalized version of
7569 scm_call_with_new_thread.
7570 (scm_call_with_new_thread): Use it.
7571 (scm_spawn_thread): New, use create_thread.
7572
d52f53b1
MV
75732002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7574
7575 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7576 start testing it now.
7577
7578 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7579 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7580 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7581 is defined.
7582
30f920c3
MV
75832002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7584
7585 * scmsigs.c (signal_cell_handlers, install_handler_data,
7586 scm_delq_spine_x, really_install_handler, install_handler): New
7587 scheme for triggering signal handlers, to simplify take_signal.
7588 (take_signal): Simplified, to avoid race conditions.
7589 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7590 hasn't exited yet.
7591
7592 * async.c (scm_async_click): Reset pending_asyncs, handle
7593 signal_asyncs. Don't set cdr of a non-signal async to #f.
7594 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
7595 always. Set pending_asyncs.
7596 (scm_system_async_mark_for_thread): Check that thread has not
7597 exited.
7598 (scm_unmask_signals, decrease_block): Call scm_async_click after
7599 block_asyncs becomes zero.
7600
7601 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
7602 active_asyncs.
7603
7604 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
7605 fields.
7606 * root.c (root_mark): Mark them.
7607 (make_root): Initialize them.
7608
7609 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
7610 USE_COOP_THREADS.
7611 (scm_internal_select): Define one version for USE_COOP_THREADS and
7612 one for USE_NULL_THREADS.
7613 (scm_init_iselect): Likewise.
7614
7615 * inline.h (scm_cell, scm_double_cell): Also allow
7616 USE_COPT_THREADS to not protect the slot initializers.
7617
7618 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
7619 because threads need to be initialized before the stack, but
7620 gsubrs such as scm_timed_condition_variable_wait can only be
7621 created later.
7622
7623 * threads.h: Include "coop-pthreads.h" when requested.
7624 (scm_threads_make_mutex, scm_threads_lock_mutex,
7625 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
7626 not implemented anyway.
7627 (scm_init_thread_procs, scm_try_mutex,
7628 scm_timed_condition_variable_wait,
7629 scm_broadcast_condition_variable, scm_c_thread_exited_p,
7630 scm_thread_exited_p): New prototypes.
7631 (struct timespec): Define if not already defined.
7632 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7633 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7634 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7635 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
7636 deprecated.
7637
7638 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
7639 requested.
7640 (scm_thread_exited_p): New.
7641 (scm_try_mutex, scm_broadcast_condition_variable): Newly
7642 registered procedures.
7643 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
7644 Use the latter as the procedure for "wait-condition-variable",
7645 thus offering a optional timeout parameter to Scheme.
7646 (scm_wait_condition_variable): Implement in terms of
7647 scm_timed_wait_condition_variable.
7648 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7649 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
7650 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7651 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
7652 scm_make_mutex, etc, and deprecate.
7653 (scm_init_threads): Do not create smobs, leave this to
7654 scm_threads_init. Do not include "threads.x" file.
7655 (scm_init_thread_procs): New, include "threads.x" here.
7656
7657 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
7658 scm_null_mutex_lock, scm_null_mutex_unlock,
7659 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
7660 scm_null_condvar_wait, scm_null_condvar_signal,
7661 scm_null_condvar_destroy): Removed.
7662 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
7663 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
7664 scm_cond_destory): Do not define, they are now deprecated and
7665 handled by threads.{h,c}.
7666
7667 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
7668 (scm_threads_init): Create smobs here, using the appropriate
7669 sizes.
7670 (block): Removed, now unused.
7671 (scm_c_thread_exited_p): New.
7672 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
7673 scm_null_mutex_destroy, scm_null_condvar_init,
7674 scm_null_condvar_wait, scm_null_condvar_signal,
7675 scm_null_condvar_destroy): Removed and updated users to do their
7676 task directly.
7677 (scm_try_mutex, timeval_subtract,
7678 scm_timed_wait_condition_variable,
7679 scm_broadcast_condition_variable): New.
7680 (scm_wait_condition_variable): Removed.
7681
7682 * coop-defs.h (coop_m): Added 'level' field.
7683 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7684 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7685 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7686 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
7687 define.
7688 (coop_condition_variable_broadcast): New.
7689
7690 * coop-threads.c (scm_threads_init): Create smobs here, using the
7691 appropriate sizes.
7692 (scm_c_thread_exited_p, scm_try_mutex,
7693 scm_timed_wait_condition_variable,
7694 scm_broadcast_condition_variable): New.
7695 (scm_wait_condition_variable): Removed.
7696
7697 * coop.c (coop_new_mutex_init): Initialize level.
7698 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
7699 level.
7700 (coop_condition_variable_signal): Renamed to
7701 coop_condition_variable_broadcast and reimplemented in terms of
7702 that. Thus...
7703 (coop_condition_variable_broadcast): New.
7704
7705 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
7706
7707 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
7708
087ed40d
MV
77092002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
7710
65a23095
MV
7711 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
7712 of system headers.
7713
087ed40d
MV
7714 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
7715 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 7716 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 7717
5ec1d2c8
DH
77182002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
7719
7720 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
7721 scm_definedp to scm_defined_p and deprecated scm_definedp.
7722
100ae50d
DH
77232002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
7724
7725 * async.h, async.c (scm_system_async): Fixed deprecation to work
7726 correctly when deprecated features are excluded.
7727
2794cb50
MV
77282002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7729
7730 * async.c (scm_system_async_mark_for_thread): Validate thread
7731 argument.
7732
7733 * coop-threads.c (scm_i_thread_root): Do not validate argument.
7734
7735 * feature.c (scm_init_feature): Don't add 'threads' for
7736 USE_NULL_THREADS.
7737
7738 * inline.h (scm_cell, scm_double_cell): Also allow
7739 USE_NULL_THREADS to not protect the slot initializers.
7740
7741 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
7742 "USE_THREAD".
7743
7744 * Makefile.am (noinst_HEADERS): Added null-threads.c.
7745 (modinclude_HEADERS): Added null-threads.h.
7746
7747 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
7748 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
7749 (scm_init_threads): Use generic type names scm_t_mutex and
7750 scm_t_cond instead of coop_m and coop_c.
7751
7752 * null-threads.c, null-threads.h: New files.
7753
ff810d7a
MV
77542002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
7755
7756 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
7757 This is to support makes that know about "$<" only in pattern
7758 rules, like Sun's make.
7759
a90bdb73
MV
77602002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
7761
7762 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
7763 substitution. Thanks to David Allouche!
7764
e71a8bf2
DH
77652002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7766
7767 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
7768 !SCM_ENABLE_DEPRECATED.
7769
41f77ff5
MV
77702002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7771
504d99c5 7772 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
7773 scm_i_thread_root when USE_THREADS is defined. Use scm_root
7774 otherwise.
7775
7776 * scmsigs.c (take_signal): Only call scm_i_thread_root when
7777 USE_THREADS is defined. Use scm_root otherwise.
7778 (scm_sigaction_for_thread): Ignore THREAD argument when
7779 USE_THREADS is not defined. Also, move THREAD argument defaulting
7780 out of HAVE_SIGACTION section, which was a bug.
7781
6d16b125
MV
77822002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7783
7784 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
7785 signal_handlers, not the closure that is used as the async.
7786 The closure is stored in signal_handler_cells, as previously.
7787
acfa1f52
MV
77882002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
7789
7790 * root.h (scm_root_state): Added 'block_async' slot.
7791 (scm_active_asyncs): Removed abbrev.
7792 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
7793
7794 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
7795 abbrev.
7796
7797 * async.h (scm_call_with_blocked_asyncs,
7798 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
7799 scm_c_call_with_unblocked_asyncs): New prototypes.
7800 (scm_mask_signals, scm_unmask_signals): Deprecated.
7801 (scm_mask_ints): Turned into a macro.
7802 * async.c (scm_mask_ints): Removed.
7803 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
7804 this should not be necessary.
7805 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
7806 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
7807 deprecation warning and check for errornous use. Set block_asyncs
7808 instead of scm_mask_ints.
7809 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
7810 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
7811 scm_c_call_with_unblocked_asyncs): New.
7812
7813 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
7814 Asyncs are enabled by default.
7815
34010f56
NJ
78162002-10-09 Neil Jerram <neil@ossau.uklinux.net>
7817
7818 * vports.c (scm_make_soft_port): Allow vector argument to carry a
7819 6th element: an input waiting thunk.
7820 (sf_input_waiting): New.
7821
9310d6f2
MV
78222002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
7823
7824 * root.c (root_mark): Mark active_asyncs slot.
7825
7826 * async.c (scm_async_click): Set the cdr of a executed handler
7827 cell to SCM_BOOL_F, not SCM_EOL.
7828 (scm_i_queue_async_cell): Queue the cell at the end of the list,
7829 and only if the handler procedure is not already present.
7830 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
7831 with SCM_BOOL_F.
7832 * scmsigs.c (scm_sigaction_for_thread): Likewise.
7833
ac48c719
RB
78342002-10-04 Rob Browning <rlb@defaultvalue.org>
7835
1360a142
RB
7836 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
7837
7838 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
7839 scm_lt_dlopenext, and scm_lt_dlerror.
7840 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
7841 and scm_lt_dlerror.
7842 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
7843 and scm_lt_dlerror.
7844 (sysdep_dynl_init): switch to scm_lt_dlinit();
7845
7846 * Makefile.am (libguile_la_LIBADD): switch to use
7847 libguile-ltdl.la.
7848
504d99c5 7849 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 7850
497092c9
MV
78512002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
7852
7853 * scmsigs.h (scm_sigaction_for_thread): New prototype.
7854 * scmsigs.c (got_signal): Removed.
7855 (signal_handler_cells, signal_handler_threads): New.
7856 (take_signal): Queue the cell of the signal for the specified
7857 thread. Reset the signal handler on systems that don't have
7858 sigaction.
7859 (sys_deliver_signals): Removed.
7860 (close_1): New.
7861 (scm_sigaction_for_thread): Renamed from scm_sigaction and
7862 extended to also set the thread of a signal and allocate a cell
7863 for it. Keep the Scheme name "sigaction". Check that signum is
7864 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
7865 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
7866 (scm_init_scmsigs): Allocate signal_handler_cells and
7867 signal_handler_threads vectors.
7868
7869 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
7870 that system asnycs and user asyncs are separated. Reimplemented
7871 system asyncs to work per-thread.
7872
7873 * gc.c (scm_init_gc): Do not use scm_system_async.
7874
7875 * async.h (scm_asyncs_pending, scm_set_tick_rate,
7876 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
7877 Removed prototypes.
7878 (scm_i_queue_async_cell): New.
7879
7880 * __scm.h (scm_asyncs_pending_p): Removed.
7881 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
7882 scm_asyncs_pending_p.
7883
7884 * async.h (scm_system_async_mark_for_thread): New prototype.
7885
7886 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
7887
7888 * root.h (scm_root_state): Added new "active_asyncs" slot.
7889 * root.c (scm_make_root): Initialize it to SCM_EOL.
7890
7891 * coop-defs.h (coop_t): Added new "handle" slot.
7892 * coop-threads.c (all_threads, scm_current_thread,
7893 scm_all_threads, scm_i_thread_root): New.
7894 (scm_threads_init): Add main thread to all_threads.
7895 (scheme_launch_thread): Remove thread from all_threads when it
7896 terminates.
7897 (scm_call_with_new_thread): Initialize handle slot of coop_t
7898 structure and add new thread to all_threads.
7899 (scm_spawn_thread): Likewise.
7900
7901 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
7902 * threads.c (scm_current_thread, scm_all_threads): Register as
7903 primitives.
7904
7905 * dynl.c: Use scm_lt_ prefix for libltdl functions.
7906
480fa28d
NJ
79072002-09-29 Neil Jerram <neil@ossau.uklinux.net>
7908
7909 * script.c (scm_compile_shell_switches): Fix bad spelling of
7910 `explicitly' in comment.
7911
79122002-09-28 Neil Jerram <neil@ossau.uklinux.net>
7913
7914 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
7915 Refer to provided? in doc string rather than deprecated feature?.
7916
3553e1d1
GH
79172002-09-24 Gary Houston <ghouston@arglist.com>
7918
7919 * inline.h (scm_double_cell): prevent reordering of statements
7920 with any following code (for GCC 3 strict-aliasing).
7921 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
7922 the earlier version of the reordering prevention.
7923
4ad0814a
HWN
79242002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7925
7926 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
7927
e88e4f2e
HWN
79282002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7929
7930 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
7931 protection.
7932
1e71eafb
HWN
79332002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7934
7935 * inline.h: include stdio.h
7936
7937 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
7938
61ef9c1f
HWN
79392002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7940
dac04e9f
HWN
7941 * gc-segment.c (scm_i_make_initial_segment): check user settings
7942 for sanity.
7943
7944 * gc-malloc.c (scm_gc_init_malloc): check user settings for
7945 sanity.
dac04e9f
HWN
7946
7947 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
7948
ffd72400
HWN
7949 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
7950
7951 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
7952 these won't ever wrap around with high memory usage. Thanks to
7953 Sven Hartrumpf for finding this.
ffd72400 7954
5bd4a949
HWN
7955 * gc-freelist.c: include <stdio.h>
7956
61ef9c1f
HWN
7957 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
7958
ffd0ef3b
MV
79592002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
7960
a27e3d14
MV
7961 * vectors.h (SCM_VECTOR_REF): New.
7962
ffd0ef3b
MV
7963 * snarf.h (SCM_DEFINE_PUBLIC): New.
7964
f8a1712b
MV
79652002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
7966
7967 * socket.c (scm_addr_vector): Added size of address to arguments.
7968 Use it to avoid accessing a non-existent path in a sockaddr_un.
7969 Changed all callers.
7970
7200a36b
HWN
79712002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7972
1383773b
HWN
7973 * gc.h: remove DOUBLECELL card flags.
7974
7975 * gc-malloc.c (scm_calloc): try to use calloc() before calling
7976 scm_realloc().
7977
7978 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
7979 init loop; handle this from scm_init_card_freelist()
7980
7981 * gc-card.c (scm_init_card_freelist): init bit vector here.
7982
7200a36b 7983 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 7984 num2float.i.c (FLOAT2NUM): idem
7200a36b 7985
9981de3a
HWN
79862002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7987
7988 * eval.h: prepend libguile/ to include path
7989
19647556
MV
79902002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
7991
7992 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 7993 years. Thanks to Martin Grabmüller!
19647556 7994
38d1262a
HWN
79952002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7996
7997 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
7998 unsigned numbers for computing minimum heap increment. This
7999 prevents weird results when a a negative minimum increment is
8000 computed.
8001
f800ebfb
MV
80022002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8003
8004 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8005 instead of the old tricks.
f800ebfb
MV
8006
8007 * guile-snarf.in: Do not expect the input file to be the first
8008 argument after the optional "-o" option, just pass everything to
8009 the pre-processor without extracting the input file name.
8010
4a5309c9
HWN
80112002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8012
8013 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8014 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8015
f2893a25
HWN
80162002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8017
8018 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8019 Bill Schottstaedt for the bug report
8020
483f518b
MV
80212002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8022
8023 * print.c (scm_iprin1): Print primitives generics always as
8024 "primitive-generic" even when they have no primitive methods yet.
8025
917adc55
GH
80262002-08-17 Gary Houston <ghouston@arglist.com>
8027
8028 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8029 call.
8030
67329a9e
HWN
80312002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8032
85835e59 8033 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8034
8035 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8036 malloc.
8037
8038 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8039 only use SCM_MIN_HEAP_SEG_SIZE.
8040
8041 * ports.c (scm_add_to_port_table): add backwards compatibility
8042 function
8043
8044 * ports.h: use scm_i_ prefix for port table and port table size.
8045
f07c886a
MD
80462002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8047
8048 * vports.c (scm_make_soft_port): Initialize pt variable.
8049
dc61cbc6
MV
80502002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8051
8052 * strports.h (scm_c_eval_string_in_module,
8053 scm_eval_string_in_module): New prototypes.
8054 * strports.c (scm_eval_string_in_module): New, but use
8055 "eval-string" as the Scheme name and make second parameter
8056 optional.
8057 (scm_eval_string): Implement using scm_eval_string_in_module.
8058 (scm_c_eval_string_in_module): New.
8059 Thanks to Ralf Mattes for the suggestion!
8060
da220f27
HWN
80612002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8062
be3ff021
HWN
8063 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8064 message and abort.
8065
8066 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8067
da220f27
HWN
8068 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8069 stead of scm_t_port*. The function now takes a tag argument.
8070
eab1b259
HWN
80712002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8072
8073 * gc.h: add scm_debug_cells_gc_interval to public interface
8074
8075 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8076
8077 * gc.c (scm_i_expensive_validation_check): separate expensive
8078 validation checks from cheap ones.
8079
ba1b2226
HWN
80802002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8081
8082 * read.c (scm_input_error): new function: give meaningful error
8083 messages, and throw read-error
8084
8085 * gc-malloc.c (scm_calloc): add scm_calloc.
8086
39e8f371
HWN
80872002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8088
33138b05
HWN
8089 * tags.h: remove GC bits documentation from the tags table.
8090
39e8f371
HWN
8091 * read.c (INPUT_ERROR): Prepare for file:line:column error
8092 messages for errors in scm_lreadr() and friends.
8093
80942002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8095
8096 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8097 implementation).
8098 (scm_gc_calloc): new function
8099
26e68795 81002002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8101
5f16b897
HWN
8102 * ports.c (scm_new_port_table_entry): init port entry to 0
8103 completely.
402788a9
HWN
8104
8105 * ports.c (scm_new_port_table_entry): change function from
8106 scm_add_to_port_table. This prevents cells with null-pointers from
8107 being exposed to GC.
8108
504d99c5 8109 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8110 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8111
504d99c5 8112 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8113 to gc-stats.
8114
c8a1bdc4
HWN
8115 * numbers.c (big2str): return "0" for 0 iso. ""
8116
c2cbcc57
HWN
8117 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8118 private-gc.h: new file
c8a1bdc4
HWN
8119
8120 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8121 sweeping. More documentation in workbook/newgc.text
8122
aea06b34
MV
81232002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8124
8125 * random.c (rstate_free): Return zero.
8126
35060ae9
DH
81272002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8128
8129 * environments.c (remove_key_from_alist): Removed.
8130
8131 (obarray_remove): Simplified.
8132
6a535440
SJ
81332002-07-24 Stefan Jahn <stefan@lkcc.org>
8134
8135 * continuations.h: ia64: Include <signal.h> before
8136 <sys/ucontext.h>.
8137
bcbd25b7
DH
81382002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8139
8140 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8141
26e68795 81422002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8143
8144 * goops.c (scm_compute_applicable_methods): use
8145 scm_remember_upto_here_1 iso scm_remember_upto_here
8146
8147 * macros.c: include deprecation.h
8148
504d99c5 8149 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8150 macro arg.
504d99c5 8151 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8152
8153 * net_db.c, posix.c, socket.c: variable naming: change ans to
8154 result.
8155
8156 * sort.c (scm_merge_vector_x): accept vector as argument
8157 iso. SCM*. This is needed for full GC correctness.
8158
8159 * gc.h: undo previous undocumented changes related to #ifdef
8160 GENGC.
8161
26e68795 81622002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8163
8164 * *.c: add space after commas everywhere.
8165
8166 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8167 Document cases where SCM_WRITABLE_VELTS() is used.
8168
8169 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8170 SCM_VELTS() return a const pointer
8171 (SCM_VECTOR_SET): add macro.
8172
3063e30a
DH
81732002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8174
8175 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8176 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8177 Deprecated the special kind of built-in dynamic syntax transformer
8178 that was inaccurately named "macro". Note: The built-in syntax
8179 transformers that are named "mmacro" or "memoizing-macro" still
8180 exist, and it is these which come much closer to what one would
8181 call a macro.
8182
4c5f8e8f
NJ
81832002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8184
8185 * eval.c (unmemocopy): Fix for
8186 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8187 with internal definitions and local-eval).
8188
4f6f9ae3
GH
81892002-07-12 Gary Houston <ghouston@arglist.com>
8190
8191 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8192 defined. They don't do anything useful, especially since the
8193 only case where DYNAMIC_LINKING is undefined seems to be
8194 when --with-modules=no is given to configure, which is basically
8195 requesting that the "dynamic linking module" be omitted.
8196
8197 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8198 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8199
8200 * extensions.c (load_extension): check DYNAMIC_LINKING for
8201 scm_dynamic_call.
8202 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8203 scm_init_dynamic_linking.
8204
c21935e6
MV
82052002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8206
8207 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8208 check for Cygwin when including <winsock2.h>, this is already
8209 check for by configure. Thus, revert change from 2002-07-07.
8210
ee95d597
GH
82112002-07-10 Gary Houston <ghouston@arglist.com>
8212
9540b68f 8213 * eq.c: include <string.h>
ee95d597
GH
8214 * dynl.c: docstring editing.
8215
46732b54
GH
82162002-07-09 Gary Houston <ghouston@arglist.com>
8217
8218 * dynl.c (scm_dynamic_call): docstring editing.
8219
c09d12e0
RB
82202002-07-08 Rob Browning <rlb@defaultvalue.org>
8221
8222 * gc_os_dep.c: HURD fixes.
8223
3f6571eb
MV
82242002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8225
8226 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8227
8228 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8229 this should be compiled for BUILD host.
8230 Override default rule for
8231 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8232 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8233 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8234
8235 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8236 <winsock2.h> on Cygwin even when we have it.
8237
bd987b8e
DH
82382002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8239
8240 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8241 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8242 the code. Full number of arguments checking of closures is
8243 mandatory now. However, the option to disable the checking has
8244 most probably not been used anyway.
8245
8505e285
DH
82462002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8247
bd987b8e
DH
8248 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8249 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8250 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8251 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8252 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8253 (scm_source_properties, scm_set_source_properties_x,
8254 scm_source_property): Removed compile time option SCM_RECKLESS to
8255 clean up the code. Full number of arguments checking of closures
8256 is mandatory now. However, the option to disable the checking has
8257 most probably not been used anyway.
8505e285
DH
8258
8259 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8260 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8261
2ee08a28
GH
82622002-06-30 Gary Houston <ghouston@arglist.com>
8263
732b9327
GH
8264 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8265 do anything useful. Added a comment about need for a mutex if
8266 pre-emptive threading is supported.
8267
2ee08a28
GH
8268 * posix.c (scm_convert_exec_args), dynl.c
8269 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8270 allocate_string_pointers. 2) simplified: don't reallocate the
8271 strings, just make an array of pointers 3) avoid memory leaks on
8272 error 4) let the procedure report errors in its own name.
8273 Consequences: 1) the procedures now assume that SCM strings are
8274 nul-terminated, which should always be the case. 2) Since strings
8275 are not reallocated, it's now possible for strings passed to
8276 dynamic-args-call to be mutated.
8277
c136c920
DH
82782002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8279
8280 * __scm.h, eval.c, eval.h: Removed compile time option
8281 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8282 variable positions during memoization is mandatory. However, the
8283 option to disable the caching has most probably not been used
8284 anyway.
8285
e540802f
MV
82862002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8287
8288 * print.c (scm_simple_format): Print missing part of format before
8289 ~% control. Thanks to Daniel Skarda!
8290
4c1ffcdd
MV
82912002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8292
8293 * mkstemp.c: Added exception notice to license statement.
8294
ba1b077b
MV
82952002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8296
8dc434c7
MV
8297 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8298 it is represented as a floating point value so that we can change
8299 its sign.
8300
ba1b077b
MV
8301 From John W. Eaton <jwe@bevo.che.wisc.edu>
8302
8303 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8304
74c58131
TTN
83052002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8306
8307 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8308 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8309
8766d4b5
MV
83102002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8311
8312 * eq.c (real_eqv): New.
8313 (scm_eqv_p): Use it when comparing reals and complexes.
8314
8315 * numbers.c: Include <string.h>, for strncmp.
8316 (mem2complex): Do not create negative NaNs.
8317 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8318 NaN.
8319 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8320
1d8c3cad
MV
83212002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8322
8323 * posix.c (scm_putenv): Handle removing variables explicitely by
8324 calling unsetenv.
8325
8326 From John W. Eaton.
74c58131 8327
1d8c3cad
MV
8328 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8329 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8330 and scm_nan.
8331 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8332 [SCO && ! HAVE_ISINF] (isinf): New function.
8333 (xisinf, xisnan): New functions.
8334 (IS_INF): Delete.
8335 (isfinite): Define in terms of xisinf.
8336 (scm_inf_p, scm_nan_p): New functions.
8337 (guile_Inf, guile_NaN): New file-scope vars.
8338 (guile_ieee_init): New function.
8339 (scm_inf, scm_nan): New functions.
8340 (idbl2str): Handle Inf and NaN. Remove funny label and
8341 corresponding gotos.
8342 (ALLOW_DIVIDE_BY_ZERO): New macro.
8343 (scm_divide): Allow division by zero to occur if
8344 ALLOW_DIVIDE_BY_ZERO is defined.
8345 Handle bignums and ints as special cases.
8346
8347 Additional stuff by me:
8348
8349 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8350 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8351 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8352 NaN. They will provide their own sign.
8353 (scm_divide): Only allow divides by inexact zeros. Dividing by
8354 exact zeros still signals an errors.
74c58131 8355
7a0c65eb
TTN
83562002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8357
87b72063 8358 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8359 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8360 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8361 Thanks to Andreas Rottmann.
8362
5e423a39
GH
83632002-04-20 Gary Houston <ghouston@arglist.com>
8364
8365 * removal of unused fields in root state (thanks to Christopher
8366 Cramer for pointing out the disuse.)
8367 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8368 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8369
5e423a39
GH
8370 * root.c (root_mark): don't mark them.
8371 (scm_make_root): don't set them to #f.
8372 * init.c (scm_init_standard_ports): don't initialise with the
8373 default ports.
8374
9d2cce76
MV
83752002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8376
8377 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8378 cpp_sig_symbols.c.
8379
83802002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8381
8382 * guile-snarf.in: Do not clean input file. This would write to
8383 the $(srcdir) during a VPATH build, which is not allowed. It also
8384 isn't needed since it only works when an output filename has been
8385 specified and in that case we don't need to clean the input file
8386 because the output file will already exist.
8387
6f79b6cc
MV
83882002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8389
8390 * guile-snarf: Install the trap for removing $cleanfile only when
8391 the value of $cleanfile is actually known.
8392
21550b10
RB
83932002-04-10 Rob Browning <rlb@defaultvalue.org>
8394
8395 * .cvsignore: add versiondat.h and *.c.clean.c.
8396
bc76d628
DH
83972002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8398
8399 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8400 function, replaces macro SRCBRKP.
8401
8402 (SRCBRKP): Deprecated.
8403
8404 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8405 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8406 temporary variable.
8407
5132eef0
DH
84082002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8409
8410 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8411 CHECK_EXIT and removed all references to them.
8412
680516ba
DH
84132002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8414
8415 * debug.h (scm_ready_p, debug_print): Removed declarations.
8416
8417 * eval.c (EVALCELLCAR): Removed.
8418
8419 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8420 operation from condition.
8421
e2bd68e0
MV
84222002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8423
8424 * guile-snarf.in: When the output filename is "-", write to
8425 stdout. When no "-o" option is given, use "-" as the output
8426 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8427 output file on error when the output file name is not "-". Define
8428 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8429
8430 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8431
ab1f1094
DH
84322002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8433
8434 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8435 and the corresponding goto statements. Removed redundant code.
8436
42030fb2
DH
84372002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8438
8439 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8440 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8441 Re-enabled handing of rpsubrs and asubrs.
8442
e050d4f8
DH
84432002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8444
8445 * eval.c (SIDEVAL): Removed.
8446
8447 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8448 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8449 argument checking order for set! to locals, variables and symbols.
8450 Improvements to control structure. Removed some uses of arg1 and
8451 arg2 as temporary variables.
8452
a6d344d3
TTN
84532002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8454
8455 * guile-snarf.in: Remove "--compat=1.4" support.
8456 Add "-d" and "-D" support.
8457
8458 (deprecated_list): New var.
8459 (compat_mode_clean_xxx): Delete.
8460 (grep_deprecated): New func.
8461 ("main"): If "-d" or "-D", call `grep_deprecated'.
8462
3939e9df
NJ
84632002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8464
387d418c
NJ
8465 * hooks.h: Change scm_t_c_hookype_t everywhere to
8466 scm_t_c_hook_type.
8467
bb2c02f2 8468 Docstring fixes:
a6d344d3 8469
bb2c02f2
NJ
8470 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8471
8472 * ports.c (scm_sys_make_void_port): Use `@file'.
8473
8474 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8475 than `else'.
8476
8477 * macros.c (scm_makmacro): Don't say that the form replaces its
8478 source, because it doesn't.
8479 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8480
8481 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8482 scm_select, scm_basename), goops.c (scm_method_generic_function),
8483 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8484 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8485 spelling mistakes.
8486
3939e9df
NJ
8487 * debug.c (scm_debug_options), eval.c
8488 (scm_eval_options_interface), read.c (scm_read_options): Change
8489 incorrect @var in docstring to @code.
8490
3b3cc781
MV
84912002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8492
500b0d5b
MV
8493 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8494
3b3cc781
MV
8495 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8496 guile-snarf can remove trailing non-init code.
8497
8498 * guile-snarf.in (modern_snarf): Remove everything following and
8499 including "^:^" from the output.
8500
dff98306
DH
85012002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8502
8503 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8504
8505 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8506
2287fb53
TTN
85072002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8508
8509 * guile-snarf.in: Update copyright.
8510 Rewrite to internalize error handling.
8511 Add "--compat=1.4" handling.
8512 Add commentary.
8513
8514 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8515 (snarfcppopts): New var.
8516 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8517 (.c.doc): Use $(snarfcppopts).
8518
822250a4
TTN
8519 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8520 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8521 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8522 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8523 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8524 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8525 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8526 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8527 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8528 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8529 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8530 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8531 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8532 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8533
b7798e10
DH
85342002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8535
8536 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8537 The next step will be to remove the union 't' and simplify the
8538 code of SCM_CEVAL that way.
8539
04a98cff
NJ
85402002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8541
8542 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8543 rreadfds, rwritefds, rexceptfds): Made static.
8544
8545 * gc.c (terminating), fports.c (terminating): Renamed
8546 scm_i_terminating.
8547
16d98032
MV
85482002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8549
5046250e
MV
8550 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8551 potential overflow problems. Thanks to John W Eaton!
8552
8794207d
MV
8553 * strop.c (string_capitalize_x): Treat characters as unsigned so
8554 that 8-bit chars work. Thanks to David Pirotte!
16d98032 8555
1d15ecd3
DH
85562002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8557
8558 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8559 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8560 proc as temporary variables. Introduced temporary variables with
8561 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8562 by a more explicit predicate in some places.
8563
85642002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
8565
8566 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8567 Added lots of comments regarding the implementation of #@dispatch.
8568 Changed intra-procedure communication to use t.arg1 instead of
8569 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8570 variables. Introduced temporary variables with hopefully
8571 descriptive names for clarification. Replaced SCM_N?IMP by a more
8572 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8573 of computing the expression explicitly. Eliminate now unused
8574 label nontoplevel_cdrxbegin.
8575
8576 * goops.h (SCM_INSTANCE_HASH): New macro.
8577
8578 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8579
1ebf1566
TTN
85802002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8581
8582 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8583 "guile-snarf" moved back from `noinst_SCRIPTS'.
8584
020c890c
NJ
85852002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8586
58d233cc
NJ
8587 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8588 exists when adding a source property other than those that are
8589 handled explicitly, add the new property to the SRCPROPS obj's
8590 plist.
8591
020c890c
NJ
8592 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8593 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
8594
8595 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
8596 debug.status. It isn't needed, and it can overflow the bits
8597 reserved for it (which may lead to a segv or a GC abort).
8598
3f04400d
DH
85992002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8600
8601 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
8602 side-effecting operations from conditions and macro calls.
8603 Replaced SCM_N?IMP by a more explicit predicate in some places.
8604 Minimized the scope of some variables.
8605
97820583
SJ
86062002-03-02 Stefan Jahn <stefan@lkcc.org>
8607
8608 * convert.i.c: Fixed int <-> long conversions which would have
8609 failed if their sizes were different.
8610
38ace99e
DH
86112002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8612
8613 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
8614 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
8615 as temporary variables. Removed side-effecting operations from
8616 conditions and macro calls. Introduced temporary variables with
8617 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8618 by a more explicit predicate in some places. Removed code that
8619 was conditionally compiled if SICP was defined - which it never
8620 is.
8621
e5cb71a0
DH
86222002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8623
8624 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
8625 Removed some uses of t.arg1 and proc as temporary variables.
8626 Removed side-effecting operations from conditions and macro calls.
8627 Introduced temporary variables with hopefully descriptive names
8628 for clarification. Replaced SCM_N?IMP by a more explicit
8629 predicate in some places.
8630
6a0f6ff3
DH
86312002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8632
8633 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
8634 explicit predicate in some places.
8635
8636 (CHECK_EQVISH): Removed.
8637
8638 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
8639 variables. Removed side-effecting operations from conditions and
8640 macro calls. Introduced temporary variables for clarification.
8641 Sorted if-else-if check for the type of the last form in a list by
8642 frequency. Avoided some unnecessary tail-recursion calls.
8643
228a24ef
DH
86442002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8645
8646 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
8647 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
8648 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
8649 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
8650 scm_cell and all its uses to scm_t_cell in accordance to Guile's
8651 naming scheme for types.
8652
8653 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
8654 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
8655 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
8656 (scm_make_environment), eval.c (scm_closure), fports.c
8657 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
8658 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
8659 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
8660 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
8661 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
8662 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
8663 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
8664 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
8665 scm_alloc_cell to scm_cell.
8666
8667 * environments.c (core_environments_observe), gc.c
8668 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
8669 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
8670 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
8671 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
8672 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
8673 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
8674 (allocate_weak_vector): Renamed scm_alloc_double_cell to
8675 scm_double_cell.
8676
edb810bb
SJ
86772002-02-27 Stefan Jahn <stefan@lkcc.org>
8678
8679 * convert.i.c, convert.c: Better range checking.
8680
8681 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
8682
1ebf1566 8683 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
8684 Windows (MinGW).
8685
327d4dd3
TTN
86862002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
8687
8688 * Makefile.am: Update path to pre-inst-guile automake frag.
8689
89d7a92c 86902002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
8691
8692 * gc.c (scm_gc_sweep): Make it compile even when deprecated
8693 features are excluded.
8694
89d7a92c 86952002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
8696
8697 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
8698
4f2716b6
GH
86992002-02-25 Gary Houston <ghouston@arglist.com>
8700
8701 * convert.c: include <string.h> for convert_i.c.
8702
46151112
RB
87032002-02-24 Rob Browning <rlb@defaultvalue.org>
8704
8705 * .cvsignore: add stamp-h1.
8706
cd328b4f
NJ
87072002-02-21 Neil Jerram <neil@ossau.uklinux.net>
8708
8709 * unif.c (scm_array_to_list): Correct name, which had been
8710 accidentally changed to scm_t_arrayo_list!
8711
c709de7f
MD
87122002-02-20 Mikael Djurfeldt <mdj@linnaeus>
8713
8714 * gc.c (scm_gc_sweep): Print an error message when aborting due to
8715 underflowing scm_mallocated.
8716
c1965d31
MV
87172002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8718
8719 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
8720 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
8721 Reimplemented using the new scm_gc_malloc, etc., functions and
8722 deprecated.
8723
b606945b
TTN
87242002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
8725
8726 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
8727 to `noinst_PROGRAMS'.
8728 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
8729 (noinst_PROGRAMS, noinst_SCRIPTS): New.
8730
7c686ba8
MV
87312002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8732
8733 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
8734 non-zero is returned from a port or smob free function.
8735 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
8736 scm_gc_register_collectable_memory,
8737 scm_gc_unregister_collectable_memory, scm_gc_malloc,
8738 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
8739
8740 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
8741 debug-malloc.c, dynl.c, environments.c, environments.h,
8742 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
8743 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
8744 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
8745 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
8746 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
8747 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
8748 appropriate. Return zero from smob and port free functions.
8749
8750 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
8751
8752 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
8753 messages while the GC is running.
8754 (scm_c_issue_deprecation_warning_fmt): New.
8755
8756 * fports.c (scm_setvbuf): Reset read buffer to saved values when
8757 it is pointing to the putback buffer.
8758
66adc0a6
TTN
87592002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8760
8761 * gsubr.c (create_gsubr): On "too many args" error,
8762 also display arg count and name. Thanks to Bill Schottstaedt.
8763
0187b4f4
TTN
87642002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
8765
8766 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
8767
8768 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
8769 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
8770 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
8771
8772 * guile-snarf-docs-texi.in: Bye bye.
8773
402e687c
MV
87742002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8775
8776 * symbols.c (scm_make_symbol): Fix typo in docstring.
8777
8778 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
8779 scm_make_symbol): New prototypes.
8780
319b98ed
MV
87812002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
8782
8783 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
8784 (SCM_SYMBOL_INTERNED_P): New.
8785 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
8786 SCM_MAKINUM since hash values can well be bignums.
8787 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
8788 This signals a interned symbol.
8789 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
8790 scm_make_symbol): New.
0187b4f4 8791
319b98ed
MV
8792 * print.c (scm_iprin1): Print uninterned symbols unreadably.
8793
34472dfe
TTN
87942002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
8795
8796 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
8797 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 8798 Thanks to Dave Love.
34472dfe 8799
1b39c2e3
MV
88002002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
8801
8802 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 8803 This might help to make unintended clashes less likely.
1b39c2e3
MV
8804 (scm_string_to_symbol): Protect the string until the symbols is
8805 created.
8806
1fa86ca5
SJ
88072002-01-31 Stefan Jahn <stefan@lkcc.org>
8808
8809 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 8810 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
8811 functions for the deprecated gh interface.
8812
8813 * Makefile.am: Setup rules for new `convert.*' files.
8814
af68e5e5
SJ
88152002-01-28 Stefan Jahn <stefan@lkcc.org>
8816
8817 * symbols.c (scm_c_symbol2str): New function, replacement for
8818 `gh_scm2newsymbol()'.
8819
34472dfe 8820 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
8821 replacement for `gh_get_substr()'.
8822
8823 * socket.c: Include `stdint.h' if available for the `uint32_t'
8824 declaration.
8825
504d99c5 8826 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
8827 compiler warning).
8828
8829 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
8830
c96d76b8 88312002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 8832
c96d76b8 8833 Other changes unrelated to Elisp...
34472dfe 8834
c96d76b8
NJ
8835 * eval.c (scm_m_if): Use s_if rather than repeating string literal
8836 "if".
8837 (comments): Fix a few typos.
8838 (scm_for_each): Add parentheses around oddly unparenthesized
8839 if/while conditions.
8840
8841 * read.c (scm_read_opts): Add full stop at end of doc for
8842 `keywords' option.
8843
8844 * script.c (scm_compile_shell_switches): Use scm_str2symbol
8845 instead of gh_symbol2scm.
8846
8847 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
8848 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
8849
8850 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
8851 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
8852
8853 First batch of changes for Elisp support...
8854
8855 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
8856 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
8857 throw.c, vectors.c, weaks.c: Add #include for lang.h.
8858
8859 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
8860 conditionalize compilation and initialization of Elisp support
8861 function.
34472dfe 8862
c96d76b8
NJ
8863 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
8864 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
8865 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
8866 filesys.c (fill_select_type, retrieve_select_type), fluids.c
8867 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
8868 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
8869 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
8870 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
8871 options.c (change_option_setting, scm_options), posix.c
8872 (environ_list_to_c), print.c (scm_iprlist), throw.c
8873 (scm_exit_status), vectors.c (scm_vector), weaks.c
8874 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
8875
8876 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
8877 just SCM_FALSEP.
34472dfe 8878
c96d76b8
NJ
8879 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
8880 of just SCM_BOOLP.
8881
8882 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
8883 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
8884 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
8885 (scm_m_atfop): Support function aliasing. Support both function
8886 args, which need transformation, and macro args, which do not.
8887 Add explanatory comments.
8888 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
8889 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
8890 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
8891 SCM_NULLP || SCM_NILP instead of checks against (removed)
8892 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
8893 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
8894
8895 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
8896 scm_m_while, scm_nil_eq): Commented out; I don't think we need
8897 these, but I don't want to remove them yet, just in case.
8898 (scm_init_lang): Define `%nil' variable on Scheme level to hold
8899 Elisp nil value.
8900
8901 * lang.h (SCM_NILP): Test against Elisp nil value instead of
8902 against (removed) scm_lisp_nil.
8903 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
8904 (SCM_NULL_OR_NIL_P): New.
8905
8906 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
8907 SCM_VALIDATE_NULL.
8908
8909 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
8910 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
8911 value).
8912
8913 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
8914 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
8915 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
8916 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
8917
8918 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
8919 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
8920 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
8921 Numbering shifted down accordingly.
8922 (SCM_ELISP_NIL): New IFLAG.
8923
8924 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 8925
a392ee15
DH
89262002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8927
8928 * eval.c: Removed outdated references to "everr". Improved some
8929 comments.
8930
8931 (scm_deval_args, deval_args): Renamed scm_deval_args to
8932 deval_args, since it is not part of the interface.
8933
8934 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
8935 use references to debug.vect[0] before it exists. Add parentheses
8936 to switch statement.
8937
8938 * goops.h: Added local emacs variables.
8939
24933780
DH
89402002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8941
8942 * eval.[ch] (scm_deval_args): Made static.
8943
8944 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
8945 test.
8946
8947 * strings.c (scm_c_string2str): Clarified comment. Replaced
8948 THINKME by FIXME for uniformness. Removed question about whether
8949 arguments need to be protected from garbage collection: Arguments
8950 must be protected as any other variable.
8951
f9450cdb
DH
89522002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8953
8954 * procs.h (SCM_CLOSURE_BODY): New Macro.
8955
8956 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
8957 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
8958 get_slot_value, set_slot_value), procs.c
8959 (scm_procedure_documentation), sort.c (closureless), stacks.c
8960 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
8961 SCM_CLOSURE_BODY.
8962
8963 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
8964
5dc64f64
MV
89652001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
8966
8967 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
8968 use "cp" instead.
8969
197ee3d3
MV
89702001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
8971
8972 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
8973 everywhere.
8974
8975 * continuations.c (scm_make_continuation): Do not retain the
8976 throw_value when the continuation is invoked.
8977
4d4528e7
SJ
89782001-12-08 Stefan Jahn <stefan@lkcc.org>
8979
8980 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 8981 given Scheme string into a C string. Also put in two
4d4528e7
SJ
8982 THINKME's regarding the malloc policy for the missing converter
8983 routines.
8984
98347362
NJ
89852001-12-01 Neil Jerram <neil@ossau.uklinux.net>
8986
8987 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
8988 gh_symbol2scm.
8989
1fc8902f
DH
89902001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8991
8992 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
8993 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
8994
8995 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
8996 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
8997 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
8998 macros.
8999
9000 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9001
9002 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9003 SCM_GC_CELL_* macros when accessing free cells.
9004
4878beec
MV
90052001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9006
9007 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9008 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9009 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9010 * strings.h (SCM_MAKE_STRING_TAG): New.
9011 * procs.h (SCM_MAKE_CCLO_TAG): New.
9012 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9013
9014 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9015 !SCM_ENABLE_DEPRECATED.
9016
9017 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9018 New.
9019
9020 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9021 signal handlers are allowed to divert the flow of control. Call
9022 scm_system_async_mark_from_signal_handler instead of
9023 scm_system_async_mark.
9024
9025
9026 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9027 scm_alloc_double_cell in their place.
34472dfe 9028
4878beec
MV
9029 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9030 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9031 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9032 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9033 scm_deprecated_newcell and scm_deprecated_newcell2.
9034
9035 gc.c (scm_tc16_allocated): Only define when including deprecated
9036 features.
9037 (scm_debug_newcell, scm_debug_newcell2): Removed.
9038 (scm_init_storage): Do not initialize scm_tc16_allocated.
9039 (scm_init_gc): Do it here.
9040 (allocated_mark): New, from old code.
9041 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9042
4878beec 9043 * inline.c, inline.h: New files.
34472dfe 9044 * Makefile.am: Added them in all the right places.
4878beec 9045
34472dfe 9046 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9047
9048 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9049 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9050 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9051 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9052 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9053 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9054 scm_alloc_double_cell, respectively.
9055
d2bc7fae
MV
90562001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9057
9058 * modules.c (scm_c_use_module): Adapt to changes to
9059 `process-use-modules'.
9060
5eec27e9
DH
90612001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9062
9063 * numbers.c (scm_divide): Fix more division by zero errors.
9064
8978878f
GH
90652001-11-21 Gary Houston <ghouston@arglist.com>
9066
9067 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9068 obsolete. autogen.sh says:
9069 invalid unused variable name: `OMIT_DEPENDENCIES'
9070
164826d3
DH
90712001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9072
9073 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9074 reporting the bug.
9075
84aff7a7
MV
90762001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9077
9078 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9079 Thanks to Eric Gillespie, Jr!
34472dfe 9080
6063dc1d
SJ
90812001-11-21 Stefan Jahn <stefan@lkcc.org>
9082
34472dfe
TTN
9083 * win32-socket.c (getservent, setservent, endservent,
9084 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9085 Appropriate replacements for M$-Windows.
9086
9087 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9088 these definitions for GUILE_DEBUG.
9089
9090 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9091 M$-Windows compiler. Include some pieces of code (protoent and
9092 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9093 native M$-Windows compiler.
9094
351982f6
MV
90952001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9096
9097 * modules.c (scm_c_export): Do nothing when the first argument is
9098 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9099
849038b5
TTN
91002001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9101
9102 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9103 also include `buildstamp'.
9104
5c790b44
RB
91052001-11-18 Rob Browning <rlb@defaultvalue.org>
9106
9107 * version.c
9108 (s_scm_major_version): use SCM_MAJOR_VERSION.
9109 (s_scm_minor_version): use SCM_MINOR_VERSION.
9110 (s_scm_micro_version): use SCM_MICRO_VERSION.
9111 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9112 SCM_MICRO_VERSION.
9113
9114 * version.h.in
9115 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9116 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9117 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9118
694a9bb3
NJ
91192001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9120
9121 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9122 Rewrite docstrings without reference to substring-move-left/right,
9123 since the latter no longer exist.
9124
302c12b4
DH
91252001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9126
9127 * eval.c: Removed bogus comment about acros.
9128
9129 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9130 Minimize scope of local variable. Eliminate dependency on
9131 macro DEBUG_EXTENSIONS.
9132
9133 (s_splicing): New error message string.
9134
9135 (scm_m_body): Issue 'bad body' message rather than 'missing
9136 expression' message.
9137
9138 (scm_m_quote): Eliminate unnecessary copying.
9139
9140 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9141 checking of the body to scm_m_body.
9142
9143 (scm_m_do): Move comment to function header. Rename arg1 to
9144 binding. Made the code a bit easier to read.
9145
9146 (evalcar): Removed.
9147
9148 (iqq): Added a comment. Changed the depth parameter to
9149 unsigned. Use size_t for vector lengths. Make sure vector object
9150 is gc protected as long as its contents are read. Add some syntax
9151 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9152 control structure a bit.
9153
9154 (scm_m_delay): Added comment about the implementation of
9155 scm_m_delay.
9156
9157 (scm_m_define): Add comment about guile's currying define
9158 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9159 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9160
9161 (scm_m_letrec1): Removed. Part of the functionality is taken
9162 over by the new function 'transform_bindings'.
9163
9164 (transform_bindings): New function. Takes over some of the
9165 functionality of removed function 'scm_m_letrec1', namely to split
9166 a list of bindings into a reversed list of variables and a list of
9167 initializers.
9168
9169 (scm_m_letrec): Call 'transform_bindings'.
9170
9171 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9172 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9173 test. Use 'transform_bindings'. Fixed scoping error with named
9174 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9175 Jerram for suggesting the fix). Cleaned up the control structure
9176 a bit.
9177
9178 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9179 unnecessary consing. Eliminated unnecessary
9180 SCM_DEFER/ALLOW_INTS.
9181
9182 (SCM_CEVAL): Un-obfuscated some loops.
9183
cecb4a5e
NJ
91842001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9185
8f85c0c6
NJ
9186 * gc.h (scm_unhash_name): Old declaration removed.
9187
9188 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9189 @code{primitive-eval}.
9190
9191 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9192 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9193 Change @deffnx lines in docstrings to say {Scheme Procedure}
9194 rather than primitive or procedure.
9195
9196 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9197 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9198 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9199 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9200 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9201 (scm_string_split, scm_string_ci_to_symbol), strings.c
9202 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9203 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9204 Docstring fixes and improvements reflecting edits that have been
9205 made in the reference manual source.
9206
9207 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9208 scm_object_property, scm_set_object_property_x): Remove invalid
9209 @deffnx lines for corresponding procedure property primitives.
9210
cecb4a5e
NJ
9211 These changes add a @deffnx C function declaration and function
9212 index entries for each Guile primitive to the copy of the doc
9213 snarf output that is used for reference manual synchronization.
9214 Online help is unchanged.
849038b5 9215
cecb4a5e
NJ
9216 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9217 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9218 name to SCM_SNARF_DOCS.
849038b5 9219
cecb4a5e
NJ
9220 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9221 snarf-check-and-output-texi.
9222
9223 * Makefile.am (guile-procedures.texi): New rule.
9224 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9225 Changed so that the last stage of doc snarfing is now performed
9226 twice, once to produce guile-procedures.txt for online help, and
9227 once to produce guile.texi for reference manual synchronization.
9228
ddea3325
DH
92292001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9230
9231 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9232 safely usable as a single statement followed by a ';', for example
9233 in an if statement.
9234
9235 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9236
72dd0a03
NJ
92372001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9238
9239 * random.c (scm_random_solid_sphere_x,
9240 scm_random_hollow_sphere_x): Correct "shere" typos.
9241
9242 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9243
9244 * version.c (scm_version): Update docstring to include
9245 `micro-version'.
9246
6558eda6
MV
92472001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9248
409b8588
MV
9249 * modules.c (scm_c_export): Call va_end after collecting the
9250 symbols.
9251
adb8c0f2
MV
9252 * strop.h, strop.c (scm_substring_move_left_x,
9253 scm_substring_move_right_x): Removed.
9254
6558eda6
MV
9255 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9256 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9257 configure does.
9258
5d8fc640
MV
92592001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9260
9261 * numbers.c: Document macros to define when including
9262 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9263 now rely on SIZEOF_ macros that have been figured out at
9264 configure time.
9265
9266 * num2integral.i.c: Adapt to new interface.
9267 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9268 target type by casting it and checking whether it is still the
9269 same. Do not try to handle bignums for integral types that are
9270 smaller than fixnums. When handling bignums, collect the
9271 magnituse first into a unsigned type, and correctly check for
9272 overflow.
9273 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9274 only -MIN_VALUE can still be negative of all negative numbers (in
9275 twos-complement).
9276
849038b5 9277 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9278
9279 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9280 HAVE_LONG_LONG depending on whether their size is non-zero.
9281
d6b8cf11
TTN
92822001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9283
9284 * strop.c (scm_string_null_p): Docfix; nfc.
9285 Thanks to Scott Lenser.
9286
9401323e
NJ
92872001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9288
9289 * extensions.c (scm_load_extension): Canonicalize docstring
9290 whitespace.
9291
9292 * unif.c (scm_uniform_array_write), ports.c
9293 (scm_current_output_port, scm_force_output), dynwind.c
9294 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9295 filesys.c (scm_open, scm_lstat), struct.c
9296 (scm_make_struct_layout), random.c (scm_random,
9297 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9298 (scm_i_index): Remove superfluous whitespace from end of docstring
9299 lines.
9300
9301 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9302 strings.c (scm_make_string), variable.c (scm_make_variable,
9303 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9304 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9305 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9306 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9307 newline at end of docstrings.
9308
9309 * modules.c (scm_set_current_module): Add missing newline to
9310 docstring.
9311
b4e15479
SJ
93122001-11-07 Stefan Jahn <stefan@lkcc.org>
9313
9314 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9315 and makes them available through Guile. That is because the
9316 Winsock-API does not store its errors in `errno' and thus cannot
9317 return error messages via `strerror (errno)'.
9318
9319 * socket.c (scm_init_socket): Initialize `win32-socket' part
9320 here under M$-Windows.
9321
d6b8cf11 9322 * numbers.h: Added missing declaration of
b4e15479
SJ
9323 `scm_sys_check_number_conversions()'.
9324
9325 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9326 and use in `(strerror)' and `(system-error)'.
9327
d6b8cf11 9328 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9329 `win32-socket.[ch]' to extra source and header files.
9330
7ab89df1
MV
93312001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9332
9333 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9334 a call to turn-on-debugging when --debug has been given instead of
9335 turning it on directly. Also, handle new `--no-debug' option,
9336 which might suppress the call to turn-on-debugging.
9337
0233bfc1
SJ
93382001-11-05 Stefan Jahn <stefan@lkcc.org>
9339
9340 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9341
8f99e3f3
SJ
93422001-11-04 Stefan Jahn <stefan@lkcc.org>
9343
9344 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9345 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9346 correctly and allows a clean build on Win32.
9347
d6b8cf11 9348 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9349 into FOO.
9350
9351 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9352 import macros for external libraries (libcrypt, libqthreads,
9353 libreadline and libregex).
9354
9355 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9356
9357 * posix.c (flock): Added support for flock() in M$-Windows.
9358
9359 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9360 of __SCM_IMPORT__.
9361
9362 * fports.c (getflags): Differentiate reading and writing pipes
9363 descriptors.
9364
9365 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9366 M$-Windows.
9367
9368 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9369 conditionalized error code if `ETIMEDOUT' is not available.
9370 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9371 timeout'.
9372
9373 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9374 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9375 each inclusion of `num2integral.i.c'.
9376 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9377
4e21fa60
MV
93782001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9379
9380 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9381 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9382
08112c95
MD
93832001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9384
7663c008
MD
9385 * print.c (scm_iprin1): Mark print state as revealed when
9386 dispatching to generic write or display.
9387
08112c95
MD
9388 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9389
f712d833
MV
93902001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9391
9392 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9393
f712d833
MV
9394 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9395 and win32-dirent.h to extra source and header files. These
9396 include the uname() and the POSIX dirent interface implementation
9397 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9398 linkers which do not allow unresolved symbols inside shared
9399 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9400 dependency.
9401
d6b8cf11
TTN
9402 * __scm.h: Defined SCM_API. This macro gets prepended to all
9403 function and data definitions which should be exported or imported
f712d833
MV
9404 in the resulting dynamic link library in the Win32 port.
9405
9406 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9407 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9408 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9409 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9410 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9411 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9412 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 9413 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
9414 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9415 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9416 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9417 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9418 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9419 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9420 vports.h, weaks.h:
9421 Prefixed each each exported symbol with SCM_API.
9422
d6b8cf11 9423 * continuations.c: Added comment about the use of the extern
f712d833
MV
9424 declarations of {get,set}context() functions used in the ia64 port.
9425
9426 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9427 is meant to be a `unsigned long *'.
9428
9429 * filesys.c: Include `direct.h' if possible. Use local
9430 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9431 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9432 able to differentiate between sockets and other file descriptors.
9433 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9434 `scm_dirname()'.
9435
9436 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9437 statement block in `scm_fport_buffer_add()'.
9438 Some corrections in `getflags()'.
d6b8cf11 9439
f712d833
MV
9440 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9441
9442 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9443 build on Win32. Disable preloaded symbols on Win2 platforms.
9444
9445 * ioext.c, ports.c: Include `io.h' is possible.
9446
9447 * mkstemp.c: Include `process.h' is possible.
9448
9449 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9450 too.
9451 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9452
9453 * posix.c: Remove unnecessary dirent includes and defines. Include
9454 local `win32-uname.h' for MinGW. Extern declaration of
9455 `mkstemp()' for systems where it does not exists. Make
9456 `getlogin()' available on M$-Windows.
9457
9458 * scmsigs.c: Made `usleep()' avalable on MinGW.
9459
9460 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9461
9462 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9463
9464 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9465
d245ce23
MD
94662001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9467
9468 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9469 Don't apply scm_uniform_vector_length on arrays.
9470
8ea46249
DH
94712001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9472
9473 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9474 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9475 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9476 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9477 scm_list_<n> over scm_cons[2]?.
9478
9479 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9480 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9481 SCM_C[AD][AD]R instead of explicit form.
9482
9483 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9484 comparison parameters.
9485
9486 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9487 !SCM_NULLP instead of SCM_NIMP.
9488
9489 (scm_m_case): Don't copy the form. Renamed proc to clause and
9490 minimized its scope. Renamed x to clauses. Removed side
9491 effecting operation from macro call.
9492
9493 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9494 minimized its scope. Renamed x to clauses. Minimized the scope
9495 of variable 'len'. Make sure the else clause is treated specially
9496 even in case of '=>' occurences. Don't change the else to #t in
9497 order to be able to distinguish this case in the evaluator. Leave
9498 type checking of the recipient to the evaluator.
9499
9500 (scm_c_improper_memq): Made the comment somewhat clearer.
9501
9502 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9503 test for SCM_IM_LET at the place of the formal parameters.
9504 Simplified the formal parameter checking.
9505
9506 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9507 Renamed arg1 to binding and minimized its scope. Eliminated
9508 unnecessary consing.
9509
9510 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9511 variable 'len'.
9512
9513 (build_binding_list): New static function.
9514
9515 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9516 Further, split up the 'letrec' unmemoizing code to the
9517 corresponding parts for 'do', 'let' and 'letrec', adding comments
9518 to each form. Cleanup the handling of the do form (This removes
9519 some *real* code :-).
9520
9521 (SCM_CEVAL): Removed side effecting operation from macro call.
9522 Handle the 'else clause of the 'cond form specially - the symbol
9523 'else is not replaced with #t any more.
9524
8186c4f5
GH
95252001-10-14 Gary Houston <ghouston@arglist.com>
9526
9527 * version.c (scm_version): use sprintf instead of snprintf,
9528 for portability. thanks to Bill Schottstaedt.
9529
89759084
MD
95302001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9531
9532 * read.c (scm_lreadr): When user-defined hash procedure returns
9533 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9534 an exception. (This prevents parsing of uniform vectors from
9535 interfering with parsing of numbers.)
9536
9c7ce563
MV
95372001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9538
9539 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9540 PTRDIFF_MIN. Thanks to Ken Raeburn.
9541
95422001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9543
9544 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9545
9546 * eval.c (scm_m_atbind): First try to find the variable without
9547 defining it locally; when it has not been found, define it
9548 locally.
9549
9550 * modules.c (module_variable): Pass over variables that exist but
9551 are unbound.
9552
95532001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9554
9555 * backtrace.c (display_backtrace_file_and_line): Only use
9556 scm_basename when POSIX support is compiled in. Thanks to Chris
9557 Cramer.
9558
1fe5e088
DH
95592001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9560
9561 * numbers.c (mem2uinteger): Return number read so far when coming
9562 across a hexdigit after having read a # or if not reading a hex
9563 value. This will enable the calling code to correctly handle
9564 forms like 1e2. (The background is, that the exponent markers d,
9565 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9566 providing this patch.
9567
9568 (mem2complex): Fix erroneous double-negation. Now, numbers like
9569 1-i will be read correctly.
9570
68665a97
MD
95712001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9572
9573 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9574
9575 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9576
d5cf5324
DH
95772001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9578
9579 * print.c (scm_print_state_vtable, print_state_pool):
9580 Initialize. These variables are now registered as gc roots.
9581
9582 (scm_current_pstate): Update documentation.
9583
9584 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9585 scm_prin1, scm_init_print): print_state_pool is registered as a
9586 gc root and thus does not need to be protected by a surrounding
9587 pair any more.
9588
9589 (make_print_state): The car of print_state_pool no longer holds
9590 the scm_print_state_vtable.
9591
9592 (scm_current_pstate, scm_make_print_state, print_circref,
9593 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
9594 SCM_N<foo>.
9595
9596 (scm_prin1): When building lists, prefer scm_list_<n> over
9597 scm_cons[2]?.
9598
9599 (scm_iprlist): Removed a redundant SCM_IMP test.
9600
9601 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
9602
37c56aec
DH
96032001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9604
9605 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
9606
9607 (scm_memcons, scm_mem_to_proc): When building lists, prefer
9608 scm_list_<n> over scm_cons[2]?.
9609
9610 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
9611
9612 (scm_procedure_name): Use SCM_CADR instead of explicit form.
9613
9614 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
9615 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
9616 for some reason his patch didn't make it into the cvs.
9617
79d34f68
DH
96182001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
9619
9620 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
9621 little bit - should even be somewhat more accurate now.
9622
5e137c65
RB
96232001-10-08 Rob Browning <rlb@defaultvalue.org>
9624
9625 * gc.c: support ia64 register backing store.
9626 (SCM_MARK_BACKING_STORE): new macro.
9627
9628 * continuations.h: support ia64 register backing store.
9629 (struct scm_t_contregs): add ia64 register backing store.
9630
9631 * continuations.c: support ia64 register backing store.
9632 (continuation_mark): mark ia64 register backing store.
9633 (continuation_free): free ia64 register backing store.
9634 (scm_make_continuation): capture ia64 register backing store.
9635 (copy_stack_and_call): copy ia64 register backing store.
9636
ee083ac2
DH
96372001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9638
9639 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
9640 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
9641 instead of SCM_NIMP to test for that case.
9642
9643 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
9644 scm_t_bits instead of long.
9645
71dcdbf9
MV
96462001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9647
9648 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
9649 SCM_T_SIGNED_BITS_MIN): New.
9650 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
9651 Use them to make these macros computable by the preprocessor.
9652
9653 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
9654 whether the integral type fits in a fixnum, not the compiler.
9655 This removes a spurious compiler warning. Also, honor the
9656 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
9657 needed for `long long's.
9658
9659 * numbers.c: Define NO_PREPRO_MAGOC when including
9660 num2integral.c.i for `long long' and `signed long long'.
9661
152812c0
MD
96622001-10-06 Mikael Djurfeldt <mdj@linnaeus>
9663
9664 These changes fixes a race condition in the Guile coop - pthread
9665 compatibility code.
d6b8cf11 9666
152812c0
MD
9667 * coop.c (mother_awake_p): New variable.
9668 (coop_create): Set mother_awake_p before creating or signalling
9669 mother; wait until mother is going to sleep before returning.
9670 (mother): Reset mother_awake_p before going to sleep.
9671
11d49f54
DH
96722001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9673
9674 * options.c (protected_objects, scm_init_options): The content of
9675 protected_objects is now protected from garbage collection using
9676 scm_gc_register_root instead of scm_permanent_object.
9677
9678 (get_option_setting): New static function that computes an option
9679 setting as it was formerly done in the function scm_options.
9680
9681 (get_documented_option_setting): New static function that
9682 returns option documentation as it was formerly done in the
9683 function scm_options. Note that documentation C strings are no
9684 longer precomputed into SCM objects. Instead, they are converted
9685 into SCM strings every time get_documented_option_setting is
9686 called.
9687
9688 (change_option_setting): New static functions that modifies the
9689 option setting as it was formerly done in the function
9690 scm_options. The function is now exception safe, i. e. won't
9691 cause a memory leak when interrupted. Further, only non-immediate
9692 option values are added to the protection list.
9693
9694 (scm_options): This function now has only the purpose to dispatch
9695 to to get_option_setting, get_documented_option_setting or
9696 change_option_setting, depending on the arguments given to
9697 scm_options.
9698
9699 (scm_init_opts): Don't convert documentation C strings into SCM
9700 strings. Further, don't protect any object values: They _must_
9701 be immediate values, otherwise there is no guarantee that they
9702 have not been collected before anyway.
9703
9704 * options.[ch] (scm_t_option): Made type unsigned, name into a
9705 constant char* and val into a scm_t_bits type.
9706
9707 (scm_options, scm_init_opts): The number of options is guaranteed
9708 to be larger or equal to zero. Thus, the type is changed to
9709 unsigned.
9710
3dbacabc
DH
97112001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9712
9713 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
9714 testing an unsigned value for being >= 0.
9715
14282d0f
DH
97162001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9717
9718 * numbers.h: Removed old comment about using SCM_CAR to access
9719 non-pair cells.
9720
9721 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
9722 the return value is signed. Thanks to Brian Crowder for the bug
9723 report.
9724
9725 (SCM_SRS): Avoid unnecessary casting and don't unpack input
9726 values. With this patch, SCM_SRS can be safely used for other
9727 types than scm_t_signed_bits. However, it should still better be
9728 an internal macro and thus be renamed to SCM_I_SRS.
9729
9730 (SCM_MAKINUM, SCM_INUM): Use proper casting.
9731
2dbec7b5
GH
97322001-10-03 Gary Houston <ghouston@arglist.com>
9733
9734 * continuations.h, unif.h: in the descriptions of the bit patterns
9735 of the heap cells, make bit 0 the least significant.
9736
cf4ee841
TTN
97372001-09-25 Thien-Thi Nguyen <ttn@glug.org>
9738
9739 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
9740 Thanks to Golubev I. N.
9741
4a151b3d
GH
97422001-09-25 Gary Houston <ghouston@arglist.com>
9743
9744 * ports.c (scm_drain_input): extended the docstring. thanks to
9745 Alex Schroeder and Thien-Thi Nguyen.
9746
581ded70
MD
97472001-09-23 Mikael Djurfeldt <mdj@linnaeus>
9748
9749 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
9750 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
9751 macros. (The NUM names might soon change.)
9752
9753 * numbers.h: Added missing declarations.
9754
5437598b
MD
97552001-09-22 Mikael Djurfeldt <mdj@linnaeus>
9756
9757 * Makefile.am: Distribute num2float.i.c.
9758
9759 * num2float.i.c: New file, multiply included by numbers.c, used
9760 to "templatize" the float <-> num conversion routines.
9761
9762 * numbers.c: New functions: scm_num2float, scm_float2num,
9763 scm_num2double, scm_double2num.
9764
0b073f0f
RB
97652001-09-21 Rob Browning <rlb@defaultvalue.org>
9766
9767 * .cvsignore: really add version.h
9768
9769 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
9770 Otherwise it fails on the alpha. However, we might rather choose
9771 this size conditionally.
9772
9773 * numbers.c (scm_gcd): change "k" to a long from an int.
9774 Otherwise it fails on the alpha. However, we might rather choose
9775 this size conditionally.
9776
9777 * error.c (scm_wta): coerce char* to intptr_t before int
9778 assignment.
9779
9780 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
9781 int.
9782
9783 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
9784
2830fd91
MD
97852001-09-20 Mikael Djurfeldt <mdj@linnaeus>
9786
9787 * numbers.c (scm_integer_expt): Accept inexact integer in second
9788 argument. (Thanks to Bill Schottstaedt.)
9789
c13f0a90
RB
97902001-09-20 Rob Browning <rlb@defaultvalue.org>
9791
9792 * .cvsignore: add version.h
9793
9794 * versiondat.h.in: removed (obsolete).
9795
9796 * version.h.in: renamed from version.h.
9797 (SCM_GUILE_MAJOR_VERSION): new public macro.
9798 (SCM_GUILE_MINOR_VERSION): new public macro.
9799 (SCM_GUILE_MICRO_VERSION): new public macro.
9800
9801 * version.h: renamed to version.h.in.
9802
9803 * version.c
9804 (scm_major_version): support integer *_VERSION macros.
9805 (scm_minor_version): support integer *_VERSION macros.
9806 (scm_micro_version): support integer *_VERSION macros.
9807 (scm_version): support integer *_VERSION macros.
9808
147c18a0
MD
98092001-09-20 Mikael Djurfeldt <mdj@linnaeus>
9810
9811 * error.c, error.h: Made error keys globally accessible.
9812 Applications might want to test for these or use them in a direct
9813 call to scm_error.
9814
9815 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
9816 routines are passed an inexact. This change in behavior is
9817 motivated by concordance with R5RS: It is more common that a
9818 primitive doesn't want to accept an inexact for an exact.
9819
662c5539
DH
98202001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9821
9822 The following patch partially undoes my patch from 2001-06-30,
9823 where I added the function scm_gc_mark_cell_conservatively. The
9824 function is buggy, since it breaks guile during conservative
9825 marking if a pointer on the stack points directly into the list of
9826 free cells on the heap: With conservative cell marking this will
9827 cause the whole free list to be scanned and marked - boom!
9828
9829 * gc.c (allocated_mark, MARK, heap_segment,
9830 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 9831 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
9832 scm_gc_mark_cell_conservatively and update the corresponding
9833 comments and uses accordingly. Thanks to Christopher Cramer for
9834 the patch. (Minor corrections by me.)
9835
6c1b7628
GH
98362001-09-15 Gary Houston <ghouston@arglist.com>
9837
9838 * root.h (scm_root_state): removed the continuation_stack and
9839 continuation_stack_ptr members, which have no apparent purpose.
9840 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
9841 removed.
662c5539 9842
6c1b7628
GH
9843 * root.c (root_mark), init.c (restart_stack, start_stack), gc
9844 (scm_igc): remove all references to contination_stack and
9845 continuation_stack_ptr, avoiding allocation of a vector and
9846 useless processing during gc.
9847
455c0ac8
DH
98482001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9849
9850 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
9851
9852 (TCONC_IN): Make sure that the cell word 0 is initialized last.
9853
9854 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
9855
9856 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
9857
9858 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
9859 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
9860
22ba637b
DH
98612001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9862
9863 * guardians.c (mark_dependencies_in_tconc,
9864 whine_about_self_centered_zombies, scm_init_guardians): Register
9865 the static global variable `self_centered_zombies' via
9866 scm_gc_register_root, to make some cdr-ing unnecessary.
9867
c3c4d801
DH
98682001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9869
9870 * backtrace.c (display_backtrace_file,
9871 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
9872 values, use SCM_FALSEP when comparing SCM values against #f.
9873 Thanks to Rob Browning for the bug report.
9874
b00418df
DH
98752001-09-12 Martin Baulig <martin@home-of-linux.org>
9876
9877 * strings.[ch] (scm_str2string): New function.
9878
a0d34a0b
MV
98792001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
9880
9881 * gc.c (scm_done_free): Always subtract size from scm_mallocated
9882 when computing nm, even if it's negative.
9883 (scm_must_malloc): Abort on overflow of scm_mtrigger.
9884 (scm_must_realloc): Likewise.
9885
b10586f0
ML
98862001-09-01 Michael Livshin <mlivshin@bigfoot.com>
9887
9888 * numbers.c (scm_sys_check_number_conversions): new function,
9889 defined if Guile is compiled in debugging mode. currently checks
9890 `scm_num2ulong', should check much much more.
9891
9892 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
9893 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 9894
8c494e99
DH
98952001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9896
9897 * __scm.h: Added new section about compile time selectable
9898 features.
9899
9900 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
9901 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
9902 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
9903 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
9904 Removed.
9905
9906 * deprecation.c (scm_include_deprecated_features): Simplified.
9907
9908 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 9909 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
9910
9911 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
9912 Extract side-effecting operations from macros.
9913
9914 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
9915 scm_top_level_lookup_closure_var and scm_system_transformer.
9916
9917 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
9918
9919 (heap_segment): Use CELL_P instead of SCM_CELLP.
9920
9921 * init.c (start_stack): Don't initialize
9922 scm_top_level_lookup_closure_var and scm_system_transformer.
9923
9924 * modules.c (scm_set_current_module): Don't access
9925 scm_top_level_lookup_closure_var and scm_system_transformer.
9926
9927 (scm_sym2var): Don't call scm_variable_set_name_hint.
9928
9929 (scm_post_boot_init_modules): Removed deprecated initializations.
9930
9931 * print.c (scm_ipruk): Don't access cell contents of non cells.
9932
9933 * strings.c (scm_string_set_x): All strings are writable.
9934
9935 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
9936 type. There is only one string type now.
9937
9938 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
9939
9940 * tags.h: Remove comments about two different string types.
9941
9942 (SCM_CELLP, SCM_NCELLP): Deprecated.
9943
9944 * variable.c (make_variable): Remove code variant for vcells.
9945
9946 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
9947 SCM_VARIABLE_LOC): Remove code variant for vcells.
9948
9949 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
9950 SCM_ENABLE_DEPRECATED with the logic reversed.
9951
9952 * dynl.c (moddata, registered_mods), dynl.[ch]
9953 (scm_register_module_xxx, scm_registered_modules,
9954 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
9955 (*top-level-lookup-closure*), eval.[ch]
9956 (scm_top_level_lookup_closure_var, scm_system_transformer,
9957 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
9958 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
9959 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
9960 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
9961 scm_unprotect_object), modules.c (root_module_lookup_closure,
9962 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
9963 beautify_user_module_x_var, try_module_autoload_var,
9964 scm_module_full_name), modules.[ch] (scm_the_root_module,
9965 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 9966 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
9967 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
9968 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
9969 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
9970 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
9971 scm_make_shared_substring), tags.h (scm_tc7_substring,
9972 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
9973 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
9974 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
9975 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
9976 Removed.
9977
9978 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
9979 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
9980 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
9981 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
9982 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
9983 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9984 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
9985 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
9986 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
9987 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
9988 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
9989 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
9990 (setzone, scm_strftime, scm_strptime), vports.c
9991 (scm_make_soft_port): Remove calls to
9992 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
9993 gone, all strings are 0-terminated anyway.
9994
9995 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
9996 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
9997 double inclusion of the same headers to the SCM_<filename>_H
9998 format.
9999
10000 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10001 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10002 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10003 any more.
10004
10005 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10006 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10007 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10008 !SCM_<foo> over SCM_N<foo>.
10009
dee01b01
DH
100102001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10011
10012 * Makefile.am: Remove references to symbols-deprecated.c.
10013
10014 * symbols.c (scm_init_symbols): Don't initialize deprecated
10015 symbol functions.
10016
10017 * symbols-deprecated.c: Removed.
10018
10019 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10020 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10021 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10022 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10023 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10024 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10025 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10026 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10027 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10028 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10029 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10030 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10031 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10032 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10033 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10034 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10035 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10036 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10037 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10038 scm_intern0, scm_sysintern, scm_sysintern0,
10039 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10040 scm_string_to_obarray_symbol, scm_intern_symbol,
10041 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10042 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10043 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10044 vectors.[ch] (scm_vector_set_length_x): Removed.
10045
10046 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10047 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10048 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10049 Renamed the macros that are defined to inhibit double inclusion of
10050 the same headers to the SCM_<filename>_H format.
10051
10052 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10053 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10054 SCM_N<foo>.
10055
b29058ff
DH
100562001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10057
10058 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10059 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10060 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10061 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10062 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10063 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10064 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10065 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10066 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10067 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10068 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10069 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10070
10071 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10072 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10073 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10074 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10075 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10076 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10077 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10078 double inclusion of the same headers to the SCM_<filename>_H
10079 format.
10080
10081 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10082 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10083 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10084 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10085 !SCM_<foo> over SCM_N<foo>.
10086
0527e687
DH
100872001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10088
10089 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10090 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10091 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10092 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10093 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10094 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10095 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10096 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10097 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10098 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10099 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10100 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10101 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10102 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10103 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10104 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10105 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10106 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10107 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10108 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10109 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10110 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10111 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10112 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10113 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10114 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10115 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10116 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10117 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10118 the macros that are defined to inhibit double inclusion of the
10119 same headers to the SCM_<filename>_H format.
10120
fada26b2
MV
101212001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10122
10123 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10124 "scm_t_portable" with "scm_port_table" which was an artifact from
10125 the great "scm_*_t -> scm_t_" renaming.
10126
e4d1c1ea
TTN
101272001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10128
10129 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10130 used; nfc. Thanks to Bill Schottstaedt.
10131
10132 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10133 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10134 Thanks to Chris Cramer.
10135
b573e744
MV
101362001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10137
10138 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10139
10140 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10141 dynamic scope.
10142 * dynwind.h (scm_swap_bindings): Declare.
10143 * dynwind.c (scm_swap_bindings): Make non-static.
10144
8a3e715b
ML
101452001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10146
10147 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10148 doing exactly nothing about them). thanks Neil!
10149
cf504ee0
NJ
101502001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10151
10152 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10153
43b83b54
TTN
101542001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10155
10156 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10157 (proto) in the case when either `GUILE_DEBUG' or
10158 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10159
10160 (map_free_list): Fix typo: Ref `f' correctly.
10161
10162 Thanks to Chris Cramer.
10163
ab4cd34b
RB
101642001-08-15 Rob Browning <rlb@defaultvalue.org>
10165
10166 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10167 variables.
10168 (libpath.h): change libguileversion to libguileinterface.
10169
b754e3d1
MV
101702001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10171
10172 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10173 ChangeLog-2000. Thanks to Daniel Skarda!
10174
8b1d12c7
ML
101752001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10176
10177 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10178 do it from the Makefile.
10179
10180 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10181 are of a reasonable size.
10182
baffb19f
NJ
101832001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10184
10185 * stacks.c (scm_make_stack): Improve docstring by explaining use
10186 of cutting args.
10187
c1151355
MV
101882001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10189
10190 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10191 scm_char_whitespace_p, scm_char_upper_case_p,
10192 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10193 characters to fulfill isascii in addition to the primary
10194 predicate.
10195
3c9a524f
DH
101962001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10197
10198 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10199 scm_istr2flo, scm_istring2number): Removed.
10200
10201 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10202 SCM_SLOPPY_<foo>.
10203
10204 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10205 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10206 Added.
10207
10208 (scm_string_to_number): Use new number parser.
10209
10210 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10211 handles complex numbers.
10212
10213 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10214 SCM_<foo>_H.
10215
10216 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10217 SCM_N<pred>.
10218
10219 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10220
10221 (scm_i_mem2number): Added.
10222
10223 (scm_exact_to_inexact): Changed signature.
10224
10225 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10226 here instead of within scm_i_mem2number. Call scm_i_mem2number
10227 instead of scm_istr2int and scm_istring2number.
10228
01f11e02
DH
102292001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10230
10231 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10232 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10233 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10234 !SCM_<pred> over SCM_N<pred>.
10235
10236 (scm_eval_body): Remove side effecting code from macro call.
10237
10238 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10239 SCM_NIMP test.
10240
6cf69537
DH
102412001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10242
10243 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10244
54866b6c
MV
102452001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10246
10247 Removed vcell slot from structs.
43b83b54 10248
54866b6c
MV
10249 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10250 subsequent indices.
10251
10252 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10253 zero. Use scm_vtable_index_layout instead of "0" when accessing
10254 said slot.
10255 (scm_init_struct): Remove vcell slot layout code from
10256 required_vtable_fields.
10257
10258 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10259
10260 * goops.c (build_class_class_slots): Removed vcell slot
10261 definition.
10262
10263 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10264 Removed vcell slot layout code.
10265 (scm_si_vcell): Removed.
10266
5b54c4da
MV
102672001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10268
a0f5718e 10269 "Glocs" have been removed.
43b83b54 10270
a0f5718e
MV
10271 * tags.h: Update tag system docs.
10272 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10273 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10274 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10275 or SCM_NCONSP, respectively.
10276
10277 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10278 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10279 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10280
10281 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10282 tell glocs from structs.
43b83b54 10283
a0f5718e
MV
10284 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10285
10286 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10287 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10288 instead of with glocs.
10289 (EVALCAR): Do not test for glocs.
10290 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10291 condition.
10292 (scm_unmemocar): Do not handle glocs.
10293 (scm_m_atfop): Memoize as a variable, not as a gloc.
10294 (scm_eval_args, scm_deval_args): Do not handle glocs.
10295 (scm_ceval, scm_deval): Likewise.
43b83b54 10296
a0f5718e
MV
10297 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10298 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10299 Removed.
10300
10301 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10302
10303 * dynwind.c (scm_swap_bindings): Likewise.
10304 (scm_dowinds): Updated to recognize lists of variables instead of
10305 lists of glocs.
10306
10307 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10308
43b83b54 10309
5b54c4da
MV
10310 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10311 where it is needed.
43b83b54 10312
3c3db128
GH
103132001-07-25 Gary Houston <ghouston@arglist.com>
10314
10315 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10316 docstrings to reflect the n-ary implementation.
10317
dd29a169
MV
103182001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10319
10320 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10321 value of a variable, not the plain "return" statement.
10322
f5fe6c2f
MV
103232001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10324
10325 * eval.c: Allow variables in memoized code (in addition to glocs).
10326 (scm_lookupcar): Handle variables in lost races. Replace symbol
10327 with variable directly, do not make a gloc.
10328 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10329 like glocs.
10330 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10331 the main switch.
10332
ee0c7345
MV
103332001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10334
6d9ad98a
MV
10335 * variable.c (scm_i_variable_print): Use "value" instead of
10336 "binding" since a binding is the mapping between symbols and
10337 variables, not between variables and their values.
10338
ee0c7345
MV
10339 * tags.h (scm_tc7_variable): New.
10340 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10341 * print.c (scm_iprin1): Likewise.
10342
10343 * variable.h (scm_tc16_variable): Removed.
10344 (SCM_VARIABLEP): Test for new tc7 code.
10345 (scm_i_variable_print): New.
10346 * variable.c (scm_tc16_variable): Removed.
10347 (variable_print): Renamed to scm_i_variable_print and made
10348 non-static.
10349 (variable_equal_p): Removed.
10350 (make_variable): Construct a tc7 object instead of a smob.
10351 (scm_init_variable): Do not register smob.
43b83b54 10352
f3805ebb
MV
103532001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10354
10355 * tags.h: Include inttypes.h when we have it.
10356
103572001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10358
10359 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10360 is taken by the new SCM_IM_CALL_WITH_VALUES.
10361 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10362
6a1677a3
GH
103632001-07-22 Gary Houston <ghouston@arglist.com>
10364
10365 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10366 SCM_MAKINUM to convert regoff_t value to SCM.
10367
1bed8c28
GH
103682001-07-21 Gary Houston <ghouston@arglist.com>
10369
10370 * scmsigs.c: include sys/time.h for itimer stuff.
10371
e658215a
RB
103722001-07-19 Rob Browning <rlb@defaultvalue.org>
10373
10374 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10375
10376 * c-tokenize.lex: add option %nounput to quiet warning.
10377 Add prototype for yylex to quiet warning.
10378
10379 * scmconfig.h.in: add flags for setitimer and getitimer.
10380
10381 * scmsigs.h (scm_init_scmsigs): new prototype.
10382 (scm_init_scmsigs): new prototype.
10383
10384 * scmsigs.c (s_scm_setitimer): new function.
10385 (s_scm_setitimer): new function.
10386
58ade102
MG
103872001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10388
10389 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10390 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10391 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10392 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10393 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10394 guile-func-name-check.in, guile-snarf-docs-texi.in,
10395 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10396 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10397 objprop.c, objprop.h, options.c, options.h, random.h,
10398 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10399 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10400 version.c, version.h: Updated copyright notice.
10401
6b80d352
DH
104022001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10403
10404 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10405 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10406 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10407 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10408 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10409 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10410 sym_environment, scm_sym_change_class): New static variables to
10411 hold predefined symbols.
10412
10413 (build_class_class_slots): Build the list using scm_list_n
10414 instead of cons. Also, slots are already created as lists, thus
10415 making a call to maplist unnecessary.
10416
10417 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10418 scm_class_direct_subclasses, scm_class_direct_methods,
10419 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10420 scm_method_procedure, create_standard_classes, purgatory): Use
10421 predefined symbols.
10422
10423 (build_slots_list, compute_getters_n_setters,
10424 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10425 get_slot_value_using_name, set_slot_value_using_name,
10426 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10427 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10428 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10429
10430 (scm_sys_prep_layout_x): Minimize variable scopes.
10431
10432 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10433 scm_sys_fast_slot_set_x): Fix signedness.
10434
10435 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10436 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10437 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10438 when converting to and from SCM values.
10439
10440 (scm_enable_primitive_generic_x): Add rest argument checking.
10441
10442 (map, filter_cpl, maplist, scm_sys_initialize_object,
10443 scm_sys_prep_layout_x, slot_definition_using_name,
10444 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10445 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10446 predicates over SCM_N?IMP tests.
10447
10448 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10449 checking.
10450
10451 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10452 alias.
10453
63bcad19
DH
104542001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10455
10456 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10457
10458 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10459
10460 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10461
10462 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10463
4d6aae71
ML
104642001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10465
10466 * strings.c (s_scm_string): fix arg position in assert.
10467
4b8ec619
GH
104682001-07-11 Gary Houston <ghouston@arglist.com>
10469
10470 * strports.c (st_write): use memcpy, not strncpy. thanks to
10471 Dale P. Smith.
10472
dbb640bd
TTN
104732001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10474
10475 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10476 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10477 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10478 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10479 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10480 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10481 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10482 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10483 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10484 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10485 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10486 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10487 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10488 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10489 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10490 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10491 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10492 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10493 weaks.c, weaks.h: Remove "face-lift" comment.
10494
fd6c6321
RB
104952001-07-08 Rob Browning <rlb@defaultvalue.org>
10496
10497 * .cvsignore: add stamp-h.in.
10498
f91e4547
MG
104992001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10500
10501 * hooks.c (scm_make_hook, scm_add_hook_x),
10502 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10503 value info to the docstrings.
10504
7beabedb
MG
105052001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10506
10507 Some more compatibility patches for Windows.
dbb640bd 10508
7beabedb
MG
10509 * posix.c (getlogin): getlogin() implementation for Windows.
10510
10511 * backtrace.c, ioext.c: Include <stdio.h>.
10512
10513 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10514 exist.
10515
10516 * cpp_sig_symbols.in: Added SIGBREAK.
10517
0d0560d0
MV
105182001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10519
10520 * strports.c (scm_read_0str, scm_eval_0str): Call
10521 scm_c_read_string and scm_c_eval_string respectively, not
10522 themselves. Thanks to Dale P. Smith!
10523
9a97e362
DH
105242001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10525
10526 * unif.c (scm_array_set_x): The variable args does not
10527 necessarily have to be a list. Further, got rid of a redundant
10528 SCM_NIMP test.
10529
592996c9
DH
105302001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10531
10532 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10533 last.
10534
10535 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 10536 init_heap_seg): Fixed signedness.
592996c9
DH
10537
10538 (init_heap_seg): Replaced strange for-loop with a while loop.
10539
10540 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10541
10542 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10543
10544 The following patch adds conservative marking for the elements of
10545 free or allocated cells.
10546
10547 * gc.c (allocated_mark, heap_segment): New static functions.
10548
10549 (which_seg): Deleted, since the functionality is now provided by
10550 function heap_segment.
10551
10552 (map_free_list): Use heap_segment instead of which_seg.
10553
10554 (MARK): If cell debugging is disabled, mark free cells
10555 conservatively.
10556
10557 (scm_mark_locations, scm_cellp): Extracted the search for the
10558 heap segment of a SCM value into function heap_segment.
10559
10560 (scm_init_storage): Allocated cells must be marked
10561 conservatively.
10562
10563 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10564
10565 The following patch changes the representation of weak vectors to
10566 double cells instead of using an extension of the vector's
10567 allocated memory.
10568
10569 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10570 the result of SCM_WVECT_GC_CHAIN.
10571
10572 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10573
10574 * weaks.c (allocate_weak_vector): New static function. It does
10575 not patch any previously created vector object during the
10576 construction of a weak vector, and thus doesn't need to switch
10577 off interrupts during vector creation.
10578
10579 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10580 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10581 Use allocate_weak_vector to provide the new weak vector object.
10582
10583 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10584 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10585 now stored in the double cell.
10586
10587 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10588 Use SCM_WVECT_TYPE.
10589
10590 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10591 using an entry of the double cell.
10592
4dadf664
TTN
105932001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
10594
10595 * stamp-h.in: bye bye
10596
02202352
MV
105972001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
10598
10599 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
10600 scm_eval_0str.
10601
10602 * load.c, load.h (scm_c_primitive_load,
10603 scm_c_primitive_load_path): New.
10604
10605 * strports.c, strports.h (scm_c_read_string): Renamed from
10606 scm_read_0str. Also, added "const" qualifier to argument.
10607 (scm_c_eval_string): Renamed from scm_eval_0str.
10608 (scm_read_0str, scm_eval_0str): Deprecated.
10609
df1ad0d1
MG
106102001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10611
10612 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
10613 SCM_LIST1.
10614
1afff620
KN
106152001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
10616
10617 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
10618 scm_list_n): New functions.
10619 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
10620 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
10621 (lots of files): Use the new functions.
4dadf664 10622
1afff620
KN
10623 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
10624
10625 * strings.c: #include "libguile/deprecation.h".
10626
b858464a
MG
106272001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10628
10629 * read.c (scm_lreadr): When reading a hash token, check for a
10630 user-defined hash procedure first, so that overriding the builtin
10631 hash characters is possible (this was needed for implementing
10632 SRFI-4's read synax `f32(...)').
4dadf664 10633
b858464a
MG
10634 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
10635 because the latter is unsigned now and breaks comparisons like
10636 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 10637
d95c0b76
NJ
106382001-06-26 Neil Jerram <neil@ossau.uklinux.net>
10639
10640 * eval.h, eval.c (scm_call_4): New function.
10641
10642 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
10643 directly rather than dispatching to them via scm_ithrow and a lazy
10644 catch.
4dadf664 10645
d95c0b76
NJ
10646 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
10647 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
10648 for trap handler procedures.
10649
10650 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
10651 procedures not being #f.
10652
30e3be5a
ML
106532001-06-27 Michael Livshin <mlivshin@bigfoot.com>
10654
10655 * Makefile.am (c-tokenize.c): add rule to generate it.
10656 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
10657
10658 filter-doc-snarfage.c: remove.
10659
82893676
MG
106602001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10661
10662 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
10663
10664 The following set of changes makes compiling Guile under various
10665 Windows compilers easier. Compilation under GNU systems should
10666 not be affected at all.
10667
10668 Thanks to Stefan Jahn for all necessary information, patches and
10669 testing.
4dadf664 10670
82893676
MG
10671 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
10672 getpgrp, ttyname, primitive-fork and some header inclusion for
10673 Windows.
10674
10675 * random.c: Define M_PI, if not predefined and use __int64 for
10676 LONG64 under Windows.
10677
10678 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
10679 Windows and conditionalize some signal names.
10680
4dadf664 10681 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
10682 Include socket library header under Windows.
10683
10684 * stime.c (CLKTCK): Add cast to int, to make it compile under
10685 Windows.
10686
10687 * ports.c (truncate): New function, compiled only under Windows.
10688
10689 * net_db.c: Do not declare errno under Windows.
10690
10691 * iselect.h, inet_aton.c: Include socket library headers under
10692 Windows.
10693
10694 * guile.c (inner_main): Under Windows, initialize socket library
10695 and initialize gdb_interface data structures.
10696
10697 * gdb_interface.h: Under Windows, gdb_interface cannot be
10698 initialized statically. Initialize at runtime instead.
10699
10700 * fports.c (write_all): ssize_t -> size_t.
10701 (fport_print): Conditionalize call to ttyname().
10702 (getflags): New function, compiled only under Windows.
10703
10704 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
10705 primitives chown, link, fcntl.
10706 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
10707 as path seperator.
10708
10709 * backtrace.c: Include <io.h> under Windows.
10710
10711 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
10712
10713 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
10714 declaration.
10715
fdc28395
KN
107162001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
10717
10718 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10719 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
10720 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10721 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
10722 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
10723 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
10724 (scm_dynamic_wind, scm_dowinds), environments.c
10725 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
10726 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
10727 goops.c (GETVAR, purgatory, make_class_from_template,
10728 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
10729 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
10730 (scm_primitive_load), modules.c (scm_resolve_module,
10731 scm_c_define_module, scm_c_use_module, scm_c_export,
10732 module_variable, scm_eval_closure_lookup, scm_sym2var,
10733 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
10734 ports.c (scm_port_for_each), print.c (scm_printer_apply),
10735 properties.c (scm_primitive_property_ref), ramap.c (ramap,
10736 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
10737 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
10738 (scm_object_to_string, scm_call_with_output_string,
10739 scm_call_with_input_string), throw.c (scm_body_thunk,
10740 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
10741 scm_make_shared_array), vports.c (sf_flush, sf_write,
10742 sf_fill_input, sf_close): Use one of the above functions.
10743 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
10744
36284627
DH
107452001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10746
10747 * filesys.c (scm_close), ports.c (scm_close_port,
10748 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
10749 instead of SCM_NEGATE_BOOL.
10750
10751 * filesys.c (scm_stat): Clean up type dispatch.
10752
10753 * filesys.c (scm_stat), ports.c (scm_input_port_p,
10754 scm_output_port_p): Get rid of redundant IM type check.
10755
10756 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
10757 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
10758 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10759 scm_return_entry), numbers.c (scm_number_to_string), objects.c
10760 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
10761 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
10762 scm_addr_vector), stime.c (scm_strftime), strings.c
10763 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
10764 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
10765 scm_string_split), strports.c (scm_strport_to_string), symbols.c
10766 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
10767 instead of scm_makfromstr.
10768
10769 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
10770 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
10771 scm_read_hash_extend), stime.c (scm_strftime), strings.c
10772 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
10773 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
10774 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
10775 !SCM_<pred> over SCM_N<pred>.
10776
10777 * strings.[ch] (scm_makfromstr): Deprecated.
10778
10779 (scm_mem2string): New function, replaces scm_makfromstr.
10780
10781 * strings.c (scm_substring), strop.c (string_copy,
10782 scm_string_split), strports.c (scm_strport_to_string), symbols.c
10783 (scm_symbol_to_string): Fix gc problem.
10784
10785 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
10786 SCM_<foo>_H.
10787
10788 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
10789 warning about comparing signed and unsigned values. This fix is
10790 not optimal, since it won't work reliably if sizeof (c_start) >
10791 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
10792 solution is to define this macro as an inline function, thus
10793 allowing to specifiy the types of c_start and c_end.
10794
13dcb666
DH
107952001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
10796
10797 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
10798 scm_t_debug_frame*.
10799
10800 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
10801 Rename <foo>H to SCM_<foo>_H.
10802
10803 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
10804 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
10805
10806 (narrow_stack): Make i unsigned. Don't use side-effecting
10807 operations in conditions.
10808
10809 (narrow_stack, scm_make_stack, scm_stack_id,
10810 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
10811
10812 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
10813 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
10814 more.
10815
10816 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
10817 signedness.
10818
ea2c3968 10819 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
10820
10821 * stacks.h (SCM_FRAMEP): Fix type check.
10822
ac13d9d2
ML
108232001-06-25 Michael Livshin <mlivshin@bigfoot.com>
10824
ee0c0e03
ML
10825 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
10826 c-tokenize.c when doing maintainer-clean.
10827
ac13d9d2
ML
10828 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
10829
10830 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
10831 simplify.
10832
10833 * eval.c: all hash signs are in column 0.
10834
10835 * Makefile.am (guile_filter_doc_snarfage): build using
10836 c-tokenize.c, not filter-doc-snarfage.c.
10837 rearrange snarfing dependencies a bit.
10838
10839 * c-tokenize.lex: new file.
10840
16be44e5
MV
108412001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
10842
10843 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
10844 scm_t_srcpropso_plist. See the big type renaming.
10845 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
10846 Thanks to Seth Alves!
4dadf664 10847
16be44e5
MV
10848 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
10849 they aren't defined already.
10850
5843e5c9
DH
108512001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
10852
10853 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
10854 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
10855 problem.
10856
10857 * backtrace.c (display_expression, scm_set_print_params_x,
10858 display_application, display_frame, scm_backtrace), numbers.c
10859 (scm_istring2number), objects.c (scm_class_of,
10860 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
10861 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
10862
10863 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
10864 always positive.
10865
10866 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
10867 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
10868
10869 * objects.c (scm_class_of): Type fix.
10870
10871 (scm_mcache_lookup_cmethod): Improved comment, simplified,
10872 eliminated goto.
10873
10874 * pairs.h (scm_error_pair_access): The function can return if
10875 called recursively.
10876
6b41a313
MG
108772001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10878
10879 * init.c (scm_init_guile_1): Removed initialization of tag.c.
10880
10881 * gdbint.c, init.c: Removed inclusion of tag.h.
10882
10883 * tag.h, tag.c: Removed files.
10884
10885 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
10886
fbbdb121
GH
108872001-06-20 Gary Houston <ghouston@arglist.com>
10888
10889 * deprecation.c, extensions.c, rw.c: include string.h.
10890
72c17ed0
GH
108912001-06-19 Gary Houston <ghouston@arglist.com>
10892
10893 * filter-doc-snarfage.c (process): added ungetc in
10894 MULTILINE_COOKIE case since otherwise it fails when there's no
10895 space between the '(' and the quote of the following string
10896 (gcc 3.0).
10897
4ff9f825
MV
108982001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
10899
4927dd28
MV
10900 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
10901
b629af45
MV
109022001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
10903
10904 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
10905 extension takes place.
10906 * strings.h (SCM_STRING_LENGTH): Likewise.
10907 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 10908
4ff9f825
MV
10909 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
10910 it.
10911
10912 * tags.h: Include <stdint.h> when we have it.
10913 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
10914 available. Else use "unsigned long".
10915 (scm_signed_bits_t): New.
10916
10917 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
10918 (SCM_INUM): Cast result to scm_signed_bits_t.
10919
58bee6a8
TTN
109202001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
10921
10922 * mkstemp.c: Update path to #include file scmconfig.h.
10923 Thanks to Golubev I. N.
10924
00d8d838
DH
109252001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10926
10927 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
10928
ea2c3968 10929 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
10930 the macro definition.
10931
10932 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
10933 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
10934 instead of SCM_INST_TYPE.
10935
10936 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
10937 the object is a struct before accessing its struct flags.
10938
10939 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
10940
495c67e5
GH
109412001-06-10 Gary Houston <ghouston@arglist.com>
10942
10943 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
10944 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
10945 work reliably anymore. try it from boot-9.scm instead.
10946
6a9003d3
MV
109472001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
10948
10949 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 10950 Thanks to Matthias Köppe!
58bee6a8 10951
47bcd646
ML
109522001-06-08 Michael Livshin <mlivshin@bigfoot.com>
10953
a88ff5b6
ML
10954 * snarf.h, filter-doc-snarfage.c: more changes to cope with
10955 space-happy C preprocessors.
10956
47bcd646 10957 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 10958 inside cookies. thanks to Matthias Köppe!
47bcd646 10959
bab246f3
DH
109602001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10961
10962 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
10963 keywords. Fix gc protection.
10964
10965 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
10966 operations in macro calls.
10967
10968 * pairs.c (scm_error_pair_access): Avoid recursion.
10969
10970 Thanks to Matthias Koeppe for reporting the bugs that correspond
10971 to the following set of patches.
10972
10973 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
10974 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
10975 bitvector base address using SCM_BITVECTOR_BASE.
10976
10977 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
10978 unsigned long*.
10979
dcb410ec
DH
109802001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10981
10982 * goops.c (SCM_CLASS_REDEF): Removed.
10983
10984 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
10985 SCM_<foo>_H.
10986
10987 Thanks to Matthias Koeppe for reporting the bugs that correspond
10988 to the following set of patches.
10989
10990 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
10991 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
10992 scm_sys_allocate_instance, clear_method_cache,
10993 scm_sys_invalidate_method_cache_x, scm_make,
10994 create_standard_classes, scm_make_port_classes, scm_make_class,
10995 scm_add_slot): Use SCM_SET_SLOT to set slot values.
10996
10997 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
10998
10999 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11000
11001 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11002 UNARY_ELTS_CODE): Remove bogus break statement.
11003
11004 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11005 Don't access bit vectors elements as SCM objects.
11006
11007 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11008 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11009 Don't assign to an unpacked value.
11010
e81d98ec
DH
110112001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11012
11013 * __scm.h (SCM_NORETURN): Moved here from error.h.
11014
11015 (SCM_UNUSED): New macro.
11016
11017 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11018
11019 * backtrace.c (display_error_handler), continuations.c
11020 (continuation_print), debug.c (debugobj_print), dynwind.c
11021 (guards_print), environments.c (observer_print,
11022 core_environments_finalize, leaf_environment_cell,
11023 leaf_environment_print, eval_environment_print,
11024 eval_environment_observer, import_environment_define,
11025 import_environment_undefine, import_environment_print,
11026 import_environment_observer, export_environment_define,
11027 export_environment_undefine, export_environment_print,
11028 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11029 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11030 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11031 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11032 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11033 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11034 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11035 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11036 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11037 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11038 set_slot_value, test_slot_existence, scm_change_object_class,
11039 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11040 default_setter), guardians.c (guardian_print, guardian_gc_init,
11041 guardian_zombify, whine_about_self_centered_zombies), guile.c
11042 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11043 mallocs.c (malloc_print), numbers.c (scm_print_real,
11044 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11045 end_input_default, scm_port_print, fill_input_void_port,
11046 write_void_port), root.c (root_print), smob.c (scm_mark0,
11047 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11048 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11049 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11050 (scm_struct_free_0, scm_struct_free_standard,
11051 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11052 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11053 scm_handle_by_throw, scm_ithrow), weaks.c
11054 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11055 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11056 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11057
11058 * error.h (SCM_NORETURN): Moved to __scm.h.
11059
11060 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11061 Renamed <foo>H to SCM_<foo>_H.
11062
11063 * gc.c (debug_cells_gc_interval): New static variable.
11064
11065 (scm_assert_cell_valid): If selected by the user, perform
11066 additional garbage collections.
11067
11068 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11069 if additional garbage collections are desired.
11070
11071 (mark_gc_async): If additional garbage collections are selected
11072 by the user, don't call the after-gc-hook. Instead require the
11073 user to run the hook manually.
11074
11075 * pairs.c (scm_error_pair_access): New function. Only compiled
11076 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11077
11078 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11079
11080 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11081 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11082 is a real pair object. (Glocs are also accepted, but that may
11083 change.) If not, abort with an error message.
11084
17fa3fcf
DH
110852001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11086
11087 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11088
11089 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11090 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11091
feeedafb
MV
110922001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11093
11094 * extensions.c (scm_c_register_extension): Allow NULL as library
11095 name.
11096 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11097
feeedafb
MV
11098 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11099 non-pointers are being compared. Thanks to Alexander Klimov!
11100
4bcdfe46
GH
111012001-06-04 Gary Houston <ghouston@arglist.com>
11102
11103 * rw.c (scm_write_string_partial): new procedure implementing
11104 write-string/partial in (ice-9 rw).
11105 * rw.h: declare scm_write_string_partial.
58bee6a8 11106
f480396b
MV
111072001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11108
feeedafb
MV
11109 * keywords.c (keyword_print): Substract 1 from length of symbol
11110 name, accounting for the silly dash.
11111
11112 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11113 Do not emit deprecation warning.
11114
f480396b
MV
11115 Added exception notice to all files.
11116
11117 * dynl.c: Include "deprecation.h".
11118
c794483c
MV
111192001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11120
11121 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11122 scm_clear_registered_modules): Deprecated.
11123
9454d8d5
RB
111242001-06-02 Rob Browning <rlb@cs.utexas.edu>
11125
11126 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11127 guile-snarf-docs-texi.
11128
11129 * fports.c: HAVE_ST_BLKSIZE changed to
11130 HAVE_STRUCT_STAT_ST_BLKSIZE.
11131 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11132 HAVE_STRUCT_STAT_ST_BLKSIZE.
11133
11134 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11135 HAVE_STRUCT_STAT_ST_RDEV.
11136 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11137 HAVE_STRUCT_STAT_ST_BLKSIZE.
11138 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11139 HAVE_STRUCT_STAT_ST_BLOCKS.
11140
114f9bab
MV
111412001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11142
b0c16cd9
MV
11143 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11144 of scm_eval_x to allow module changes between the forms in the
11145 string. Set/restore module using scm_c_call_with_current_module.
11146
114f9bab
MV
11147 * mkstemp.c: New file, slightly modified from libiberties
11148 mkstemps.c.
11149
c99f9605
ML
111502001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11151
11152 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11153 filter-doc-snarfage.c: new files.
11154
11155 * Makefile.am: add stuff to [build,] use and distribute
11156 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11157
11158 * guile-snarf.in: grok the new snarf output.
11159
11160 * snarf.h: make the output both texttools- and `read'-friendly.
11161
47bcd646
ML
11162 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11163 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11164
7eb5d7b2
MV
111652001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11166
11167 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11168 error for unsupported format controls and for superflous
ec2667f0 11169 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11170
11171 * print.h, print.c (scm_print_symbol_name): Factored out of
11172 scm_iprin1.
11173 (scm_iprin1): Call it.
58bee6a8 11174
7eb5d7b2
MV
11175 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11176 weird names are printed correctly.
11177
11178 * print.c (scm_print_symbol_name): Symbols whose name starts with
11179 `#' or `:' or ends with `:' are considered weird.
11180
609c3d30
MG
111812001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11182
11183 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11184 and /.
11185
111862001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11187
11188 * debug.h: Removed prototype for scm_eval_string.
11189
8d09eb04
MG
111902001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11191
11192 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11193 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11194
11195 Change strncpy to memcpy to allow embedded NUL characters in
11196 symbol prefix.
11197
dd85ce47
ML
111982001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11199
fde50407
ML
11200 * hooks.c (scm_create_hook): deprecated.
11201 (make_hook): deleted.
11202 (scm_make_hook): all the hook creation code is now here.
11203
11204 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11205 a hook, make it permanent, and do a `scm_c_define' on it.
11206
dd85ce47
ML
11207 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11208
11209 * socket.c (s_scm_inet_pton): fix docstring quoting.
11210 (s_scm_inet_ntop): ditto.
11211
11212 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11213
11214 * hashtab.c (scm_internal_hash_fold): fix argument position in
11215 SCM_ASSERT.
11216
11217 * environments.c (s_scm_import_environment_set_imports_x): fix
11218 argument position in SCM_ASSERT.
11219
11220 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11221 (s_scm_make_iloc): ditto.
11222
729dbac3
DH
112232001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11224
11225 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11226
11227 * eval.c (promise_print): Read the promise's value as an object.
11228
11229 (SCM_CEVAL): Don't perform side-effecting operations in macro
11230 parameters.
11231
11232 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11233 conditional expression.
11234
11235 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11236 initializer.
11237
11238 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11239 text, removed redundant computation of effective_length and fixed
11240 the overflow check.
11241
11242 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11243 values.
11244
11245 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11246
11247 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11248
11249 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11250 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11251
11252 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11253
11254 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11255 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11256 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11257 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11258
11259 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11260
11261 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11262
ea2c3968 11263 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11264
11265 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11266 problem.
11267
11268 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11269 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11270 Read SCM objects rather than scm_bits_t values.
11271
11272 * tags.h (SCM_VOIDP_TEST): Removed.
11273
11274 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11275 value of 2 now corresponds to the former 1, the current 1
11276 corresponds to the former situation that SCM_VOIDP_TEST was
11277 defined.
11278
58bee6a8
TTN
11279 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11280 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11281 typedef struct scm_unused_struct { } * SCM;
11282 Thanks to Han-Wen Nienhuys for the suggestion.
11283
11284 * unif.c (scm_array_set_x): Fix typing problem, and use
11285 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11286 dealing with uniform vectors.
11287
6b1b030e
ML
112882001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11289
11290 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11291 (scm_igc): mark from them, too (precisely, not conservatively!).
11292
11293 * root.h (scm_gc_registered_roots): new object in
11294 scm_sys_protects.
11295
11296 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11297 `scm_protect_object'. shouldn't call it at all, though, it seems.
11298
11299 * gc.c (scm_[un]protect_object): deprecated.
11300 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11301 (scm_gc_[un]register_root[s]): new.
11302
11303 * gc.h: add prototypes for scm_gc_[un]protect_object,
11304 scm_gc_[un]register_root[s].
11305
c014a02e
ML
113062001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11307
11308 revert the controversial part of the 2001-05-24 changes.
11309
0120801d
MV
113102001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11311
f4e0611e
MV
11312 * modules.c (scm_env_module): Exported to Scheme.
11313
0120801d 11314 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11315
0120801d 11316 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11317
0120801d
MV
11318 * backtrace.c: Include "libguile/filesys.h".
11319 (sym_base, display_backtrace_get_file_line,
11320 display_backtrace_file, display_backtrace_file_and_line): New.
11321 (display_frame): Call display_backtrace_file_and_line if that is
11322 requested.
11323 (display_backtrace_body): Call scm_display_backtrace_file if
11324 requested.
11325
11326 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11327 Prototypes removed since there's no definition for these
11328 functions.
11329
880a7d13
MG
113302001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11331
11332 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11333 Changed use of scm_array->scm_array_t and
11334 scm_array_dim->scm_array_dim_t to enable build with
11335 --disable-deprecated.
11336
1be6b49c
ML
113372001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11338
11339 The purpose of this set of changes is to regularize Guile's usage
11340 of ANSI C integral types, with the following ideas in mind:
11341
d69c867a
ML
11342 - SCM does not nesessarily have to be long.
11343 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11344 - long is not nesessarily the same size as int.
11345
11346 The changes are incomplete and possibly buggy. Please test on
11347 something exotic.
11348
11349 * validate.h
11350 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11351 new macros.
11352
11353 * unif.h: type renaming:
11354 scm_array -> scm_array_t
11355 scm_array_dim -> scm_array_dim_t
11356 the old names are deprecated, all in-Guile uses changed.
11357
11358 * tags.h (scm_ubits_t): new typedef, representing unsigned
11359 scm_bits_t.
11360
11361 * stacks.h: type renaming:
11362 scm_info_frame -> scm_info_frame_t
11363 scm_stack -> scm_stack_t
11364 the old names are deprecated, all in-Guile uses changed.
11365
11366 * srcprop.h: type renaming:
11367 scm_srcprops -> scm_srcprops_t
11368 scm_srcprops_chunk -> scm_srcprops_chunk_t
11369 the old names are deprecated, all in-Guile uses changed.
11370
11371 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11372 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11373 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11374 vectors.c, vports.c, weaks.c:
11375 various int/size_t -> size_t/scm_bits_t changes.
11376
11377 * random.h: type renaming:
11378 scm_rstate -> scm_rstate_t
11379 scm_rng -> scm_rng_t
11380 scm_i_rstate -> scm_i_rstate_t
11381 the old names are deprecated, all in-Guile uses changed.
11382
11383 * procs.h: type renaming:
11384 scm_subr_entry -> scm_subr_entry_t
11385 the old name is deprecated, all in-Guile uses changed.
11386
11387 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11388 type renaming:
11389 scm_option -> scm_option_t
11390 the old name is deprecated, all in-Guile uses changed.
11391
11392 * objects.c: various long -> scm_bits_t changes.
11393 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11394
11395 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11396 SCM_I_FIXNUM_BIT.
11397
11398 * num2integral.i.c: new file, multiply included by numbers.c, used
11399 to "templatize" the various integral <-> num conversion routines.
11400
11401 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11402 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11403 deprecated.
11404 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11405 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11406 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11407 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11408 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11409 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11410 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11411 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11412 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11413 scm_num2size): new functions.
11414
d69c867a 11415 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
11416
11417 * load.c: change int -> size_t in various places (where the
11418 variable is used to store a string length).
11419 (search-path): call scm_done_free, not scm_done_malloc.
11420
11421 * list.c (scm_ilength): return a scm_bits_t, not long.
11422 some other {int,long} -> scm_bits_t changes.
11423
11424 * hashtab.c: various [u]int -> scm_bits_t changes.
11425 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11426 (scm_ihashx): n: uint -> scm_bits_t
11427 use scm_bits2num instead of scm_ulong2num.
11428
11429 * gsubr.c: various int -> scm_bits_t changes.
11430
11431 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11432
d69c867a 11433 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
11434
11435 * gh.h (gh_str2scm): len: int -> size_t
11436 (gh_{get,set}_substr): start: int -> scm_bits_t,
11437 len: int -> size_t
11438 (gh_<num>2scm): n: int -> scm_bits_t
11439 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11440 (gh_length): return scm_bits_t, not unsigned long.
11441
11442 * gc.[hc]: various small changes relating to many things stopping
11443 being long and starting being scm_[u]bits_t instead.
11444 scm_mallocated should no longer wrap around.
11445
11446 * fports.h: type renaming:
11447 scm_fport -> scm_fport_t
11448 the old name is deprecated, all in-Guile uses changed.
11449
11450 * fports.c (fport_fill_input): count: int -> scm_bits_t
11451 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11452
11453 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11454 those prototypes, as the functions they prototype don't exist.
11455
11456 * fports.c (default_buffer_size): int -> size_t
11457 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11458 default_size: int -> size_t
11459 (scm_setvbuf): csize: int -> scm_bits_t
11460
11461 * fluids.c (n_fluids): int -> scm_bits_t
11462 (grow_fluids): old_length, i: int -> scm_bits_t
11463 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11464 scm_bits_t
11465 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11466
11467 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11468 the new and shiny SCM_NUM2INT.
11469
11470 * extensions.c: extension -> extension_t (and made a typedef).
11471
11472 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11473 there are no nasty surprises if/when the various deeply magic tag
11474 bits move somewhere else.
11475
11476 * eval.c: changed the locals used to store results of SCM_IFRAME,
11477 scm_ilength and such to be of type scm_bits_t (and not int/long).
11478 (iqq): depth, edepth: int -> scm_bits_t
11479 (scm_eval_stack): int -> scm_bits_t
11480 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11481 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11482 i: int -> scm_bits_t
11483
11484 * environments.c: changed the many calls to scm_ulong2num to
11485 scm_ubits2num.
11486 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11487
11488 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11489
11490 * debug.h: type renaming:
11491 scm_debug_info -> scm_debug_info_t
11492 scm_debug_frame -> scm_debug_frame_t
11493 the old names are deprecated, all in-Guile uses changed.
11494 (scm_debug_eframe_size): int -> scm_bits_t
11495
11496 * debug.c (scm_init_debug): use scm_c_define instead of the
11497 deprecated scm_define.
11498
11499 * continuations.h: type renaming:
11500 scm_contregs -> scm_contregs_t
11501 the old name is deprecated, all in-Guile uses changed.
11502 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11503 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11504
11505 * continuations.c (scm_make_continuation): change the type of
d69c867a 11506 stack_size from long to scm_bits_t.
1be6b49c
ML
11507
11508 * ports.h: type renaming:
11509 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11510 scm_port -> scm_port_t
11511 scm_ptob_descriptor -> scm_ptob_descriptor_t
11512 the old names are deprecated, all in-Guile uses changed.
11513 (scm_port_t.entry): int -> scm_bits_t.
11514 (scm_port_t.line_number): int -> long.
11515 (scm_port_t.putback_buf_size): int -> size_t.
11516
11517 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 11518 global namespace and have little value beside that).
1be6b49c
ML
11519 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11520 SCM handle).
11521 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 11522 exist (for size_t & ptrdiff_t).
1be6b49c
ML
11523 (scm_sizet): deprecated.
11524
11525 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11526
a6219f22
MV
115272001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11528
11529 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11530 SCM_VARIABLE_INIT since that it what it used to be.
11531
11532 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 11533 ANSIsh. Thanks to Matthias Köppe!
a6219f22 11534
311b6a3c
MV
115352001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11536
9dfc4faa
MV
11537 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11538 needed for weak-key hashtables.
11539
11540 * procs.c (scm_make_subr_with_generic): Add missing last argument
11541 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11542
11543 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11544 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
11545
11546 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11547
2fc933fe
MV
115482001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11549
57ae112d
MV
11550 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11551 `duplicate_string'. Do not use an indirect cell, store symbol
11552 directly in collision list of hash table.
11553 (duplicate_string): Removed.
58bee6a8 11554
57ae112d
MV
11555 * init.c (scm_init_guile_1): Call scm_init_extensions.
11556
11557 * Makefile.am: Add "extensions.c" and related files in all the
11558 right places.
11559
11560 * extensions.h, extension.c: New files.
11561
11562 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11563
2fc933fe
MV
11564 * modules.h (scm_system_module_env_p): Move out of deprecated
11565 section.
11566
11567 * rw.h (scm_init_rw): Added prototype.
11568
11569 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11570 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11571 New functions. They replace scm_make_gsubr and
11572 scm_make_gsubr_with_generic. The `make' variants only create the
11573 gsubr object, while the `define' variants also put it into the
11574 current module. Changed all callers.
11575 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11576
11577 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11578 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11579 functions. They replace scm_make_subr, scm_make_subr_opt and
11580 scm_make_subr_with_generic. The `make' variants only create the
11581 subr object, while the `define' variants also put it into the
11582 current module. Changed all callers.
11583 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11584 Deprecated.
11585
11586 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11587 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11588 the comments above.
58bee6a8 11589
18928596
NJ
115902001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11591
11592 * throw.c (scm_lazy_catch): Slight docstring clarification.
11593
21a13beb
MV
115942001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
11595
e2b6ddc6
MV
11596 * throw.c: Lazy-catch handlers are no longer allowed to return.
11597 Fixed comments throughout.
11598 (scm_ithrow): Signal an error when a lazy-catch handler returns.
11599 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
11600 recognized as such.
11601
21a13beb
MV
11602 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
11603 refered to s_scm_minor_version previously.
11604
11605 * modules.h, modules.c: Moved around a lot of code so that
11606 deprecated features appear at the bottom.
11607 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
11608 module_prefix, make_modules_in_var, beautify_user_module_x_var,
11609 scm_the_root_module, scm_make_module, scm_ensure_user_module,
11610 scm_load_scheme_module): Deprecated.
11611 (scm_system_module_env_p): Return SCM_BOOL_T directly for
11612 environments corresponding to the root module.
11613 (convert_module_name, scm_c_resolve_module,
11614 scm_c_call_with_current_module, scm_c_define_module,
11615 scm_c_use_module, scm_c_export): New.
11616 (the_root_module): New static variant of scm_the_root_module. Use
11617 it everywhere instead of scm_the_root_module.
58bee6a8 11618
21a13beb
MV
11619 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
11620 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
11621 (scm_c_with_fluid): New.
11622 (scm_with_fluids): Use scm_c_with_fluids instead of
11623 scm_internal_with_fluids.
58bee6a8 11624
21a13beb
MV
11625 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
11626 `scm_init_goops'. Do not explicitly create/switch modules.
11627 Return SCM_UNSPECIFIED.
11628 (scm_init_goops): Only register `%init-goops-builtins' procedure.
11629 (scm_load_goops): Use scm_c_resolve_module instead of
11630 scm_resolve_module.
58bee6a8 11631
21a13beb
MV
11632 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
11633 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
11634 `scm_init_rw' prior to loading the startup files.
11635
11636 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
11637 scm_init_rdelim. Do not explicitly create/switch modules.
11638 Return SCM_UNSPECIFIED.
11639 (scm_init_rdelim): Only register `%init-rdelim-builtins'
11640 procedure.
58bee6a8 11641
21a13beb
MV
11642 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
11643 explicitly create/switch modules. Return SCM_UNSPECIFIED.
11644 (scm_init_rw): Only register `%init-rw-builtins' procedure.
11645
11646 * script.c (scm_shell): Evaluate the compiled switches in the
11647 current module, not in the root module.
11648
116492001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
11650
11651 * fluids.c (scm_c_with_fluids): Rename from
11652 scm_internal_with_fluids.
11653 (scm_internal_with_fluids): Deprecated.
11654 (scm_c_with_fluid): New.
11655
09cb9e73
DH
116562001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11657
11658 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
11659
11660 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
11661 accessed with SCM_C[AD]R.
11662
11663 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
11664
c81ea65d
RB
116652001-05-16 Rob Browning <rlb@cs.utexas.edu>
11666
11667 * version.c (s_scm_major_version): doc fixes.
11668 (s_scm_minor_version): doc fixes.
11669 (s_scm_minor_version): new function.
11670
11671 * version.h (scm_init_version): new function.
11672
11673 * versiondat.h.in: add GUILE_MICRO_VERSION.
11674
887dfa7d
DH
116752001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11676
11677 * deprecation.c (scm_init_deprecation): Renamed
11678 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
11679
78930a69
MV
116802001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
11681
11682 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
11683 dependent on cpp_cnvt.awk
11684
39cde5c5
MG
116852001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11686
11687 * script.c (scm_compile_shell_switches): New command line option
11688 `--use-srfi' for loading a list of SRFIs on startup.
11689 (scm_shell_usage): Added `--use-srfi' to help message.
11690
f3f9dcbc
MV
116912001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11692
78930a69 11693 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 11694
f3f9dcbc
MV
11695 The concept of vcells has been removed from Guile. With it,
11696 explicit obarrays and associated operations are gone. Use
11697 hashtables instead of obarrays.
887dfa7d 11698
f3f9dcbc
MV
11699 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
11700 result as variable instead of vcell. Glocs no longer point to a
11701 vcell but to a variable. Use scm_c_define instead of
11702 scm_sysintern and treat the result as a variable (which it is),
11703 not a vcell.
887dfa7d 11704
f3f9dcbc
MV
11705 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
11706 SCM_DEFVARIABLEP): Deprecated.
11707 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
11708 (variable_print): Do not print name of variable.
11709 (variable_equalp): Compare values, not vcells.
11710 (anonymous_variable_sym): Removed.
11711 (make_vcell_variable): Removed.
11712 (make_variable): New, as replacement.
11713 (scm_make_variable, scm_make_undefined_variable): Do not take name
11714 hint parameter.
11715 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
11716 error in that case.
11717 (scm_builtin_variable): Deprecated.
11718
11719 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
11720 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
11721 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
11722 scm_sysintern, scm_sysintern0, scm_symbol_value0,
11723 scm_string_to_obarray_symbol, scm_intern_symbol,
11724 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
11725 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
11726 Deprecated and moved to "symbols-deprecated.c".
11727 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
11728 (scm_init_symbols): Call scm_init_symbols_deprecated.
11729 * symbols-deprecated.c: New file.
11730 * Makefile.am: Added symbols-deprecated.c and related files in all
11731 the right places.
887dfa7d 11732
f3f9dcbc
MV
11733 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
11734 SCM_GLOBAL_VCELL_INIT): Deprecated.
11735 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
11736 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 11737
f3f9dcbc
MV
11738 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
11739 SCM_GLOC_SYM.
11740
11741 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
11742 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
11743 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
11744 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
11745 Changed according to the `throughout' comments.
11746
11747 * modules.h, modules.c (scm_module_system_booted_p): Changed type
11748 to `int'.
11749 (scm_module_type): Removed.
11750 (the_root_module): Renamed to the_root_module_var. Now points to
11751 a variable instead of a vcell. Updated all uses.
11752 (scm_the_root_module): Return SCM_BOOL_F when module systems
11753 hasn't been booted yet.
11754 (SCM_VALIDATE_STRUCT_TYPE): Removed.
11755 (scm_post_boot_init_modules): Made static.
11756 (scm_set_current_module): Call scm_post_boot_init_modules on first
11757 call.
11758 (make_modules_in, beautify_user_module_x, resolve_module,
11759 try_module_autoload, module_make_local_var_x): Tacked on "_var"
11760 suffix. Now point to variables instead of vcells. Updated all
11761 uses.
11762 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
11763 and return SCM_BOOL_F in that case.
11764 (scm_module_transformer): Likewise.
11765 (sym_module, scm_lookup_closure_module, scm_env_module): New.
11766 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
11767 (scm_eval_closure_lookup): Do not allow new definitions when
11768 `interface' flag is set.
11769 (scm_standard_interface_eval_closure): New.
11770 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
11771 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
11772 scm_c_lookup, scm_c_module_define, scm_c_define,
11773 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
11774 scm_modules_prehistory): New.
11775 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
11776 instead of scm_intern0.
887dfa7d 11777
f3f9dcbc
MV
11778 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
11779 symbol.
11780
11781 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
11782 hashtable operations to maintain the keywords, not obarray ones.
11783
11784 * init.c (scm_load_startup_files): Do not call
11785 scm_post_boot_init_modules. This is done by
11786 scm_set_current_module now.
11787 (scm_init_guile_1): Call scm_modules_prehistory. Call
11788 scm_init_variable early on.
11789
11790 * goops.c (s_scm_sys_goops_loaded): Get
11791 var_compute_applicable_methods from scm_sym2var, not from a direct
11792 invocation of scm_goops_lookup_closure.
11793
11794 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
11795
11796 * gc.c: Added simple debugging hack to mark phase of GC: When
11797 activated, do not tail-call scm_gc_mark. This gives nice
11798 backtraces.
11799 (scm_unhash_name): Removed.
11800
11801 * feature.c (features): Renamed to features_var. Now points to a
11802 variable instead of a vcell. Updated all uses.
11803
11804 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
11805 `scm_current_module_lookup_closure' which will do the right thing
11806 when the module system hasn't been booted yet.
11807 (SCM_GLOC_SYM): Removed.
11808 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
11809 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 11810
f3f9dcbc
MV
11811 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
11812 instead of with vcells. Do not overwrite `var' with the result of
11813 the lookup, use the new `real_var' instead. Remove `var2' in
11814 exchange (which was only used with threads).
11815 (sym_three_question_marks): New.
11816 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
11817 `SCM_GLOC_SYM'.
11818 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
11819 (scm_m_atfop): Expect the function definition to be a variable
11820 instead of a vcell.
11821 (scm_macroexp): Do not use `unmemocar', explicitely remember the
11822 symbol instead.
11823 (scm_unmemocopy): Removed thoughts about anti-macro interface.
11824 (scm_eval_args): Use more explicit code in the gloc branch of the
11825 atrocious struct ambiguity test. The optimizer will sort this
11826 out.
11827 (scm_deval_args): Likewise.
11828 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
11829 remember the symbol instead. Added some comments where
11830 scm_tc3_cons_gloc really exclusively refers to structs.
11831 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
11832 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
11833 of scm_sysintern in general.
11834
11835 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
11836 explicit magic.
11837
11838 * debug.c (s_scm_make_gloc): Only allow proper variables, no
11839 pairs. Put the variable directly in the gloc.
11840 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
11841 (scm_init_debug): Use scm_c_define instead scm_sysintern.
11842
11843 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
11844
11845 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
11846 scm_the_last_stack_fluid_var. It now points to a variable instead
11847 of a vcell. Updated all uses.
11848 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
11849 instead of a vcell. Updated all uses.
11850
11851 * _scm.h: Include "variables.h" and "modules.h" since almost
11852 everybody needs them now.
11853
11854 * root.h (scm_symhash, scm_symhash_vars): Removed.
11855 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 11856
7c33806a
DH
118572001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11858
11859 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 11860 scm_listofnull.
7c33806a
DH
11861
11862 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
11863 like the SCM_NEWCELL macro counterparts.
11864
11865 (scm_init_storage, scm_init_gc): Moved initialization of
11866 scm_tc16_allocated from scm_init_gc to scm_init_storage.
11867
11868 (scm_init_storage): Moved initialization of scm_undefineds and
11869 scm_listofnull to eval.c, initializion of scm_nullstr to
11870 strings.c, initializion of scm_nullvect to vectors.c.
11871
11872 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
11873 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
11874
11875 * init.c (scm_init_guile_1): Reordered some initializations and
11876 added dependcy information comments.
11877
11878 * load.c (scm_init_load): Use scm_nullstr.
11879
11880 * strings.c (scm_init_strings): Initialize scm_nullstr.
11881
11882 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
11883
11bbab47
MV
118842001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
11885
11886 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 11887 multiple lines. Thanks to Matthias Köppe!
11bbab47 11888
5cd06d5e
DH
118892001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
11890
11891 * deprecation.c: Fixed copyright date.
11892
11893 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
11894 DEPRECATION_H to SCM_DEPRECATION_H.
11895
32bac999
TTN
118962001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
11897
11898 * guile-doc-snarf.in: Update copyright.
11899 Fix relative path bug. Thanks to Sergey Poznyakoff.
11900
c9dcc5ae
MV
119012001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11902
11903 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
11904 accept open ports. Thanks to Quetzalcoatl Bradley!
11905
7c582ec9
MG
119062001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11907
11908 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
11909 has 779 primitives on startup.
11910
284ab601
MV
119112001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
11912
11913 * eval.c (scm_i_eval): Copy expression before passing it to
11914 SCM_XEVAL. The copy operation was removed unintendedly during my
11915 change on 2001-03-25.
11916
910d1e40
ML
119172001-05-09 Michael Livshin <mlivshin@bigfoot.com>
11918
9a5fa6e9 11919 from Matthias Köppe (thanks!):
910d1e40
ML
11920
11921 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
11922 portable.
11923
11924 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
11925 docstring.
11926
56e55ac7
DH
119272001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11928
11929 * gc.c (scm_init_gc): Added FIXME comment.
11930
11931 * hooks.c: Since hooks don't have a name any more, it is not
11932 necessary to include objprop.h.
11933
11934 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
11935
11936 (symbol_name, scm_make_hook_with_name): Removed.
11937
11938 (scm_create_hook): Don't set the hook's name property.
11939
11940 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
11941
11942 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
11943
11944 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
11945
11946 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
11947 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
11948 FLOBUFLEN and define it unconditionally.
11949
d204b24c
MV
119502001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
11951
438201b4
MV
11952 * gh_data.c (gh_lookup): Call gh_module_lookup with
11953 `scm_current_module ()', not `#f'.
11954 (gh_module_lookup): Expect a module instead of an obarray as first
11955 argument and do lookup in that module.
56e55ac7 11956
d204b24c
MV
11957 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
11958 arrays. The length of array is already determined differently and
11959 scm_uniform_vector_length does not work on arrays.
11960
26c1d549
MV
119612001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
11962
fe7c2f88
MV
11963 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
11964 as well. "SCM (*)(...)" does not work on RedHat 7.1.
11965
26c1d549
MV
11966 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
11967 they are not used. Changed `wrong type' error into `wrong num
11968 args' error. Changed all callers.
56e55ac7 11969
26c1d549
MV
11970 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
11971 arguments are supplied.
11972
1c938eb8
TTN
119732001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
11974
11975 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
11976 describe `regexp/notbol' and `regexp/noteol' execution flags.
11977
3a6379f7
TTN
11978 * strop.c (scm_substring_move_x): Doc fix; nfc.
11979
c10ecc4c
MV
119802001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
11981
11982 * objects.c, objects.h (scm_valid_object_procedure_p): New.
11983 (scm_set_object_procedure_x): Use it to check argument. Fix
11984 docstring.
11985
11986 * evalext.c (scm_definedp): Fix docstring.
11987
a57a0b1e
GH
119882001-05-05 Gary Houston <ghouston@arglist.com>
11989
11990 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
11991 support.
11992
7a095584
NJ
119932001-05-04 Neil Jerram <neil@ossau.uklinux.net>
11994
11995 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
11996 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
11997 Change R4RS references to R5RS.
11998
11999 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12000 docstring source are correctly reproduced in the output (ii)
12001 we don't anymore get occasional trailing quotes. Also reorganized
12002 and commented the code a little.
12003
12004 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12005 fixes.
12006
dd2a6f3a
MG
120072001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12008
12009 * strop.c (scm_string_split): New procedure.
12010
12011 * strop.h (scm_string_split): Added prototype.
12012
00120130
GH
120132001-05-04 Gary Houston <ghouston@arglist.com>
12014
12015 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12016 Dale P. Smith.
12017
b65e6bfe
MV
120182001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12019
12020 * rw.c: Include "modules.h" and "strports.h".
12021
12022 * net_db.h (scm_gethost): Added prototype.
12023
12024 * deprecation.h, deprecation.c: New.
12025 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12026 (DOT_X_FILES): Added "deprecation.x".
12027 (modinclude_HEADERS): Added "deprecation.h".
12028
12029 * init.c: Include "deprecation.h".
12030 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12031
b65e6bfe
MV
120322001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12033
12034 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12035 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12036 New.
12037
b0e5fd8c
GH
120382001-04-29 Gary Houston <ghouston@arglist.com>
12039
12040 * rw.c: new file, implementing C part of module (ice-9 rw).
12041 (scm_read_string_x_partial): moved from ioext.c
12042 (scm_init_rw): new proc.
12043 * rw.h: new file.
12044 init.c: include rw.h and call scm_init_rw.
12045 Makefile.am: include rw.c and rw.h.
12046
0b2da99c
RB
120472001-04-28 Rob Browning <rlb@cs.utexas.edu>
12048
12049 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12050 know what's supposed to happen to it.
12051
12052 * list.h (scm_list_star): deprecation expired - removed.
12053
12054 * numbers.h (scm_dblproc): deprecation expired - removed.
12055 (SCM_UNEGFIXABLE): deprecation expired - removed.
12056 (SCM_FLOBUFLEN): deprecation expired - removed.
12057 (SCM_INEXP): deprecation expired - removed.
12058 (SCM_CPLXP): deprecation expired - removed.
12059 (SCM_REAL): deprecation expired - removed.
12060 (SCM_IMAG): deprecation expired - removed.
12061 (SCM_REALPART): deprecation expired - removed.
12062 (scm_makdbl): deprecation expired - removed.
12063 (SCM_SINGP): deprecation expired - removed.
12064 (SCM_NUM2DBL): deprecation expired - removed.
12065 (SCM_NO_BIGDIG): deprecation expired - removed.
12066
12067 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12068 (scm_tc_dblr): deprecation expired - removed.
12069 (scm_tc_dblc): deprecation expired - removed.
12070 (scm_tc16_flo): deprecation expired - removed.
12071 (scm_tc_flo): deprecation expired - removed.
12072
12073 * tag.h (scm_tag): deprecation expired - removed.
12074
12075 * tag.c: (scm_tag): deprecation expired - removed.
12076
12077 * ioext.c: (scm_fseek): deprecation expired - removed.
12078
12079 * ioext.h (scm_fseek): deprecation expired - removed.
12080
12081 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12082
12083 * gh.h (gh_int2scmb): deprecation expired - removed.
12084
e3334972
NJ
120852001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12086
12087 * stacks.c (scm_make_stack): Fix typo in docstring.
12088
a0f979ac
RB
120892001-04-27 Rob Browning <rlb@cs.utexas.edu>
12090
12091 * error.c (scm_sysmissing): deprecation expired - removed.
12092
12093 * error.h (scm_sysmissing): deprecation expired - removed.
12094
12095 * gc.c
12096 (scm_init_gc): gc-thunk deprecation expired - removed.
12097 (scm_gc_vcell): deprecation expired - removed.
12098 (gc_async_thunk): scm_gc_vcell related code removed.
12099
12100 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12101
12102 * strings.h
12103 (SCM_NSTRINGP): deprecation expired - removed.
12104 (SCM_NRWSTRINGP): deprecation expired - removed.
12105
12106 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12107
12108 * chars.h
12109 (SCM_ICHRP): deprecation expired - removed.
12110 (SCM_ICHR): deprecation expired - removed.
12111 (SCM_MAKICHR): deprecation expired - removed.
12112
12113 * ports.h
12114 (SCM_INPORTP): deprecation expired - removed.
12115 (SCM_OUTPORTP): deprecation expired - removed.
12116
253081cf
MV
121172001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12118
12119 * modules.c (scm_module_type): New.
12120 (scm_post_boot_init_modules): Initialize from Scheme value.
12121 (the_module, scm_current_module, scm_init_modules): the_module is
12122 now a C only fluid.
12123 (scm_current_module): Export to Scheme.
12124 (scm_set_current_module): Do not call out to Scheme, do all the
12125 work in C. Export procedure to Scheme. Only accept modules, `#f'
12126 is no longer valid as the current module. Only set
12127 scm_top_level_lookup_closure_var and scm_system_transformer when
12128 they are not deprecated.
12129 (scm_module_transformer, scm_current_module_transformer): New.
12130
12131 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12132 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12133
253081cf
MV
12134 * gh_data.c: Removed FIXME comment about gh_lookup returning
12135 SCM_UNDEFINED. That's the right thing to do.
12136
12137 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12138 into the conditionally compiled sections.
12139 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12140 scm_current_module_transformer instead of scm_system_transformer.
12141 * init.c (start_stack): Move initialization of
12142 scm_system_transformer to the deprecated section.
1c938eb8 12143
1f7f9ed4
NJ
121442001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12145
12146 * throw.c (scm_throw): Correct docstring.
12147
66c73b76
GH
121482001-04-22 Gary Houston <ghouston@arglist.com>
12149
eefae538
GH
12150 * socket.c: attempted to improve the docstrings slightly.
12151
66c73b76
GH
12152 * net_db.c: remove bogus "close" declaration.
12153 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12154 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12155 moved to socket.c.
12156 * net_db.h: declarations moved too.
12157
12158 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12159 long.
12160 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12161 (VALIDATE_INET6): new macro.
12162 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12163 inet-pton and inet-ntop.
12164 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12165 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12166
7a7f7c53
DH
121672001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12168
12169 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12170 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12171
12172 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12173 when compiled in debug mode.
12174
12175 (scm_gc_sweep): Only call smob's free function if it is defined.
12176
12177 * print.c (scm_iprin1): No need to check for validity of smob
12178 type or existence of print function.
12179
12180 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12181 Resizing will not work well with preemptive threading.
12182
12183 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12184
12185 (scm_make_smob_type): Extracted initialization of smob
12186 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12187 of the critical section.
12188
12189 (scm_smob_prehistory): Initialize all smob descriptors. By
12190 default, don't assign a smob free function: Most smob types don't
12191 need one.
12192
12193 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12194
e1368a8d
GH
121952001-04-21 Gary Houston <ghouston@arglist.com>
12196
12197 * socket.c (FLIP_NET_HOST_128): new macro.
12198 (scm_fill_sockaddr): use new macro.
12199 (scm_addr_vector): completed IPv6 address support. added const
12200 to the address parameter.
12201
5a525b84
GH
122022001-04-20 Gary Houston <ghouston@arglist.com>
12203
12204 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12205 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12206 is defined.
12207 (scm_addr_vector): use a switch instead of multiple if statements.
12208 Add support for IPv6 (incomplete) .
e1368a8d 12209 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12210
1a551638
DH
122112001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12212
12213 * struct.c (scm_free_structs): Only pairs may be accessed with
12214 SCM_C[AD]R.
12215
c07b3fef
MD
122162001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12217
a9d861e3
MD
12218 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12219
c07b3fef
MD
12220 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12221 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12222 parentheses in order to get the correct associativity.
12223
af7546eb
DH
122242001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12225
12226 * unif.c (scm_array_to_list): Added missing handling of arrays of
12227 bytes. Thanks to Masao Uebayashi for the bug report.
12228
4daecfee
DH
122292001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12230
12231 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12232 consistently.
12233
726d810a
DH
122342001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12235
12236 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12237
12238 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12239 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12240 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12241 SCM_CLOSURE_FORMALS.
12242
12243 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12244 (scm_i_procedure_arity): Prefer stronger predicates like
12245 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12246
12247 * macros.c (macro_print): Extracted macro printing code from
12248 print.c and simplified it.
12249
12250 (scm_macro_type): Use SCM_MACRO_TYPE;
12251
12252 (scm_init_macros): Use macro_print for printing macros.
12253
12254 * print.c (scm_print_opts): Improved option documentation.
12255
12256 (scm_iprin1): Extracted printing of macros to macros.c.
12257 Simplified printing of ordinary closures.
12258
12259 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12260 Martin Grabmueller for the bug report.
12261
e038c042
DH
122622001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12263
12264 This patch eliminates some further applications of SCM_C[AD]R to
12265 non pair cells.
12266
12267 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12268 never been applied to real pairs.
12269
12270 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12271
12272 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12273
12274 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12275 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12276 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12277
12278 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12279 Added.
12280
12281 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12282 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12283
12284 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12285 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12286 SCM_SET{AND,OR}_CAR.
12287
3453619b
GH
122882001-04-17 Gary Houston <ghouston@arglist.com>
12289
12290 * some initial support for IPv6:
1c938eb8 12291
3453619b
GH
12292 * socket.c (scm_fill_sockaddr): improve the argument validation.
12293 don't allocate memory until all args are checked. instead of
12294 unconditional memset of soka, try setting sin_len to 0 if
12295 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12296 (scm_socket, scm_connect): extend docstrings for IPv6.
12297 (scm_init_socket): intern AF_INET6 and PF_INET6.
12298
216eedfc
DH
122992001-04-17 Niibe Yutaka <gniibe@m17n.org>
12300
12301 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12302 matches SCM_DEFER_INTS at the beginning of the function.
12303
12304 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12305
12306 * gc.c (scm_igc): Unconditionally call
12307 SCM_CRITICAL_SECTION_START/END.
12308
12309 * fluids.c (next_fluid_num): Unconditionally call
12310 SCM_CRITICAL_SECTION_START/END.
12311 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12312
12313 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12314 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12315 Removed.
12316
12317 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12318 Defined as nothing for the case of !defined(USE_THREADS).
12319 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12320 Removed.
12321 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12322 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12323 LINE.
12324 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12325 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12326 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12327 SCM_CRITICAL_SECTION_START/END.
12328 (SCM_REALLOW_INTS: Bug fix. Don't call
12329 SCM_THREAD_SWITCHING_CODE.
12330 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12331 SCM_THREAD_SWITCHING_CODE directly.
12332 (SCM_ENTER_A_SECTION): Unconditionally use
12333 SCM_CRITICAL_SECTION_START/END. (was:
12334 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12335
123362001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12337
12338 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12339 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12340 allowed to explicitly set this macro via the CFLAGS variable
12341 during make.
12342
12343 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12344 (SCM_THREAD_CRITICAL_SECTION_START,
12345 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12346 SCM_THREAD_CRITICAL_SECTION_START/END to
12347 SCM_CRITICAL_SECTION_START/END.
12348
f22ed5a0
KN
123492001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12350
12351 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12352 instead of bzero.
1c938eb8 12353
f22ed5a0 12354 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12355 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12356
12357 Thanks to NIIBE Yutaka.
12358
508ded1c
MD
123592001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12360
a087ba81
MD
12361 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12362 goops module should be registered in order to work for an
12363 application which uses libguile statically linked.)
508ded1c 12364
e4b265d8
DH
123652001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12366
12367 * numbers.[ch] (scm_num2long, scm_num2long_long,
12368 scm_num2ulong_long, scm_num2ulong): Argument position is an
12369 unsigned integer.
12370
12371 * environments.c (eval_environment_folder,
12372 import_environment_folder), gh_data.c (gh_scm2longs,
12373 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12374 for integers and pointers, respectively.
12375
12376 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12377 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12378 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12379 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12380
12381 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12382 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12383 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12384 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12385 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12386 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12387
89d04205
NJ
123882001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12389
12390 * strings.c (scm_read_only_string_p): Update docstring to reflect
12391 current (non-)usage of "read only" strings.
40f83c3e
NJ
12392 (scm_make_shared_substring): Clarify docstring by changing
12393 "semantics" to "arguments".
89d04205 12394
4d66be54
MG
123952001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12396
12397 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12398 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12399 improvements.
12400
1e6808ea
MG
124012001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12402
12403 The following changes make the documentation more consistent.
1c938eb8 12404
1e6808ea
MG
12405 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12406 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12407 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12408 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12409 ... @end lisp.
12410
12411 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12412 (scm_array_dimensions, scm_make_shared_array),
12413 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12414 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12415 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12416 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12417 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12418 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12419 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12420 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12421 @example ... @end example to @lisp ... @end lisp.
12422
12423 * weaks.c (scm_weak_vector): Corrected docstring.
12424
12425 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12426 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12427 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12428 (scm_hashx_set_x, scm_hashx_get_handle),
12429 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12430 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12431 vectors.c (scm_vector_fill_x), strings.c
12432 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12433 objprop.c (scm_set_object_properties_x):
12434 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12435 strports.c (scm_call_with_input_string), ports.c
12436 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12437 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12438 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12439 (scm_make_weak_vector,scm_weak_vector_p),
12440 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12441 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12442 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12443 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12444 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12445 Made parameter names match documentation by renaming parameters
12446 and/or fixing docstrings.
1c938eb8 12447
1e6808ea
MG
12448 * numbers.c (scm_ash): Corrected Texinfo markup.
12449
12450 * strop.c (scm_string_index, scm_string_rindex),
12451 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12452
12453 * vports.c (scm_make_soft_port), unif.c
12454 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12455 (scm_dimensions_to_uniform_array, scm_transpose_array),
12456 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12457 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12458 (scm_array_to_list, scm_list_to_uniform_array),
12459 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12460 (scm_open_input_string, scm_open_output_string),
12461 (scm_get_output_string), strop.c (scm_string_copy),
12462 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12463 (scm_get_internal_real_time, scm_times),
12464 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12465 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12466 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12467 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12468 simpos.c (scm_system), random.c (scm_random_uniform),
12469 (scm_random_normal, scm_random_exp), ramap.c
12470 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12471 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12472 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12473 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12474 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12475 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12476 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12477 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12478 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12479 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12480 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12481 (scm_integer_expt, scm_bit_extract, scm_logcount),
12482 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12483 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12484 (scm_interaction_environment), macros.c (scm_makacro),
12485 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12486 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12487 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12488 (scm_fluid_ref), filesys.c (scm_open_fdes),
12489 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12490 Docstring correction: `Returns' -> `Return'
12491
1c938eb8
TTN
12492 * gc.c (scm_set_debug_cell_accesses_x):
12493 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
12494 * fluids.c (scm_fluid_p): Added texinfo markup.
12495
12496 * error.c (scm_strerror): Made docstring more precise.
12497
12498 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12499 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12500 (scm_symbol_p, scm_symbol_to_string), strorder.c
12501 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12502 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12503 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12504 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12505 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12506
9a6976cd
DH
125072001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12508
12509 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12510 mode, as suggested by Michael Livshin.
12511
463b2219
ML
125122001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12513
12514 * backtrace.c (display_backtrace_body): since the `print_state'
12515 variable is not used (instead its data field is used directly as
12516 `pstate'), protect it from the hungry compiler optimizations.
12517 thanks to Bill Schottstaedt for the report.
12518
61045190
DH
125192001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12520
12521 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12522 It is only defined and used if guile is compiled with
12523 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12524 let cells with a free_cell type tag be visible outside of the
12525 garbage collector when in debug mode.
12526
12527 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12528
12529 (scm_assert_cell_valid): Use a local static variable to avoid
12530 recursion.
12531
12532 (MARK): Only check for rogue cell pointers in debug mode. Use
12533 scm_cellp for this purpose and place all checks for rogue pointers
12534 into that function. Further, since due to conservative scanning
12535 we may encounter free cells during marking, don't use the standard
12536 cell type accessor macro to determine the cell type.
12537
12538 (scm_cellp): Check if the cell pointer actually points into a
12539 card header.
12540
12541 (scm_init_gc): Initalize scm_tc16_allocated.
12542
12543 * gc.h (GCH): Renamed to SCM_GC_H.
12544
12545 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12546 might be unnecessary, but I feel better this way :-)
12547
12548 (SCM_GC_CELL_TYPE): New macro.
12549
12550 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12551 in guile, and it is unlikely that they will be applied to real
12552 pairs anyway.
12553
12554 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12555
12556 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12557 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12558
12559 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12560 make sure that in debug mode no free cell will ever be visible
12561 outside of the garbage collector.
12562
85d6df6a
DH
125632001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12564
12565 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12566 values.
12567
12568 * async.c (scm_system_async), variable.c (scm_make_variable,
12569 scm_make_undefined_variable): Use scm_cons to create a pair.
12570
12571 * debug.c (scm_reverse_lookup): Perform proper type checking.
12572 Remove suspicious use of SCM_SLOPPY_CONSP.
12573
12574 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12575 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12576 the corresponding optimization.
12577
12578 * eval.c (iqq): Use proper type check.
12579
12580 (scm_m_expand_body): Remove redundant type checks.
12581
12582 (promise_print): Don't access promise cells as pairs.
12583
12584 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12585 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12586 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12587 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12588 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12589
12590 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12591 (scm_iprin1): Use new macro predicate and accessors.
12592
12593 * eval.h (scm_tc16_macro): Removed declaration. It is declared
12594 in macros.h.
12595
12596 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
12597 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
12598 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
12599 SCM_VARIABLE_H. Even the macros that are used to inhibit
12600 including a header file twice should be in the SCM_ namespace.
12601
12602 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
12603 properties.c (scm_primitive_property_ref,
12604 scm_primitive_property_del_x): Prefer stronger predicates like
12605 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12606
12607 * gc.c (MARK): Use proper macros to access procedure-with-setter
12608 cell elements and closure cell elements.
12609
12610 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
12611 access free cells as pairs.
12612
12613 (scm_unprotect_object): scm_hashq_get_handle returns #f if
12614 no hashtab entry is found.
12615
12616 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
12617 SCM_CLR_PORT_OPEN_FLAG.
12618
12619 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
12620 use SCM_SET_C[AD]R for uninitialized cells.
12621
12622 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
12623 If the hashtable has no slots, return #f instead of '(). This
12624 unifies the return value with most assoc-functions.
12625
12626 (scm_hash_fn_ref): Use proper type check.
12627
12628 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
12629 Removed references to non-existing functions from documentation.
12630
12631 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
12632 access keyword cell elements.
12633
12634 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
12635 macros.
12636
12637 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
12638
12639 * print.c (scm_iprlist): Added comment. Improved loop
12640 conditions.
12641
12642 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
12643 pairs.
12644
12645 * smob.c (scm_markcdr): Don't access smob cells as pairs.
12646
12647 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
12648
12649 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
12650 cells as pairs.
12651
12652 * variable.c (variable_print, variable_equalp, scm_variable_ref,
12653 scm_variable_set_x): Use proper macros to access variable cell
12654 elements.
12655
12656 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
12657
12658 * variable.h (SCM_VARVCELL): Don't access variable cells as
12659 pairs.
12660
12661 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
12662 added FIXME comment, removed register specifier.
12663
1b27e91a
KN
126642001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
12665
12666 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
12667 * init.c (scm_init_guile_1): Don't init goopscore module.
12668
16c634ec
MV
126692001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12670
12671 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
12672
91344ceb
MG
126732001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12674
12675 * strop.c (scm_string_to_list): Fixed docstring markup.
12676 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
12677 (scm_string_downcase, scm_string_capitalize_x),
12678 (scm_string_capitalize): Rewrote and corrected docstrings.
12679 (scm_string_ci_to_symbol): Made docstring more explicit.
12680
07576812
MV
126812001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12682
12683 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
12684 eval.c can use it.
12685 (scm_call_with_values): Removed.
12686 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
12687 so that it can be exported.
12688 (scm_call_with_values): Removed.
1c938eb8 12689
07576812
MV
12690 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
12691 * eval.c: Include "libguile/values.h"
12692 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
12693 New.
12694 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
12695 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
12696 New delcarations to support above change.
12697
12698 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
12699 errors with last change.
1c938eb8 12700
07576812
MV
127012001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
12702
12703 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
12704 scm_i_eval): Moved the application of the system transformer from
12705 scm_i_eval to scm_primitive_eval.
12706
a17bb5fd
NJ
127072001-03-23 Neil Jerram <neil@ossau.uklinux.net>
12708
a6be01a4
NJ
12709 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
12710
a17bb5fd
NJ
12711 * strop.c (scm_string_index): Fix docstring line break
12712 regression.
12713
12714 * list.c (scm_cons_star): Fix docstring typo.
12715
be54b15d
DH
127162001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12717
12718 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
12719 (big2str), ports.c (scm_drain_input), read.c (scm_read,
12720 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
12721 scm_make_string, scm_string_append), strports.c (st_resize_port,
12722 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
12723 scm_makstr with calls to scm_allocate_string.
12724
12725 * strings.[ch] (scm_allocate_string): New function.
12726
12727 * strings.[ch] (scm_makstr): Deprecated.
12728
789ecc05
GH
127292001-03-18 Gary Houston <ghouston@arglist.com>
12730
6d163216
GH
12731 * posix.c (scm_tmpnam): check that return value from tmpnam is not
12732 NULL. rewrote the docstring.
12733 (scm_mkstemp): new procedure implementing "mkstemp!".
12734 * posix.h: declare scm_mkstemp.
12735
789ecc05
GH
12736 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
12737 normally it would be found in netdb.h.
12738
c6c79933
GH
127392001-03-17 Gary Houston <ghouston@arglist.com>
12740
e9e225e5
GH
12741 * sort.c (scm_sort): move sortvec variable to avoid a compiler
12742 warning when HAVE_ARRAYS is not defined. move len too.
12743
12744 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
12745 (EXTRA_DOT_X_FILES): let configure set the value.
12746 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
12747
c6c79933
GH
12748 * gc.c (scm_must_malloc): changed the comment explaining when
12749 scm_must variants of malloc/free etc., should be used, based on
12750 explanation from Dirk Herrmann.
12751 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
12752 string with procedure name. use scm_must_malloc instead of malloc.
12753 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
12754 of malloc/free.
12755 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
12756 scm_ungetc): use scm_must variants of malloc/realloc/free.
12757 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
12758
b3fcac34
DH
127592001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12760
12761 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12762 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
12763 scm_wrong_type_arg instead.
12764
12765 (SCM_WNA): Deprecated.
12766
12767 * error.[ch] (scm_wta): Deprecated.
12768
12769 * numbers.c (s_i_log): Minor comment fix.
12770
12771 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
12772 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
12773 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
12774 wrong-num-args or misc errors.
12775
12776 * unif.c (scm_make_shared_array, scm_transpose_array,
12777 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
12778 Validate the rest argument (note: this is only done when guile is
12779 built with SCM_DEBUG_REST_ARGUMENT=1)
12780
12781 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
12782 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
12783
12784 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
12785 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
12786
68baa7e7
DH
127872001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12788
12789 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
12790 instead of scm_wrong_num_args.
12791
12792 * coop-threads.c: Don't include libguile/strings.h. (Was only
12793 needed for former implementation of SCM_WRONG_NUM_ARGS.)
12794
12795 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
12796 wrong-num-args errors.
12797
9f40cd87
DH
127982001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12799
12800 * error.[ch] (scm_error_num_args_subr): New function.
12801
5352393c
MG
128022001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12803
12804 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
12805 (scm_length, scm_append, scm_reverse, scm_list_ref),
12806 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
12807 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
12808 (scm_delete1_x), gc.c (scm_map_free_list),
12809 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
12810 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
12811 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
12812 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
12813 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
12814 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
12815 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
12816
12817 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
12818 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12819 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
12820 symbols.c (scm_symbol_interned_p), numbers.c
12821 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
12822 markup.
12823
a9205f07
KN
128242001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
12825
12826 * snarf.h (SCM_CONST_LONG): Deprecated.
12827 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
12828
6d583887
MV
128292001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12830
12831 * numbers.c (scm_num2ulong): Check that a bignum is positive
12832 before looking at the magnitude. Correctly check for overflow
12833 during conversion.
12834 (scm_num2long_long): Likewise.
12835 (scm_num2ulong_long): New.
12836 (ULONG_LONG_MAX): Define if not already defined.
12837 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 12838
e87a03fc
MG
128392001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12840
12841 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
12842
12843 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
12844 (SCM_OPOUTSTRPORTP): New predicate macros.
12845 (scm_open_input_string, scm_open_output_string),
12846 (scm_get_output_string): New prototypes.
1c938eb8 12847
e87a03fc
MG
12848 * strports.c (scm_open_input_string, scm_open_output_string),
12849 (scm_get_output_string): New procedures (SRFI-6 compliant).
12850 Made scm_tc16_strport non-static.
12851
160bb34a
DH
128522001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12853
12854 * macros.h (SCM_ASSYNT): Removed unused object argument from
12855 signature.
12856
12857 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
12858 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
12859 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
12860 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
12861 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
12862 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
12863 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
12864 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
12865 scm_m_atdispatch): Removed unused object argument from call to
12866 SCM_ASSYNT.
12867
80dee77b
DH
128682001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12869
12870 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
12871 const int* to reflect that the input array of integers remains
12872 unchanged. Thanks to Brett Viren for the hint.
12873
d3dd80ab
MG
128742001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12875
12876 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
12877 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
12878 in various places.
12879 (gh_scm2newstr, gh_symbol2newstr): Change call to
12880 scm_must_malloc() to malloc(), because user-free()able memory is
12881 allocated.
12882
12883 * gc.c: Added declaration of `scm_debug_check_freelist'.
12884
26a3038d
MG
128852001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12886
12887 * ports.c (scm_port_mode): Changed `mode' array size to 4.
12888
1f3908c4
KN
128892001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
12890
12891 * strports.c (scm_object_to_string): New procedure.
12892 (scm_strprint_obj): Deprecated.
12893 * strports.h: Reflect the changes.
12894
e11208ca
DH
128952001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
12896
12897 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
12898
12899 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
12900 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
12901 SCM_ASSYNT to check for correct argument types. Either use some
12902 SCM_VALIDATE_* macro or an explicit test.
12903
12904 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
12905 misc-errors.
12906
12907 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
12908 instead of calling scm_wta.
12909
67e8151b
MG
129102001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12911
12912 * load.c (scm_primitive_load, scm_primitive_load_path),
12913 (scm_sys_search_load_path): Corrected docstrings (file ->
12914 filename).
12915
12916 * eval.c (scm_force): Added texinfo markup to docstring.
12917 (scm_promise_p): Renamed parameter to `obj' to match docstring.
12918
12919 * debug-malloc.c: Reinserted #include <stdio.h>.
12920
e0c08f17
KN
129212001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
12922
e39c3de4
KN
12923 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
12924
e0c08f17
KN
12925 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
12926 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
12927 Use SCM_LISTn instead of scm_listify.
12928
e6e2e95a
MD
129292001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12930
12931 * _scm.h: Removed #include <errno.h>.
12932
12933 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
12934 errno variable (can be a macro on some systems, for example when
12935 using linux libc with threads).
12936
12937 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
12938 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
12939 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
12940 #include <errno.h> in these 20 out of 100 files.
1c938eb8 12941
97d0e20b
GH
129422001-03-10 Gary Houston <ghouston@arglist.com>
12943
12944 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
12945 not already defined.
12946
e75341b3
MD
129472001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12948
12949 * coop.c: Inserted #include <stdio.h>.
12950
12951 * iselect.c: Reinserted #include <stdio.h>.
12952
74355186
MV
129532001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
12954
12955 * posix.c: Replaced `#define' of __USE_XOPEN right before
12956 including unistd.h with a define of _GNU_SOURCE at the very top of
12957 the file.
12958
783e7774
KN
129592001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
12960
12961 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
12962 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
12963 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
12964 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
12965 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
12966 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
12967 print.c, procprop.c, procs.c, properties.c, ramap.c,
12968 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
12969 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
12970 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 12971 Remove #include <stdio.h>
783e7774
KN
12972 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
12973
12974 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
12975
9a677c37
MG
129762001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12977
12978 * posix.c (scm_gethostname): Set initial name length to 256 for
12979 Solaris.
12980
94e6d793
MG
129812001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12982
12983 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12984 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12985 (scm_sethostname, scm_gethostname): New prototypes.
12986
12987 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
12988 <sys/file.h>, if present.
12989 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
12990 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
12991 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12992 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12993 (scm_sethostname, scm_gethostname): New procedures.
12994
650a1cf9
NJ
129952001-03-08 Neil Jerram <neil@ossau.uklinux.net>
12996
12997 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
12998 not optional (ii) "recommend" spelling correction.
12999
9636b49c
MD
130002001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13001
5e4a4d09
MD
13002 * ramap.c (racp): Removed optimization which caused array copying
13003 to fail if the two arrays shared storage. Re-inserted the IVDEP
13004 macros removed in the change of 2000-03-09. (Don't really have a
13005 complete grasp of what they are for, but they seem to be necessary
13006 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13007
9636b49c
MD
13008 * hash.c (scm_string_hash): Don't downcase characters.
13009
04a4d666
MD
130102001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13011
9636b49c 13012 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13013 size from 277 --> 1009.
13014
13015 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13016 function.
13017
13018 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13019
04a4d666
MD
13020 * validate.h: Code formatting.
13021
66418d34
KN
130222001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13023
13024 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13025 (*.doc): Add dependency on guile-snarf.awk.in.
13026
13027 * guile-snarf.awk.in: Neglect spaces at the end of
13028 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13029 middle of docstrings. (To avoid the problem with gcc-2.96.)
13030
2ade72d7
DH
130312001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13032
13033 * coop-threads.c (scm_call_with_new_thread), load.c
13034 (scm_primitive_load, scm_sys_search_load_path), random.c
13035 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13036 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13037 (potentially) issue a scm-misc-error or wrong-num-args error
13038 message.
13039
13040 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13041 about the expected type with the wrong-type-arg error message.
13042
13043 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13044 a C level bug that can't be fixed from scheme anyway.
13045
586d7da2
MD
130462001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13047
13048 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13049 Duplicate bindings are OK in a let* since a let* is semantically
13050 equivalent to a nested set of let:s.
13051
1dd05fd8
MG
130522001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13053
13054 * print.c (scm_print_options): Fixed texinfo in docstring.
13055
13056 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13057 the underlying functions getservent, getprotoent or getnetent
13058 return NULL instead of signalling an error.
13059
439006bf
GH
130602001-03-04 Gary Houston <ghouston@arglist.com>
13061
13062 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13063 taking an unexpectedly large filename for an AF_UNIX socket from
13064 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13065
439006bf
GH
13066 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13067 former and adjusted the latter.
13068 (scm_socket, scm_socketpair): cosmetic changes.
13069 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13070 size_t as socklen_t substitute. don't restrict args/return values
13071 to INUM: allow full range of int or size_t.
13072 (scm_fill_sockaddr): check arguments before allocating memory, to
13073 avoid leakage. use malloc, not scm_must_malloc.
13074 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13075 substitute. free the sockaddr structure before throwing an error.
13076 (scm_init_add_buffer): procedure removed, together with its static
13077 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13078 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13079 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13080 scm_sendto): use a local buffer instead of scm_addr_buffer.
13081 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13082 not size_t.
13083 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13084 call to detect whether recvfrom could be bothered to set the address.
13085 (scm_init_socket): don't call scm_init_addr_buffer.
13086
276dd677
DH
130872001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13088
13089 * debug.c (scm_procedure_source, scm_procedure_environment),
13090 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13091 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13092 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13093 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13094 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13095 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13096 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13097 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13098 scm_array_to_list, scm_array_prototype), validate.h
13099 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13100 scm_misc_error or scm_wrong_type_arg instead.
13101
13102 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13103
5e03762c
MD
131042001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13105
13106 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13107 (scm_sys_tag_body): Added.
13108
db4b4ca6
DH
131092001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13110
13111 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13112 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13113 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13114 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13115 options.c (scm_options), ports.c (scm_remove_from_port_table),
13116 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13117 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13118 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13119 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13120 instead.
13121
87e7741d
MD
131222001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13123
13124 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13125
d19b0aac
MV
131262001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13127
13128 * eval.c (scm_s_duplicate_bindings): New error message.
13129 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13130
2fd945df
MV
131312001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13132
13133 * eval.h (SCM_EVALIM2): New macro. Use it when a
13134 immediate, literal constant should be evaluated.
13135 * eval.c (scm_s_duplicate_formals): New error message string.
13136 (scm_c_improper_memq): New function.
13137 (scm_m_lambda): Check for duplicate arguments.
13138 (scm_ceval, scm_deval): When executing a body: only cons a new
13139 toplevel environment frame when it is different from the
13140 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13141 check for empty combinations; use SCM_EVALIM2 for the same reason
13142 in the non-toplevel loop.
13143 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13144 New labels with the meaning of their non-"nontoplevel" partners,
13145 but they are used when it is known that the body is not evaluated at
13146 top-level.
13147 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13148 reporting for empty combinations.
13149
9e6fc585
KN
131502001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13151
13152 * Remove dump facilities.
13153 * dump.c, dump.h: Removed.
13154 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13155 * init.c: Remove #include "libguile/dump.h".
13156 (scm_init_guile_1): Remove scm_init_dump.
13157 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13158 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13159 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13160 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13161
13162 * keywords.c: Remove #include "libguile/dump.h".
13163 (keyword_dump, keyword_undump): Removed.
13164 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13165
eae54bf0
MG
131662001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13167
13168 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13169 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13170 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13171 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13172 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13173 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13174 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13175 to @code{} as the texinfo manual recommends, converted the
13176 examples to use a @lisp{}-environment.
13177
13178 * strports.c (scm_eval_string): Cleaned up the docstring.
13179
13180 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13181 markup.
13182
13183 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13184 (scm_number_to_string, scm_string_to_number, scm_number_p)
13185 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13186 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13187 (scm_ash): Added texinfo markup and removed obsolete @refill.
13188 (scm_gr_p): Corrected comment.
13189 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13190 docstring) comments.
13191 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13192 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13193 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13194 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13195 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13196 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13197 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13198 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13199
23deee81
DH
132002001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13201
13202 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13203 (Obviously nobody compiles with SCM_RECKLESS defined...)
13204
13205 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13206
6fe692e9
MD
132072001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13208
13209 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13210
13211 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13212
27c37006
NJ
132132001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13214
13215 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13216 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13217 since use of `z' suggests that the arguments may be complex.
13218
13219 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13220 typos.
13221
2069af38
NJ
132222001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13223
13224 * dump.c (scm_binary_write, scm_binary_read), eval.c
13225 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13226 scm_guardian_greedy_p, scm_make_guardian), fports.c
13227 (scm_file_port_p): Minor docstring fixes.
13228
b42ff180
MV
132292001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13230
2069af38 13231 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13232
13233 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13234 scm_i_eval.
13235 (make_class_from_template): Do not bother to set the current
13236 module around the call to DEFVAR, scm_eval takes care of that.
13237 (scm_init_goops): Make scm_module_goops and
13238 scm_goops_lookup_closure permanent objects.
1c938eb8 13239
97ea55f8
MV
13240 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13241 top level, create a fresh top-level environment for each
13242 expression instead of mutating the exisint frame. This is
13243 important when that frame is closed over.
13244
b42ff180
MV
13245 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13246 SCM_DIGSPERLONG instead of DIGSPERLONG.
13247
09f2ab1e
MV
132482001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13249
13250 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13251 before applying arrow procedure in `cond' and before applying
13252 receiver procedure in call-with-current-continuation.
13253 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13254 macro. The argument is expanded more than one time.
13255
13256 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13257 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13258
132592001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13260
13261 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13262 notice and license.
13263
7090240c
MG
132642001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13265
13266 * variable.c (scm_make_variable, scm_make_undefined_variable)
13267 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13268 (scm_variable_bound_p), values.c (scm_values)
13269 (scm_call_with_values), unif.c (scm_bit_count)
13270 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13271 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13272 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13273 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13274 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13275 (scm_copy_random_state, scm_random), print.c (scm_newline)
13276 (scm_write_char, scm_simple_format), debug-malloc.c
13277 (scm_malloc_stats), environments.c (scm_environment_p)
13278 (scm_environment_bound_p, scm_environment_ref)
13279 (scm_environment_fold, scm_environment_define)
13280 (scm_environment_undefine, scm_environment_set_x)
13281 (scm_environment_cell, scm_environment_observe)
13282 (scm_environment_observe_weak, scm_environment_unobserve)
13283 (scm_make_eval_environment, scm_eval_environment_p)
13284 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13285 (scm_eval_environment_imported)
13286 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13287 (scm_import_environment_p, scm_import_environment_imports)
13288 (scm_import_environment_set_imports_x, scm_make_export_environment)
13289 (scm_export_environment_p, scm_export_environment_private)
13290 (scm_export_environment_set_private_x)
13291 (scm_export_environment_signature)
13292 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13293 Added texinfo markup.
13294
13295 * ports.c (scm_drain_input): Lowercased argument to @var.
13296 (scm_current_input_port, scm_current_output_port): Filled in
13297 missing explanation.
13298 (scm_current_load_port, scm_set_current_output_port)
13299 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13300 Added texinfo markup.
13301
13302 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13303 (scm_release_arbiter): Added texinfo markup to docstrings.
13304 Changed `Returns' to `Return'.
13305 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13306
25703850
NJ
133072001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13308
13309 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13310 by doubling them to `@@'.
13311
73c0fdce
MG
133122001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13313
13314 * numbers.c (scm_lognot), random.c (scm_random,
13315 scm_random_normal, scm_random_solid_sphere_x,
13316 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13317 scm_random_exp), dynwind.c
13318 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13319
73c0fdce
MG
13320 * goops.c (scm_sys_initialize_object, scm_instance_p,
13321 scm_class_name, scm_class_precedence_list, scm_class_slots,
13322 scm_class_environment, scm_generic_function_name,
13323 scm_generic_function_methods, scm_method_generic_function,
13324 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13325 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13326 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13327 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13328 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13329 scm_class_direct_supers, scm_class_direct_slots,
13330 scm_class_direct_subclasses, scm_class_direct_methods,
13331 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13332 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13333 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13334 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13335 scm_memoized_environment, scm_procedure_name,
13336 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13337 objects.c
13338 (scm_class_of, scm_entity_p, scm_operator_p,
13339 scm_set_object_procedure_x, scm_object_procedure,
13340 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13341 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13342 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13343 scm_hook_to_list), lang.c
13344 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13345 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13346 (scm_print_options, scm_port_with_print_state,
13347 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13348 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13349 scm_make_procedure_with_setter, scm_procedure), throw.c
13350 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13351 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13352 scm_stack_ref, scm_stack_length, scm_frame_p,
13353 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13354 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13355 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13356 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13357 (scm_dirname, scm_basename), dynwind.c
13358 (scm_wind_chain), read.c (scm_read_options, scm_read,
13359 scm_read_hash_extend), gc.c
13360 (scm_unhash_name), eval.c (scm_eval_options_interface,
13361 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13362 (scm_display_error, scm_set_print_params_x,
13363 scm_display_application, scm_display_backtrace, scm_backtrace),
13364 async.c (scm_async, scm_system_async, scm_async_mark,
13365 scm_system_async_mark, scm_run_asyncs, scm_noop,
13366 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13367 scm_mask_signals): Added docstrings.
13368
e228a203
KN
133692001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13370
13371 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13372 address of car/cdr. (Thanks to Dirk Herrmann)
13373 Use scm_sizet to obtain the length of strings.
13374 (Thanks to Matthias Koeppe)
13375
1552a59d
MV
133762001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13377
13378 * symbols.c (scm_mem2symbol): Put a empty statement after the
13379 next_symbol label. This is mandated by ANSI, appearantly.
13380
3178f751
MV
133812001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13382
13383 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13384 sense to compile for a specific kernel version. Do not include
13385 <asm/signal.h> while defining __KERNEL__. This hack should no
13386 longer be needed and caused problems.
13387
7af4defe
MV
133882001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13389
13390 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13391 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13392 can not deal with immediates.
13393
5d6bb349
KN
133942001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13395
13396 * list.c (scm_list_copy): Validate the first argument.
13397
ec9709f0
MV
133982001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13399
13400 Fix evaluator so that top-level expressions are correctly
13401 evaluated with respect to the module system.
1c938eb8 13402
ec9709f0
MV
13403 * modules.h. modules.c (scm_current_module_lookup_closure): New
13404 function.
13405
13406 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13407 prototypes.
13408 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13409 names to better reflect their meaning.
13410
13411 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13412 evaluated at top-level and synronize lookup closure before
13413 executing every subform.
13414 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13415 (scm_eval_x, scm_eval): Reimplement in terms of
13416 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 13417
ec9709f0
MV
134182001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13419
13420 * macros.c (scm_macro_name, scm_macro_transformer): Use
13421 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13422 Thanks!
13423
42417394
KN
134242001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13425
13426 * dump.c (scm_store_bytes): Store data size before data.
13427 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13428 * dump.h (scm_restore_bytes): Updated.
13429
bf942687
KN
134302001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13431
13432 * dump.c: Use double cells for update schedule.
13433
1be4270a
KN
134342001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13435
13436 * ports.c (scm_unread_char): Take an optional argument.
13437
548728ea
MV
134382001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13439
13440 * modules.h (scm_selected_module, scm_current_module): Renamed
13441 scm_selected_module to scm_current_module to synchronize Scheme
13442 and C names.
13443 (scm_select_module, scm_set_current_module): Likewise. Changed
13444 all uses.
1c938eb8 13445
548728ea
MV
13446 * ports.c (scm_port_for_each): Make a snapshot of the port table
13447 before iterating over it. The table might change while the user
13448 code is running. With the snapshot, the user can depend on the
c5408bc3 13449 fact that each port that existed at the start of the iteration is
548728ea
MV
13450 encountered exactly once. (ice-9 popen) depends on this.
13451
cb0d8be2
DH
134522001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13453
13454 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13455
13456 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13457 range checking for the size parameter. Thanks to Martin
13458 Grabmueller for the hint.
13459
13460 (scm_makstr): Reordered string initialization to make interrupt
13461 deferring unnecessary.
13462
13463 * vectors.c (scm_make_vector): Fixed range checking.
13464
e382fdbe
DH
134652001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13466
13467 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13468
13469 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13470 checking of the size parameter for type correctness and valid
13471 range. Thanks to Rob Browning for reporting the problem. Instead
13472 of deferring interrupts, scm_remember_upto_here_1 is used.
13473
bf8f0922
KN
134742001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13475
13476 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13477 (scm_dump_cell_update): Removed.
13478 (scm_dump_update): Renamed from scm_dump_object_update.
13479 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13480 a pointer instead of returning a value.
13481 * keywords.c (keyword_undump): Updated.
13482
914cceec
KN
134832001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13484
13485 * dump.c, dump.h: Modified a lot.
5f17c66f 13486 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
13487 (scm_dump_mark): Removed.
13488 (scm_restore_cell_object, scm_store_cell_object): New functions.
13489
13490 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13491 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13492 New slots: dump, undump.
13493 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13494 Updated.
13495
13496 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13497 (keyword_undump): Renamed from keyword_alloc.
13498 (scm_init_keywords): Set keyword_dump and keyword_undump.
13499
ecf470a2
ML
135002001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13501
13502 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13503 the deprecated SCM_DOUBLE_CELLP.
13504
13505 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13506
03416a99
KN
135072001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13508
13509 * dump.c, dump.h: New files.
13510 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13511 * init.c: #include "libguile/dump.h".
13512 (scm_init_guile_1): Call scm_init_dump.
13513 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13514 dump_dealloc, dump_store, undump_alloc, undump_restore,
13515 undump_init.
13516 * smob.c (scm_make_smob_type): Init the new slots.
13517 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13518 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13519
13520 * keywords.c: #include "libguile/dump.h".
13521 (keyword_dealloc, keyword_alloc): New functions.
13522 (scm_init_keywords): Set smob_dump and smob_undump.
13523
00ffa0e7
KN
135242001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13525
13526 * vectors.c (scm_c_make_vector): New function.
13527 * vectors.h (scm_c_make_vector): Declared.
13528 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13529 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13530 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13531 (scm_make_method_cache, scm_i_vector2list,
13532 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13533 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13534 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13535 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13536 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13537 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13538 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13539 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13540
13541 * hashtab.c (scm_c_make_hash_table): New function.
13542 * hashtab.h (scm_c_make_hash_table): Declared.
13543 * environments.c (scm_make_leaf_environment,
13544 scm_make_eval_environment), gc.c (scm_init_storage),
13545 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13546 Use scm_c_make_hash_table.
13547
b8446ce8
MD
135482001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13549
13550 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13551
e3239868
DH
135522001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13553
13554 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13555 end of docstring.
13556
13557 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13558 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13559 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13560 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13561 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13562 scm_source_property, scm_set_source_property_x), sort.c
13563 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13564 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13565 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13566 docstrings.
13567
41ee56dd
MD
135682001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13569
13570 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13571 really get that arg.
13572
b6311c08
KN
135732001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13574
13575 * goops.c (s_scm_get_keyword): Bug fix.
13576
a49af0c0
DH
135772001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13578
13579 The following patch was sent by Martin Grabmueller. It makes sure
13580 that in case of parameter errors the correct function name is
13581 shown, and that parameter types are only checked once.
13582
13583 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13584 string_capitalize_x): New functions. Each one performs the core
13585 functionality of the corresponding scm_* function.
13586
13587 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13588 scm_string_downcase_x, scm_string_downcase,
13589 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13590 parameter checking wrappers of the above functions.
13591
13070bd3
DH
135922001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13593
13594 * continuations.c, dynl.c, keywords.c, load.c: Include
13595 strings.h. Thanks to Bill Schottstaedt for the bug report.
13596
2f2b390c
DH
135972001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13598
13599 * backtrace.c (display_header): Make sure that line and column
13600 information is shown independent of whether the port the code was
13601 read from had an associated filename. Thanks to Martin
13602 Grabmueller for providing this patch.
13603
efa40607
DH
136042001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13605
13606 * fports.[ch] (scm_file_port_p): New primitive.
13607
a98bddfd
DH
136082001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13609
13610 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
13611 These are now defined in fports.c, strports.c and vports.c.
13612
13613 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
13614 vports.c (scm_tc16_sfport): Made variables (were macros defined in
13615 tags.h).
13616
13617 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
13618 (scm_make_sfptob): Made static. These return a type code now.
13619
13620 fports.c (scm_init_fports), strports.c (scm_init_strports),
13621 vports.c (scm_init_vports): Create the corresponding port types.
13622
13623 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
13624 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
13625
13626 * init.c (scm_init_guile_1): Make sure strports are initialized
13627 before gdbint.
13628
13629 * ports.[ch] (scm_make_port_type): Changed the return type to
13630 scm_bits_t.
13631
13632 * ports.c (scm_ports_prehistory): Don't create any port types
13633 here.
13634
13635 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
13636 against scm_tc16_fport directly.
13637
0419a528
DH
136382001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13639
13640 * srcprop.c (scm_set_source_property_x): Fix to handle
13641 (set-source-property! <obj> 'copy <datum>) correctly.
13642
6d36532c
GH
136432001-01-24 Gary Houston <ghouston@arglist.com>
13644
13645 * filesys.c (scm_link): docstring fix.
13646 * fports.h (scm_setfileno): obsolete declaration removed.
13647 * posix.c: bogus popen declaration removed.
13648
13649 * rdelim.c: new file, split from ioext.c.
13650 * rdelim.h: new file, split from ioext.h
13651 * Makefile.am: add rdelim.c and related files.
13652 * init.c: call scm_init_rdelim. include rdelim.h.
13653
3ba5a6c2
DH
136542001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13655
13656 This patch was sent by Martin Grabmueller and makes sure that
13657 parameter errors are reported correctly by the lexicographic
13658 ordering predicates.
13659
13660 * strorder.c (string_less_p, string_ci_less_p): New functions.
13661
13662 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
13663 functionality into string_less_p, string_ci_less_p respectively.
13664 The remaining code is just a wrapper to do the parameter
13665 checking.
13666
13667 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
13668 parameters and call string_less_p instead of scm_string_less_p.
13669
13670 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
13671 Check the parameters and call string_less_ci_p instead of
13672 scm_string_ci_less_p.
13673
e40a4095
DH
136742001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13675
ed6a2db9
DH
13676 This patch modifies scm_display_error to perform parameter
13677 checking. Thanks to Neil Jerram for the bug report.
13678
e40a4095
DH
13679 * backtrace.[ch] (scm_i_display_error): New function.
13680
13681 * backtrace.c (scm_display_error): Added parameter check and
13682 extracted the core functionality into function
13683 scm_i_display_error.
13684
13685 * throw.c (handler_message): Call scm_i_display_error to display
13686 the error message.
13687
f1e06a96
MD
136882001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13689
13690 * eval.c (SCM_APPLY): Added # args check for application of
13691 procedures with arity 3. (Thanks to Anders Holst.)
13692
30ea841d
DH
136932001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13694
13695 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
13696
13697 (SCM_OPDIRP): Deprecated.
13698
13699 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
13700 SCM_OPN.
13701
13702 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
13703 Instead, give an explicit error message in case the directory is
13704 closed.
13705
13706 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
13707 instead of SCM_OPENP and SCM_CLOSEDP.
13708
13709 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
13710
312ae976
DH
137112001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13712
13713 * eval.c (inner_eval, scm_eval): Move all real functionality into
13714 inner_eval. Avoid to copy the expression twice by inlining some
13715 code from scm_i_eval.
13716
4567ed78
DH
137172001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
13718
13719 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
13720 now has to be the last clause, as required by R5RS. Thanks to
13721 Martin Grabmueller for the patch.
13722
10288a09
GH
137232001-01-18 Gary Houston <ghouston@arglist.com>
13724
13725 * ioext.c: further simplify scm_read_string_x_partial by defining
13726 a macro SCM_EBLOCK.
13727
8f379a8f
DH
137282001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
13729
13730 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
13731
5c75b29f
DH
137322001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
13733
13734 * __scm.h: Added comment about architecture and compiler
13735 properties that are required by guile.
13736
13737 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
13738 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
13739
13740 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
13741
13742 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
13743
13744 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
13745 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
13746
ac0c002c
DH
137472001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13748
13749 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
13750 to the names in limits.h.
13751
13752 * numbers.c (abs_most_negative_fixnum): Added.
13753
13754 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
13755 fixnum-min) special case.
13756
13757 (scm_big_and): Fix for negative first parameter.
13758
13759 (scm_bit_extract): Fix for fixnum paramters.
13760 Thanks to Rob Browning for the bug report.
13761
13762 (scm_init_numbers): Initialize abs_most_negative_fixnum.
13763
debe0dc2
DH
137642001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
13765
13766 * symbols.c (scm_symbol_bound_p): Fixed comment.
13767 Thanks to Chris Cramer.
13768
8a39e3fc
DH
137692001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13770
13771 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
13772 Thanks to Bill Schottstaedt.
13773
322ec19d
ML
137742001-01-11 Michael Livshin <mlivshin@bigfoot.com>
13775
9a5fa6e9 13776 from Matthias Köppe:
1c938eb8 13777
322ec19d
ML
13778 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
13779 casts its result, so doesn't yield an lvalue per ANSI C.
13780
13781 * goops.c (s_scm_sys_set_object_setter_x): use
13782 SCM_SET_ENTITY_SETTER.
13783 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
13784
13785 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
13786 its result, so doesn't yield an lvalue per ANSI C.
13787 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
13788 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
13789 SCM_GC_SET_CARD_FLAGS.
13790 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
13791
13792 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
13793
60d02d09
GH
137942001-01-08 Gary Houston <ghouston@arglist.com>
13795
13796 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
13797 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
13798 socket.c (scm_recvfrom): use the new macro, plus minor docstring
13799 changes.
13800 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
13801 for fdes. if current input port is used, check that it's a file
13802 port.
13803
c2da2648
GH
138042001-01-06 Gary Houston <ghouston@arglist.com>
13805
13806 * ioext.c (scm_read_string_x_partial): new procedure, implements
13807 read-string!/partial.
13808 * ports.c (scm_take_from_input_buffers): new procedure used by
13809 scm_read_string_x_partial.
13810 (scm_drain_input): use scm_take_from_input_buffers.
13811
4651d663
MV
138122001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
13813
13814 * validate.h (SCM_VALIDATE_NUMBER): New.
13815
c0a5d888
ML
138162001-01-03 Michael Livshin <mlivshin@bigfoot.com>
13817
13818 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
13819 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
13820 SET_DESTROYED): new defines/macros.
13821 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
13822 (add_to_live_list): takes a `guardian_t *' now, not SCM.
13823 (guardian_print): print more info.
13824 (guardian_apply): check if the guardian is destroyed, and throw an
13825 error if so. take one more optional argument `throw_p'.
13826 (scm_guard): depending on the value of `throw_p', return a boolean
13827 result.
13828 (scm_get_one_zombie): remove redundant property test.
13829 (guardian_t): represent the various (currently 3, I hope nothing
13830 more gets added) boolean fields as bit flags.
13831 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
13832 (scm_destroy_guardian_x): new procedure.
13833
13834 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
13835 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
13836
0c6d2191
GH
138372001-01-01 Gary Houston <ghouston@arglist.com>
13838
13839 * fports.c (fport_write): bugfix: handle short writes for
13840 unbuffered ports too. optimize the buffered case by minimizing
13841 the number of write/flush calls.
13842 (write_all): new helper procedure.
13843
a51fe247 13844The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
13845
13846;; Local Variables:
13847;; coding: utf-8
13848;; End: