*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
68eccd8b
KR
12007-09-11 Kevin Ryde <user42@zip.com.au>
2
3 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
4 putenv("NAME") as the fallback everywhere else. In particular this is
5 needed for solaris 9. Reported by Frank Storbeck.
6
454866e0
LC
72007-09-03 Ludovic Courtès <ludo@gnu.org>
8
9 * read.c (flush_ws): Handle SCSH block comments.
10
f43f3620
LC
112007-09-03 Ludovic Courtès <ludo@gnu.org>
12
13 Fix alignment issues which showed up at least on SPARC.
14
15 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
16 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
17 alignment.
18 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
19 correct alignment.
20 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
21 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
22 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
23 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
24 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
25
8d4d5dfc
KR
262007-09-03 Kevin Ryde <user42@zip.com.au>
27
28 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
29 before using clog(). It's possible for gcc to provide the "complex
30 double" type, but for the system not to have the complex funcs.
31 (scm_exp): Ditto HAVE_CEXP for cexp().
32 (clog, cexp, carg): Remove fallback definitions. These only
33 duplicated the code within scm_log and scm_exp, and the latter have to
34 exist for the case when there's no "complex double". So better just
35 fix up the conditionals selecting between the complex funcs and plain
36 doubles than worry about fallbacks.
37
1ac5fb45
LC
382007-09-02 Ludovic Courtès <ludo@gnu.org>
39
40 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
41 This fixes a memory leak.
42
b87e6d04
HWN
432007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
44
5dbc6c06
HWN
45 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
46 gc.c: replace port table with weak hash table. This simplifies
47 memory management, and fixes freed cells appearing in
48 port-for-each output.
49
b87e6d04
HWN
50 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
51 held.
52
2baec6a9
LC
532007-08-23 Ludovic Courtès <ludo@gnu.org>
54
492faee1 55 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 56 expression when asked to. Reported by Kevin.
492faee1 57
2baec6a9
LC
58 * stime.c: Define `_REENTRANT' only if not already defined.
59
1f11c61a
KR
602007-08-21 Kevin Ryde <user42@zip.com.au>
61
62 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
63 tc16 values so big, real, complex and fraction can be distinguished.
64
65 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
66 was making numbers come out as "type 23" in gc-live-object-stats.
67 Fix tests of the tc16 number types, they were checked under
68 scm_tc7_number, but the values went down the tag>=255 smob case.
69 Put smob case under scm_tc7_smob instead of using tag>=255, per
70 recommendation in comments with scm_tc7_smob to use symbolic values.
71 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
72 code. Lose some unnecessary "break" statements.
73
74 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
75 element returned, rather than two lookups scm_hashq_ref and
76 scm_hashq_set_x.
77
949ec9f9
KR
782007-08-17 Kevin Ryde <user42@zip.com.au>
79
80 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
81 solaris 2.6. Reported by anirkko.
82
6caac03c
LC
832007-07-29 Ludovic Courtès <ludo@gnu.org>
84
85 * Makefile.am (INCLUDES): Added Gnulib includes.
86 (gnulib_library): New.
87 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
88 `$(gnulib_library)'.
89 (libguile_la_LIBADD): Likewise.
90
91 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
92 to define it when available.
93 * srfi-14.c: Likewise.
f7439099
LC
94 * i18n.c: Likewise. Include Gnulib's <alloca.h>
95 * eval.c: Include Gnulib's <alloca.h>.
96 * filesys.c: Likewise.
97 * read.c: Don't include <strings.h> and don't provide an
98 `strncasecmp ()' replacement; use Gnulib's <string.h> and
99 `strncasecmp ()' instead.
6caac03c 100
e08f3f7a
LC
1012007-07-25 Ludovic Courtès <ludo@gnu.org>
102
103 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
104 immediately. This used to produce a circular memoized
105 expression, e.g., for `(set (quote x) #t)'.
106
7337d56d
LC
1072007-07-22 Ludovic Courtès <ludo@gnu.org>
108
109 Overhauled the reader, making it faster.
110
111 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
112 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
113 of `scm_lreadr ()'.
114
115 * read.c: Overhauled. No longer use a token buffer. Use a
116 on-stack C buffer in the common case and use Scheme strings when
117 larger buffers are needed.
118 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
119 scm_lreadr, scm_lreadrecparen): Removed.
120 (scm_i_input_error): Marked as `SCM_NORETURN'.
121
df449722
LC
1222007-07-15 Ludovic Courtès <ludo@gnu.org>
123
124 * script.c (scm_compile_shell_switches): Updated copyright year.
125
b1f57ea4
LC
1262007-07-11 Ludovic Courtès <ludo@gnu.org>
127
128 * goops.c (scm_sys_method_more_specific_p): Added docstring.
129 Make sure LEN is greater than or equal to the minimum length of
130 specializers of M1 and M2. This fixes a segfault later on in
131 `more_specificp ()' if TARGS is too small. Reported by Marco
132 Maggi <marco.maggi-ipsu@poste.it>.
133
d3075c52
LC
1342007-06-26 Ludovic Courtès <ludo@gnu.org>
135
136 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
137 sure to free the previous array after the new one has been
138 installed. This leak is made visible by running
139 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
140 from the REPL within Valgrind.
141
7a5fb796
LC
1422007-06-12 Ludovic Courtès <ludo@chbouib.org>
143
144 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
145 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
146 bus error on SPARC (and possibly others) due to unaligned access.
147
a1ef7406
LC
1482007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
149
150 * posix.c (scm_ttyname): Check whether RESULT is NULL before
151 making a string from it (reported by Dan McMahill). Don't call
152 `scm_from_locale_string ()' before the mutex is released.
153
3dcf3373
LC
1542007-05-26 Ludovic Courtès <ludo@chbouib.org>
155
156 * eval.c (scm_m_define): Updated comment. Changed order for value
157 evaluation and `scm_sym2var ()' call, which is perfectly valid per
158 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
159
608860a5
LC
1602007-05-05 Ludovic Courtès <ludo@chbouib.org>
161
162 Implemented lazy duplicate binding handling.
163
164 * modules.c (scm_export): Renamed to...
165 (scm_module_export): This. Now public.
166 (module_variable): Removed.
167 (default_duplicate_binding_procedures_var): New variable.
168 (default_duplicate_binding_handlers, resolve_duplicate_binding,
169 module_imported_variable, scm_module_local_variable,
170 scm_module_variable): New functions.
171 (scm_module_import_interface): Rewritten.
172 (scm_module_reverse_lookup): Exported as a Scheme function.
173 * modules.h (scm_module_index_duplicate_handlers,
174 scm_module_index_import_obarray): New macros.
175 (scm_module_variable, scm_module_local_variable,
176 scm_module_export): New declarations.
177
1911e3da
LC
1782007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
179
180 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
181 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
182
1d8ce4c0
HWN
1832007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
184
185 * numbers.c (carg): provide carg, cexp, clog in case they are
186 missing.
187
afb49959
LC
1882007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
189
190 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
191 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
192 Steven Wu.
193
b3aa4626
KR
1942007-03-08 Kevin Ryde <user42@zip.com.au>
195
196 * struct.c, struct.h (scm_make_vtable): New function, providing
197 `make-vtable'.
198 * stacks.c (scm_init_stacks): Use it.
199
2002007-03-06 Kevin Ryde <user42@zip.com.au>
201
202 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
203 allocating a tail array. If there's no such then those tail fields
204 are uninitialized and garbage SCMs there can cause a segv if printed
205 (after fetching with struct-ref).
206
2072007-02-22 Kevin Ryde <user42@zip.com.au>
208
209 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
210 (scm_usleep): Update docstring per manual, cross reference sleep.
211
212 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
213 scm_struct_init is not within that section. scm_struct_init can
214 thrown an error, which within a critical section results in an
215 abort().
216
03291373
NJ
2172007-02-19 Neil Jerram <neil@ossau.uklinux.net>
218
219 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
220 is included in the distribution.
652dbce6 221 (noinst_HEADERS): And the same for eval.i.c.
03291373 222
a2f00b9b
LC
2232007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
224
225 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
226 unconditionally. Include <langinfo.h> and <nl_types.h> when
227 available.
228 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
229 SCM_LIST_OR_INTEGER_P): New macros.
230 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
231 as powers of two instead of `(1 << LC_*)'.
232 (scm_i_locale_free): New function/macro.
233 (scm_global_locale): New global variable.
234 (smob_locale_free): Use `scm_i_locale_free ()'.
235 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
236 (get_current_locale_settings): Return `EINVAL' instead of `errno'
237 when `setlocale' fails.
238 (restore_locale_settings): Likewise.
239 (install_locale_categories): Likewise.
240 (install_locale): Likewise. Stop the locale stack traversal when
241 all categories have been handled.
242 (get_current_locale, category_to_category_mask,
243 category_list_to_category_mask): New function.
244 (scm_make_locale): Use them. Accept both lists of `LC_*' values
245 and single `LC_*' values as the first argument. Handle the case
246 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
247 duplicate C_BASE_LOCALE before using it.
248 (scm_nl_langinfo, define_langinfo_items): New functions.
249 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
250 `nl-langinfo' and invoke `define_langinfo_items ()'.
251 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
252 * posix.c: Include <xlocale.h> when available.
253 (scm_i_locale_mutex): Always define it. Statically initialized.
254 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
255 acquiring the locale mutex.
256 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
257
b3aa4626
KR
2582007-01-27 Kevin Ryde <user42@zip.com.au>
259
260 * ports.c (scm_port_line, scm_set_port_line_x), read.c
261 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
262 port line number type, should be "long" not "int", as per line_number
263 field of scm_t_port. (Makes a difference only on 64-bit systems, and
264 only then for a linenum above 2Gig.)
265
2a8d66b0
HWN
2662007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
267
268 * vector.c: remove comment as per kryde's request.
269
b3aa4626
KR
2702007-01-25 Kevin Ryde <user42@zip.com.au>
271
272 * sort.c (scm_stable_sort): Return empty list for input empty list, as
273 done in guile 1.6 and as always done by plain `sort'. Was falling
274 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
275
cb90e2cb
HWN
2762007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
277
8cb7939c
HWN
278 * vectors.c (s_scm_vector_move_right_x): complain about naming.
279
d00a0704
HWN
280 * srcprop.c: regularize comments.
281
3d178652
HWN
282 * eval.c: remove superfluous ifndef DEVAL.
283
243ebb61
HWN
284 * private-options.h: idem.
285
286 * eval.i.c: copyright nitpicking.
287
0ee05b85
HWN
288 * eval.c: distangle. move duplicate code to eval.i.c and include
289 twice.
290
291 * eval.i.c: new file.
292
22fc179a
HWN
293 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
294 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
295 read.h, stacks.c, symbols.c, throw.c: use private-options.h
296
297 * private-options.h: new file: contain hardcoded option
298 definitions.
299
cb90e2cb
HWN
300 * private-gc.h: add FSF header.
301
62560650
HWN
3022007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
303
72f19c26
HWN
304 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
305 memoize-symbol is set.
306
307 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
308
309 * eval.c (CEVAL): add memoize_symbol trap.
310
03347a97
HWN
311 * options.c (scm_options_try): new function. This allows error
312 reporting before changing options in a critical section.
313
b0763985
HWN
314 * srcprop.c: use double cell for storing source-properties. Put
315 filename in the plist, and share between srcprops if possible.
316 Remove specialized storage.
317
318 * srcprop.h: remove macros without SCM_ prefix from
319 interface. Remove specialized storage/type definitions.
320
62560650
HWN
321 * read.c: idem.
322
323 * print.c: idem.
324
325 * eval.c: terminate option lists with 0.
326
327 * options.c: remove n (for length) from scm_option_X
328 functions. Detect option list length by looking for NULL name.
329
42ddb3cb
LC
3302007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
331
332 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
333 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
334 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
335 added by `make-vtable-vtable'. Reported by Marco Maggi.
336
937038e8
HWN
3372007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
338
339 * throw.c (scm_ithrow): more refined error message: print symbols
340 too.
341
23d72566
KR
3422007-01-16 Kevin Ryde <user42@zip.com.au>
343
344 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
345 implementing `set-program-arguments'.
346
347 * filesys.c (scm_init_filesys): Use scm_from_int rather than
348 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
349 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
350 O_LARGEFILE. These are all int not long, per arg to open().
351 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
352 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
353 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
354 an int arg to fcntl.
355
356 * posix.c (scm_putenv): Correction to "len" variable, was defined only
357 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
358 Move it to where it's used. Reported by Hugh Sasse.
359
360 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
361 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
362 meant #\nul in the input (detected by scm_to_locale_string) and a bad
363 flags arg (detected by scm_to_int) would throw from a critical
364 section, causing an abort().
365
366 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
367 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
368 REG_NOTEOL; they're all ints not longs (per args to regcomp and
369 regexec).
370
a2c40dc7
HWN
3712007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
372
373 * throw.c (scm_ithrow): print out key symbol and string arguments
374 when error happens inside a critical section, and document why.
375
391f57e6
HWN
3762007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
377
378 * read.c (s_scm_read_hash_extend): document #f argument to
379 read-hash-extend.
380
23d72566
KR
3812007-01-04 Kevin Ryde <user42@zip.com.au>
382
383 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
384 scm_minor_version, scm_micro_version, scm_effective_version,
385 scm_version, scm_init_version): Use SCM_API instead of just extern,
386 for the benefit of mingw. Reported by Cesar Strauss.
387
93632e3c
HWN
3882007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
389
390 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
391 too.
392 (gc_update_stats): update scm_gc_cells_allocated_acc too.
393
23d72566
KR
3942006-12-27 Kevin Ryde <user42@zip.com.au>
395
396 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
397 the basic scm_get_stack_base. As advised by Nils Durner.
398
399 * threads.c (get_thread_stack_base): Add a version using
400 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
401 As advised by Heikki Lindholm.
402
403 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
404 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
405 Durner.
406
4072006-12-24 Kevin Ryde <user42@zip.com.au>
408
409 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
410 error if pid is not our own process, instead of silently doing nothing.
411
412 * print.c (scm_write, scm_display, scm_write_char): Disable port close
413 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
414 check in configure.in unintentionally enabled it. Believe that
415 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
416 can leave errno in that state. popen.test "no duplicates" output test
417 provoked that.
418
e2bf3b19
HWN
4192006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
420
421 * numbers.c (scm_i_fraction_reduce): move logic into
422 scm_i_make_ratio(), so fractions are only read.
423 scm_i_fraction_reduce() modifies a fraction when reading it. A
424 race condition might lead to fractions being corrupted by reading
425 them concurrently.
426
427 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
428 comparisons between reduced and unreduced fractions go wrong.
429
430 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
431 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
432 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
433 SCM_FRACTION_REDUCED.
434
23d72566
KR
4352006-12-16 Kevin Ryde <user42@zip.com.au>
436
437 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
438 more direct for a procedure called raise.
439 (kill): Remove mingw fake fallback.
440
4412006-12-15 Kevin Ryde <user42@zip.com.au>
442
443 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
444 _pipe on mingw.
445
4462006-12-14 Kevin Ryde <user42@zip.com.au>
447
448 * threads.c (thread_print): Cope with the case where pthread_t is a
449 struct, as found on mingw. Can't just cast to size_t for printing.
450 Reported by Nils Durner.
451
452 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
453 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
454
4552006-12-13 Kevin Ryde <user42@zip.com.au>
456
457 * eval.c (scm_m_define): Set 'name procedure property on any
458 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
459 procedures with setters as used in srfi-17.
460
461 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
462 linux man page says is a possibility.
463
f30e1bdf
LC
4642006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
465
466 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 467 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
468 negative lower bounds.
469 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 470 Szavai Gyula).
f30e1bdf
LC
471
472 (scm_array_in_bounds_p): Iterate over S instead of always
473 comparing indices with the bounds of S[0]. This fixes
474 `array-in-bounds?' for arrays with a rank greater than one and
475 with different lower bounds for each dimension.
476
23d72566
KR
4772006-12-05 Kevin Ryde <user42@zip.com.au>
478
479 * numbers.c (scm_product): For flonum*inum and complex*inum, return
480 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
481 and as per R5RS section "Exactness".
482
4832006-12-03 Kevin Ryde <user42@zip.com.au>
484
485 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
486 allow $AWK from the environment to override. It had syntax gremlins,
487 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
488 Makefile stopped it having any effect. Use just $(AWK), which can be
489 overridden with "make AWK=xxx" in the usual way if desired.
490
22be72d3
LC
4912006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
492
493 * libguile/vectors.c (scm_vector_to_list): Fixed list
494 construction: elements were not copied when INC is zero (see
495 "shared array" example in `vectors.test'). Reported by
496 Szavai Gyula.
497
b89c4943
LC
4982006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
499
500 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
501 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
502 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
503 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
504 (DOT_X_FILES): Added `gettext.x'.
505 (DOT_DOC_FILES): Likewise.
506 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
507 (modinclude_HEADERS): Added `gettext.h'.
508 (EXTRA_DIST): Added `libgettext.h'.
509
510 * gettext.h: Renamed to...
511 * libgettext.h: New file.
512
513 * i18n.c: Renamed to...
514 * gettext.c: New file.
515
516 * i18n.h: Renamed to...
517 * gettext.h: New file.
518
519 * i18n.c, i18n.h, locale-categories.h: New files.
520
521 * init.c: Include "libguile/gettext.h" instead of
522 "libguile/i18n.h".
523 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
524 `scm_init_i18n ()'.
525
526 * posix.c: Include "libguile/gettext.h" instead of
527 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
528 (USE_GNU_LOCALE_API): New macro.
529 (scm_i_locale_mutex): New variable.
530 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
531
532 * posix.h: Include "libguile/threads.h".
533 (scm_i_locale_mutex): New declaration.
534
f3e3f530
NJ
5352006-11-17 Neil Jerram <neil@ossau.uklinux.net>
536
537 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
538
d9f71a07
LC
5392006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
540
541 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
542 "sweep_stats" arguments; use them instead of accessing the global
543 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
544
545 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
546 before each iteration of the loop.
547 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
548 (scm_i_get_new_heap_segment): Take an additional argument
549 SWEEP_STATS. Compute MIN_CELLS as a function of it.
550
551 * libguile/gc.c (scm_gc_cells_collected,
552 scm_gc_cells_collected_1): Removed.
553 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
554 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
555 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
556 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
557 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
558 `scm_gc_cells_(collected|swept)'.
559 (gc_update_stats): New.
560 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
561 `scm_i_gc_sweep_stats_1' instead of the former globals.
562 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
563 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
564 would keep allocating new segments instead of re-using collected
565 cells (because `scm_gc_cells_collected' would remain zero).
566
567 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
568 scm_gc_cell_yield_percentage): Removed.
569
570 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
571 (scm_i_adjust_min_yield): Updated.
572 (scm_i_get_new_heap_segment): Updated.
573
dd18d312
NJ
5742006-11-02 Neil Jerram <neil@ossau.uklinux.net>
575
576 * modules.c: Correct comment saying that low-level environments
577 will be used "in the next release".
578
579 * init.c: Comment out #include of environments.h.
580 (scm_i_init_guile): Comment out scm_environments_prehistory() and
581 scm_init_environments() calls.
582
583 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
584 (DOT_X_FILES): Remove environments.x.
585 (DOT_DOC_FILES): Remove environments.doc.
586 (modinclude_HEADERS): Remove environments.h.
587
9a5fa6e9
NJ
5882006-10-25 Neil Jerram <neil@ossau.uklinux.net>
589
590 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
591
592 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
593 scm_ia64_register_backing_store_base() instead of Linux-specific
594 implementations.
595
596 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
597 New declarations.
598
599 * gc.c (__libc_ia64_register_backing_store_base): Declaration
600 removed.
601 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
602 implementations for Linux and HP-UX.
603
604 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
605 and scm_ia64_register_backing_store_base() instead of
606 Linux-specific implementations.
607
608 * continuations.h (__libc_ia64_register_backing_store_base):
609 Declaration removed.
610 (scm_t_contregs): New "fresh" field.
611
612 * continuations.c (ia64_getcontext): Removed.
613 (scm_make_continuation): Use continuation fresh field instead of
614 interpreting getcontext return values (which isn't portable). Use
615 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
616 instead of Linux-specific implementations.
617 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
618 instead of Linux-specific implementation.
619
620 * _scm.h (__ia64__): Also detect __ia64.
621
8ab3d8a0
KR
6222006-10-03 Kevin Ryde <user42@zip.com.au>
623
624 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
625 arguments or 3 or more arguments. Previously 0 called proc with
626 SCM_UNDEFINED, and 3 or more silently used just the first 2.
627
6282006-09-28 Kevin Ryde <user42@zip.com.au>
629
630 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
631 for chsize fallback, instead of hard-coding mingw. Mingw in fact
632 supplies ftruncate itself these days.
633
634 * ports.c (fcntl.h): Can include this unconditionally, no need for
635 __MINGW32__.
636
637 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
638 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
639 "off_t" for parameters, per usual definition of this function, rather
640 than "char *" and "int". Use ftruncate instead of chsize. Check for
641 error on final close.
642
6432006-09-27 Kevin Ryde <user42@zip.com.au>
644
645 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
646 in mingw.
647
648 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
649 const *" for mingw to suppress warnings from gcc (which are errors
650 under the configure default -Werror). Reported by Nils Durner.
651
6522006-09-26 Kevin Ryde <user42@zip.com.au>
653
654 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
655 * fports.c (scm_open_file): Use open_or_open64.
656 (fport_seek_or_seek64): New function, adapting fport_seek.
657 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
658 functions.
659 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
660 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
661
662 * ports.c (scm_truncate_file): Update docstring per manual.
663
6642006-09-23 Kevin Ryde <user42@zip.com.au>
665
666 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
667 functions.
668
9a5fa6e9 6692006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
670
671 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
672 (make_predset, define_predset, make_strset, define_strset, false,
673 true): Removed.
674 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
675 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
676 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
677 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
678 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
679 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
680 (define_charset, scm_srfi_14_compute_char_sets): New functions.
681 (scm_init_srfi_14): Use `define_charset ()' instead of
682 `define_predset ()' and `define_strset ()'.
683
684 * srfi-14.h (scm_c_init_srfi_14): Removed.
685 (scm_srfi_14_compute_char_sets): New declaration.
686
687 * posix.h: Include "srfi-14.h".
688 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
689 successful `setlocale ()' call.
690
8ab3d8a0
KR
6912006-09-08 Kevin Ryde <user42@zip.com.au>
692
693 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
694 (scm_recvfrom): Update docstring from manual.
695
418122ce
RB
6962006-08-31 Rob Browning <rlb@defaultvalue.org>
697
698 * ports.c (scm_c_port_for_each): Add a
699 scm_remember_upto_here_1(ports) at the end of the function to fix
700 a GC bug.
701
b5944f66
NJ
7022006-08-28 Neil Jerram <neil@ossau.uklinux.net>
703
704 * backtrace.c (scm_display_backtrace_with_highlights): Minor
705 improvements to docstring.
706 (scm_backtrace_with_highlights): Analogous improvements.
707
8ab3d8a0
KR
7082006-08-12 Kevin Ryde <user42@zip.com.au>
709
710 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
711 New, set from configure.
712 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
713 to scmconfig.h.
714 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
715 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
716 Reported by Claes Wallin.
717
b0b0deff
NJ
7182006-08-11 Neil Jerram <neil@ossau.uklinux.net>
719
720 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
721 frame, not a stack).
722
8ab3d8a0
KR
7232006-07-25 Kevin Ryde <user42@zip.com.au>
724
725 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
726 on pthreads version, since pthread_getattr_np not available on solaris
727 and macos. Reported by Claes Wallin.
728
7292006-07-24 Kevin Ryde <user42@zip.com.au>
730
731 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
732 it's a macro on MacOS X. Reported by Claes Wallin.
733
734 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
735 for the benefit of Solaris 10. Reported by Claes Wallin.
736
737 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
738 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
739
7402006-07-21 Kevin Ryde <user42@zip.com.au>
741
742 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
743 autoconf recommendation. Should fix Solaris 10 reported by Claes
744 Wallin.
745
746 * threads.c: Include <string.h>, needed for memset() which is used by
747 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
748
b4912378
RB
7492006-07-18 Rob Browning <rlb@defaultvalue.org>
750
751 * continuations.c: Add __attribute__ ((returns_twice)) to the
752 ia64_getcontext prototype so that gcc will make the right
753 arrangements and avoid an illegal instruction during
754 call-with-current-continuation.
755
9a5fa6e9 7562006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
757
758 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
759 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
760
8ab3d8a0
KR
7612006-07-08 Kevin Ryde <user42@zip.com.au>
762
763 * environments.c (core_environments_unobserve): Use if/else rather
764 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
765 about them not being rvalues. Reported by Mike Gran.
766
767 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
768 portable and in particular fails on OpenBSD and AIX (see autoconf
769 manual too). Reported by Mike Gran.
770
7712006-06-25 Kevin Ryde <user42@zip.com.au>
772
773 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
774 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
775 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
776 HAVE_TM_ZONE.
777 (scm_strptime): Use tm_gmtoff from the strptime result when that field
778 exists, it's set by glibc strptime "%s".
779
9a5fa6e9 7802006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
781
782 * eq.c: Include "struct.h", "goops.h" and "objects.h".
783 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
784 are not GOOPS instances.
785 * struct.c: Include "eq.h".
786 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
787 hand-written code.
788 (scm_i_struct_equalp): New.
789 * struct.h (scm_i_struct_equalp): New declaration.
790
c862d0e0
KR
7912006-06-06 Kevin Ryde <user42@zip.com.au>
792
793 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
794 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
795 reported by Mattias Holm.
b4912378 796
c862d0e0
KR
7972006-06-03 Kevin Ryde <user42@zip.com.au>
798
799 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
800 unused variable warning when elisp disabled. Reported by Ryan
801 VanderBijl.
802
803 * throw.c (scm_handle_by_message): Add dummy return value to avoid
804 compiler warning on cygwin. Reported by Ryan VanderBijl.
805
806 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
807 duplicate of EXTRA_DOT_DOC_FILES.
808 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
809 Add scmconfig.h to dependencies, since these all run cpp. Helps a
810 parallel "make -j2". Reported by Mattias Holm.
811
8122006-05-30 Kevin Ryde <user42@zip.com.au>
813
814 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
815 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
816 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
817 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
818 port type descriptor, same as scm_make_port_type return value.
819
af4f8612
MV
8202006-05-30 Marius Vollmer <mvo@zagadka.de>
821
822 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
823 of the arguments is a array. This allows vectors to be equal to
824 one-dimensional arrays.
825
18bffcd0
MV
8262006-05-29 Marius Vollmer <mvo@zagadka.de>
827
828 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
829 that we have a pair before accessing its cdr. Thanks to Bill
830 Schottstaedt!
831
c862d0e0
KR
8322006-05-28 Kevin Ryde <user42@zip.com.au>
833
834 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
835 by "The Senator".
836
8372006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
838
839 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
840 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
841
c862d0e0
KR
8422006-05-26 Kevin Ryde <user42@zip.com.au>
843
844 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
845 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
846 Reported by "The Senator".
847 For select and ioctl, move fdes into those conditionals, to avoid
848 unused variable warning when neither of those used.
849
8502006-05-23 Kevin Ryde <user42@zip.com.au>
851
852 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
853 It's unused and will be in stdio.h anyway (if it's anywhere).
854
8552006-05-20 Kevin Ryde <user42@zip.com.au>
856
857 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
858 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
859
860 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
861 symlink). Probably can't create symlinks with mknod anyway though.
862
863 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
864 generation.
865
8662006-05-15 Kevin Ryde <user42@zip.com.au>
867
868 * simpos.c, simpos.h (scm_primitive__exit): New function.
869 (scm_primitive_exit): Update docstring, no longer the best exit after
870 a fork.
871
8722006-05-09 Kevin Ryde <user42@zip.com.au>
873
874 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
875 rather than converting to doubles, to avoid inf or nan when the inputs
876 are too big for a double but the quotient does fit. This affects
877 conversions exact->inexact of big fractions.
878
879 * filesys.c (scm_open_fdes): Use open64.
880 (scm_init_filesys): Add O_LARGEFILE.
881
882 * ports.c (scm_seek): Use lseek64.
883 (scm_truncate_file): Use ftruncate64.
884
4a342b19
MV
8852006-05-08 Marius Vollmer <mvo@zagadka.de>
886
887 * private-gc.h (CELL_P): Also check that the potential pointer is
888 correctly aligned for a cell. Thanks to Miroslav Lichvar!
889
c862d0e0
KR
8902006-04-18 Rob Browning <rlb@defaultvalue.org>
891
892 * _scm.h: Add back error if the size of off_t is unknown. The bug
893 was actually in guile-readline's configuration.
894
8952006-04-18 Kevin Ryde <user42@zip.com.au>
896
897 * posix.c (scm_mkstemp): Update docstring from the manual, in
898 particular file mode 0600 is not guaranteed.
899
281ab5e2
KR
9002006-04-17 Kevin Ryde <user42@zip.com.au>
901
902 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
903 size, to help the guile-readline build where off_t is unused.
904
2b829bbb
KR
9052006-04-16 Kevin Ryde <user42@zip.com.au>
906
907 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
908 (scm_readdir): Use readdir64.
909 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
910 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
911 and ftruncate take off_t not size_t.
912 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
913 available.
914
9152006-04-06 Kevin Ryde <user42@zip.com.au>
916
917 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 918 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
919
9202006-03-26 Marius Vollmer <mvo@zagadka.de>
921
922 * threads.c (get_thread_stack_base): Use scm_get_stack_base
923 instead of accessing __libc_stack_end directly, and only do this
924 when pthread_attr_getstack is known not to work for the main
925 thread or when not using pthreads at all.
926
927 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
928 unknown instead of returning NULL.
929
9a5fa6e9 9302006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
931
932 * numbers.c (scm_i_mem2number): Renamed to
933 scm_c_locale_stringn_to_number.
934 * numbers.c, print.c, read.c: Updated callers.
935 * numbers.h: Update function declaration.
936
9372006-03-11 Neil Jerram <neil@ossau.uklinux.net>
938
939 * unif.c (string_set): Don't return in a void function. (Reported
940 by Mike Gran.)
941
942 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
943 rather than void*, so we can do pointer arithmetic on it.
944 (Reported by Mike Gran.)
945 (s_scm_uniform_vector_write): Ditto.
946
9472006-03-10 Neil Jerram <neil@ossau.uklinux.net>
948
949 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
950 oldra is not an array. (Reported by Steve Juranich.)
951
952 * threads.c (do_unlock): Renamed from "unlock", which is defined
953 in unistd.h on QNX. (Reported by Matt Kraai.)
954
9552006-03-04 Kevin Ryde <user42@zip.com.au>
956
957 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
958 not SCM_CRITICAL_SECTION_START.
959
960 * eval.c, posix.c: Change comments from C++ to C style. Reported by
961 Mike Gran.
962
9632006-02-28 Kevin Ryde <user42@zip.com.au>
964
965 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
966
9672006-02-26 Kevin Ryde <user42@zip.com.au>
968
969 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
970 NAME_MAX is not available, which is so on Solaris 10. Report and help
971 by Bill Schottstaedt.
972
973 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
974 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
975 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
976 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
977 use "unsigned char", not signed char. This ensures comparisons are
978 the same as `char<?' etc, and is also the same as guile 1.6 did.
979 Reported by Sven Hartrumpf.
980
4a9f83ff
MD
9812006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
982
983 * random.c: Test for SCM_HAVE_T_UINT64 instead of
984 SCM_HAVE_T_INT64.
985 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
986 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
987 scm_t_int32.
988
29d8c124 9892006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
990
991 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
992 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
993 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
994 Take into account SEG->SPAN when computing CELLS_SWEPT.
995 (scm_i_sweep_segment): Take one more argument, similarly.
996 (scm_i_sweep_all_segments): Likewise.
997 (scm_i_sweep_some_segments): Likewise.
998 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
999 refer to SCM_GC_CELLS_COLLECTED.
1000
1001 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1002 argument, an `scm_i_sweep_statistics' object.
1003 Change the way DELTA is collected: don't take into account
1004 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1005
1006 * gc-malloc.c (scm_realloc): Pass an extra argument
1007 to `scm_i_sweep_all_segments ()'.
1008
1009 * gc.c (gc_start_stats): Updated accordingly.
1010 (gc_end_stats): Take an additional SWEEP_STATS argument.
1011 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1012 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1013 Decrement SCM_CELLS_ALLOCATED.
1014 (scm_i_gc): Likewise.
1015
1016 * private-gc.h (scm_i_sweep_*): Updated function
1017 prototypes accordingly.
1018 (scm_t_sweep_statistics): New type.
1019 (scm_i_sweep_statistics_init): New macro.
1020 (scm_i_sweep_statistics_sum): New macro
1021
9a5fa6e9 10222006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1023
1024 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1025 LEN. Without this, too much collectable memory gets unregistered,
1026 which results in an underflow of SCM_MALLOCATED in
1027 `decrease_mtrigger()'.
1028
1029 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1030 equal to SCM_MALLOCATED.
1031
10322006-02-13 Marius Vollmer <mvo@zagadka.de>
1033
1034 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1035 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1036 configured --without-threads.
1037 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1038
1aaa1c17
MV
10392006-02-12 Marius Vollmer <mvo@zagadka.de>
1040
1041 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1042 filling when the fill parameter is omitted, as documented, but
1043 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1044 can not store characters.
1045
d7c6575f
NJ
10462006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1047
1048 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1049 on to scm_fill_sockaddr call.
1050
43e01b1e
NJ
10512006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1052
1053 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1054 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1055
1056 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1057 (struct pre_unwind_data): New, replaces struct lazy_catch.
1058 (scm_c_catch): New, replaces scm_internal_catch as the primary
1059 catch API for C code; adds pre-unwind handler support.
1060 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1061 compatibility.
1062 (tc16_pre_unwind_data, pre_unwind_data_print,
1063 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1064 "lazy_catch" equivalents.
1065 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1066 as the primary C API for a "lazy" catch.
1067 (scm_internal_lazy_catch): Now just a wrapper for
1068 scm_c_with_throw_handler, for back compatibility.
1069 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1070 pre-unwind handler support.
1071 (scm_catch): Now just a wrapper for
1072 scm_catch_with_pre_unwind_handler, for back compatibility.
1073 (scm_with_throw_handler): New.
1074 (scm_lazy_catch): Update comment to say that the handler can
1075 return, and what happens if it does.
1076 (toggle_pre_unwind_running): New.
1077 (scm_ithrow): When identifying the throw target, take running
1078 flags into account. In general, change naming of things from
1079 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1080 don't unwind the dynamic context first. Add dynwind framing to
1081 manage the running flag of a throw handler. If a lazy catch or
1082 throw handler returns, rethrow the same exception again. Add
1083 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1084
1085 * root.c (scm_internal_cwdr): Add NULL args to
1086 scm_i_with_continuation_barrier call.
1087
1088 * dynwind.c: Change comment mentioning lazy-catch to mention
1089 pre-unwind data and throw handler also.
1090
1091 * continuations.h (scm_i_with_continuation_barrier): Add
1092 pre-unwind handler args.
1093
1094 * continuations.c (scm_i_with_continuation_barrier): Add
1095 pre-unwind handler args, and pass on to scm_c_catch (changed from
1096 scm_internal_catch).
1097 (c_handler): Remove scm_handle_by_message_noexit call.
1098 (scm_c_with_continuation_barrier): Call
1099 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1100 as the pre-unwind handler.
1101 (scm_handler): Remove scm_handle_by_message_noexit call.
1102 (s_scm_with_continuation_barrier): Call
1103 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1104 as the pre-unwind handler.
1105
2b829bbb
KR
11062006-02-04 Kevin Ryde <user42@zip.com.au>
1107
1108 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1109
72098928
KR
11102006-02-03 Kevin Ryde <user42@zip.com.au>
1111
1112 * list.c, list.h (scm_list): Restore this function for use from C.
1113 It's a complete no-op but in theory might used by someone.
1114
aa092c5d
MV
11152006-01-30 Marius Vollmer <mvo@zagadka.de>
1116
1117 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1118 so that it gets unlocked in all cases.
1119 (SCM_APPLY, CEVAL): Likewise.
1120
661ae7ab
MV
11212006-01-29 Marius Vollmer <mvo@zagadka.de>
1122
ee51ba31
MV
1123 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1124 scm_is_typed_array instead.
1125
661ae7ab
MV
1126 Renamed the "frames" that are related to dynamic-wind to "dynamic
1127 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1128 Updated documentation.
1129
99e370f6
MV
1130 Disabled "futures":
1131
1132 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1133 * eval.c, init.c: Comment out all 'future' related things.
1134
15ccf10b
MV
11352006-01-28 Marius Vollmer <mvo@zagadka.de>
1136
1137 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1138 to inline.h to make it inline.
1139
9a5fa6e9 11402005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1141
1142 * strings.c (scm_i_take_stringbufn): New.
1143 (scm_i_c_take_symbol): New.
1144 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1145
1146 * strings.h (scm_i_c_take_symbol): New.
1147 (scm_i_take_stringbufn): New.
1148
1149 * symbols.c (lookup_interned_symbol): New function.
1150 (scm_i_c_mem2symbol): New function.
1151 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1152 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1153 creating a new Scheme string.
1154 (scm_from_locale_symboln): Likewise.
1155 (scm_take_locale_symbol): New.
1156 (scm_take_locale_symboln): New.
1157
1158 * symbols.h (scm_take_locale_symbol): New.
1159 (scm_take_locale_symboln): New.
1160
2ca2ffe6
HWN
11612006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1162
1163 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1164 free_count.
1165
c255614e
HWN
11662005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1167
1168 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1169 upon error
1170
29295b0c
NJ
11712005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1172
9a5fa6e9 1173 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1174 the GC when allocated_fluids_len is zero.
1175
2824f4dc
NJ
11762005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1177
ec3a8ace
NJ
1178 * load.c (the_reader, the_reader_fluid_num): New.
1179 (scm_primitive_load): Support custom reader.
1180 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1181 the_reader as `current-reader'.
1182
2824f4dc
NJ
1183 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1184 (rather than an uninitialized pointer on the stack).
1185
d9c36d2a
MV
11862005-12-07 Marius Vollmer <mvo@zagadka.de>
1187
6a88895b
MV
1188 Reported by Bruce Korb:
1189
1190 * init.c (invoke_main_func): Don't call exit here. Throws that
1191 are only caught by scm_with_guile will bypass us and would cause
1192 scm_boot_guile to return erroneously.
1193 (scm_boot_guile): Expect scm_with_guile to return and call exit
1194 here, passing it an appropriate exit code.
1195
1196 From Andy Wingo:
d9c36d2a
MV
1197
1198 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1199 unsigned char cast to an int, or -1 for EOS.
1200
b54df254
MV
12012005-12-06 Marius Vollmer <mvo@zagadka.de>
1202
08f489c9
MV
1203 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1204 non-const.
9a5fa6e9 1205 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1206
b54df254
MV
1207 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1208 scm_enter_guile): Removed from public API. See comment at
1209 scm_without_guile for the rationale.
1210
1211 * scmsigs.c (read_without_guile): New.
1212 (signal_delivery_thread): Use it instead of
1213 scm_leave_guile/read/scm_enter_guile.
1214
9d9ce2b5
MV
1215 From Stephen Compall:
1216
1217 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1218 (CEVAL): Evaluate SRFI 61 cond clauses.
1219
9a5fa6e9 12202005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1221
1222 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1223 This was typically hit when running `gc-live-object-stats' right
1224 after starting Guile.
1225
efeac8ae
KR
12262005-11-30 Kevin Ryde <user42@zip.com.au>
1227
1228 * srfi-13.c (scm_string_append_shared): No copying if just one
1229 non-empty string in args.
1230
606183ba
KR
12312005-11-26 Kevin Ryde <user42@zip.com.au>
1232
1233 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1234 by Ludovic Courtès.
606183ba
KR
1235
1236 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1237 "register".
1238
1239 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1240 scm_malloc returning NULL, it never does that.
1241 * putenv.c (putenv): Likewise.
1242
1243 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1244 much too big to want to inline.
1245
9a5fa6e9 12462005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1247
1248 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1249 the value at its top. This fixes a reference leak.
1250 (PUSH_REF): Perform `pstate->top++' after calling
1251 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1252 effects.
1253
9a5fa6e9 12542005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1255
1256 * gc.c (scm_weak_vectors): Removed.
1257
f07d2b20
KR
12582005-11-12 Kevin Ryde <user42@zip.com.au>
1259
1260 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1261 by Ludovic Courtès.
f07d2b20 1262
bedd3f5f
MV
12632005-11-07 Marius Vollmer <mvo@zagadka.de>
1264
1265 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1266 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1267 section might exit non-locally.
1268
7c9c0169
NJ
12692005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1270
1271 * eval.c (sym_instead): New symbol.
1272 (ENTER_APPLY): Remove optional use of a continuation when making
1273 trap call.
1274 (scm_debug_opts): Change doc for 'cheap option to make clear that
1275 it is now obsolete.
1276 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1277 making trap calls, and implement substitution of eval expressions
1278 and return values using the values that the trap call handlers
1279 return.
1280
1281 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1282
9a5fa6e9 12832005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1284
1285 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1286 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1287 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1288 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1289 scm_c_make_socket_address): New functions.
1290 * socket.h: Add prototypes.
1291
fc9f596c
KR
12922005-10-24 Kevin Ryde <user42@zip.com.au>
1293
1294 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1295 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1296 POSIX spec examples, the latter are not available on for instance
1297 NetBSD.
1298
1299 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1300 posix.texi.
1301
1302 * stime.c (scm_strftime): Update docstring from posix.texi.
1303
0460c6e1
MV
13042005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1305
1306 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1307
1308 * null-threads.h, pthread-threads.h
1309 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1310 (scm_i_pthread_mutexattr_recursive): New.
1311
1312 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1313 (scm_i_critical_section_mutex): Do not initialize statically.
1314 (scm_threads_prehistory): Initialize
1315 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1316 here.
1317
1318 * eval.c (source_mutex): Do not initialiaze statically.
1319 (scm_init_eval): Do it here, using
1320 scm_i_pthread_mutexattr_recursive.
1321
7b4a9e52
MV
13222005-09-05 Marius Vollmer <mvo@zagadka.de>
1323
1324 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1325 New.
1326 (sym_reader): New.
1327 (scm_print_opts): Added "quote-keywordish-symbols" option.
1328 (quote_keywordish_symbol): New, for evaluating the option.
1329 (scm_print_symbol_name): Use it.
1330 (scm_init_print): Initialize new option to sym_reader.
1331
5defc05d
NJ
13322005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1333
1334 * eval.c (eval_letrec_inits): New.
1335 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1336
036482e9
MV
13372005-08-12 Marius Vollmer <mvo@zagadka.de>
1338
1339 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1340 Peter Gavin!
1341
5c347f8c
KR
13422005-08-12 Kevin Ryde <user42@zip.com.au>
1343
1344 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1345
bc721aa2
KR
13462005-08-06 Kevin Ryde <user42@zip.com.au>
1347
1348 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1349 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1350 scm_string_index, scm_string_index_right, scm_string_skip,
1351 scm_string_skip_right, scm_string_count, scm_string_map,
1352 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1353 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1354 procedures called in loops.
1355
126c81db
KR
13562005-08-02 Kevin Ryde <user42@zip.com.au>
1357
1358 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1359 avoid lots of copying where previoulsy growing by only 80 bytes at a
1360 time.
1361
7f278dc6
MV
13622005-08-01 Marius Vollmer <mvo@zagadka.de>
1363
1364 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1365 already have scm_lookup_closure_module, which does the same thing.
1366
cb5c4b07
MV
13672005-08-01 Marius Vollmer <mvo@zagadka.de>
1368
1369 New marking algorithm for weak hashtables that fixes the problem
1370 that references from the non-weak value to the associated weak
1371 key (for example) would prevent the entry from ever being dropped.
1372
1373 Guardians have been changed back to their original semantics and
1374 are no longer greedy and no longer drop cycles.
1375
1376 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1377 hashtable and guardian machinery but call the relevant functions
1378 directly.
1379
1380 * guardians.h, guardians.c, deprecated.h,
1381 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1382 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1383 Deprecated and moved into deprecated.[ch].
1384
1385 * guardians.h, guardians.c: Mostly rewritten.
1386 (scm_i_init_guardians_for_gc,
1387 scm_i_identify_inaccessible_guardeds,
1388 scm_i_mark_inaccessible_guardeds): New.
930888e8 1389 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1390
1391 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1392 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1393 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1394 (scm_weaks_prehistory): Removed.
1395 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1396 scm_i_mark_weak_vectors_non_weaks,
1397 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1398 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1399 scm_scan_weak_vectors): Removed.
1400
1401 * hashtab.h (scm_i_scan_weak_hashtables): New.
1402 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1403 SCM_WVECTF_NOSCAN.
1404 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1405 t->n_items.
1406 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1407 to latter. Do not scan the alists themselves, this is done by the
1408 weak vector code now. Just update the element count.
1409
1410 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1411 to latter. The type is now only part of the cell word.
1412 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1413
1414 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1415
3e2073bd
MD
14162005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1417
1418 Some changes towards making it possible to run Guile on the EM64T
1419 platform.
1420
1421 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1422 mallocating for (unsigned long *bounds).
1423
1424 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1425 scm_t_bits before storing them in the type word.
1426
1427 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1428 scm_t_bits to int.
1429
e8ac8e75
KR
14302005-07-12 Kevin Ryde <user42@zip.com.au>
1431
1432 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1433 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1434 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1435 than scm_makfrom0str.
1436 Reported by Ken Raeburn.
1437
1438 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1439 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1440 returning SCM_GC_CARD_BVEC.
1441
1442 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1443 rather than latin-1 acute accent, the latter may not print on all
1444 terminals.
1445
1446 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1447 trailing deletions, so as to return a substring if those are the only
1448 changes.
1449
adc0677d
KR
14502005-07-10 Kevin Ryde <user42@zip.com.au>
1451
1452 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1453 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1454 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1455 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1456
8fecbb19
HWN
14572005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1458
1459 * gc-card.c (scm_i_card_statistics): init tag.
1460
1461 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1462
fc9c5d06
HWN
14632005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1464
8fecbb19
HWN
1465 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1466 string.
fc9c5d06 1467
08fce816
KR
14682005-06-25 Kevin Ryde <user42@zip.com.au>
1469
1470 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1471 last change, use plain copy-on-write substrings, the individual
1472 descriptions in the srfi don't mention shared storage (only the
1473 introduction does).
1474
1475 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1476 null-terminator, rather than mallocing a whole new block.
1477 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1478
fc4abd0e
MV
14792005-06-12 Marius Vollmer <mvo@zagadka.de>
1480
e3da8a30
MV
1481 * ramap.c (scm_array_index_map_x): First test for real arrays,
1482 then check for generalized vectors. This ensures that the
1483 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1484 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1485 to access the target array, making these functions work with all
1486 kinds of arrays, not just bit arrays.
e3da8a30 1487
fc4abd0e
MV
1488 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1489 gh_list.c, gh_predicates.c: Deprecated everything.
1490
1491 * environments.c (environment_default_folder,
1492 environment_default_observer): Do not use gh_call3, gh_call1.
1493
e4da0740
HWN
14942005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1495
1496 * modules.c (s_scm_eval_closure_module): new function. Return the
1497 module inside an eval-closure.
1498
1499 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1500 table. This means that procedure properties are GC'd if the
1501 procedure dies.
1502
27667158
KR
15032005-06-11 Kevin Ryde <user42@zip.com.au>
1504
1505 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1506 charset cases, count chars kept and build a string in a second pass,
1507 rather than using a cons cell for every char kept. Use a shared
1508 substring when nothing removed (such sharing is allowed by the srfi).
1509
8a00ba71
HWN
15102005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1511
1512 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1513 string, so live object stats can be sorted with string<?.
1514
a677679f
MV
15152005-06-06 Marius Vollmer <mvo@zagadka.de>
1516
2ff668b0
MV
1517 * print.c (iprin1): When writing a string, collect all characters
1518 that can be printed directly into one call to scm_lfwrite.
1519 Previously, every character was output with its own call to
1520 write(2) on unbuffered ports.
1521
589f22f6
MV
1522 * eval.c (scm_eval_options_interface): Use
1523 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1524 and SCM_CRITICAL_SECTION_END.
1525
a677679f
MV
1526 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1527 check for generalized vectors. This ensures that the generalized
1528 vector case need only work with zero-origin ranges.
1529
f8cda9ee
KR
15302005-06-06 Kevin Ryde <user42@zip.com.au>
1531
1532 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1533 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1534 matched.
1535
cdac1be4
MV
15362005-06-05 Marius Vollmer <mvo@zagadka.de>
1537
6642f7ac
MV
1538 * eval.c: Added comment on how to make case 1.1 of
1539 r5rs_pitfall.test succeed.
1540
cdac1be4
MV
1541 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1542
1543 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1544
1545 * socket.c: Remove obsolete comment about socklen_t.
1546 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1547
1548 * numbers.h (isnan)[__MINGW32__]: Remove.
1549
1550 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1551 DEFAULT_INCLUDES when cross compiling.
1552
1553 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1554
a677679f 1555 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1556 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1557 from Jan's patch.)
1558
9e664475
MV
15592005-05-22 Marius Vollmer <mvo@zagadka.de>
1560
188d0c5e
MV
1561 * unif.c (scm_make_shared_array): Add old base to new base since
1562 scm_array_handle_pos does not include the base.
1563 (scm_aind): Likewise.
1564
9e664475
MV
1565 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1566 output port.
1567
5a6d139b
NJ
15682005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1569
1570 Mac OS X compile warning fixes, reported by Richard Todd.
1571
1572 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1573 that it is signed.
1574
1575 * strports.c (st_resize_port): Add unsigned char cast.
1576 (scm_mkstrport): Make read/write_buf cast unsigned.
1577
1578 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1579
1580 * rdelim.c (scm_read_line): Initialize slen.
1581
1582 * load.c (scm_search_path): Remove weird >=1, and add
1583 parentheses to clarify conditions.
1584
1585 * hash.c (scm_hasher): Add const unsigned char cast.
1586
1587 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1588
b01532af
NJ
15892005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1590
9a5fa6e9 1591 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1592
1593 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1594 code.
1595
1596 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1597 of code.
1598
1599 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1600 of code.
1601 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1602 and current.
1603
229a0710
NJ
16042005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1605
1606 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1607 compile warning reported by Werner Scheinast.
1608
645dd3fc
HWN
16092005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1610
80038021
HWN
1611 * list.h: remove scm_list()
1612
645dd3fc
HWN
1613 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1614 SCM_DEBUG_CELL_ACCESSES
1615 (FLUID_NEXT_LOC): idem.
1616
9a68a4a8
KR
16172005-04-30 Kevin Ryde <user42@zip.com.au>
1618
1619 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1620 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1621 zero when re==0 and im<0. Reported by Jean Crepeau.
1622
0640cdaa
KR
16232005-04-25 Kevin Ryde <user42@zip.com.au>
1624
1625 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1626 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1627 few sensible uses (like filling with a random number generator say),
1628 but has been allowed in the past and so should be kept.
0640cdaa 1629
c0b85e9c
KR
16302005-04-23 Kevin Ryde <user42@zip.com.au>
1631
1632 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1633 scm_hash_fn_remove_x.
1634
1635 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1636 the caller when cons* is reached through apply.
1637
1638 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1639 list is called using apply, under the debugging evaluator.
1640 (scm_list): Remove.
1641
c51682b4
KR
1642 * list.c, list.h (scm_make_list): New code, moving make-list from
1643 boot-9.scm.
8cb2eff8 1644
c0575bde
KR
16452005-04-14 Kevin Ryde <user42@zip.com.au>
1646
1647 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1648 converted from scheme code in boot-9.scm.
1649
47a298d9
KR
16502005-04-11 Kevin Ryde <user42@zip.com.au>
1651
1652 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1653 Validate list argument, scm_string_append and scm_string_append_shared
1654 don't do that to their rest argument (in a normal build).
1655
8ea3dc2e
MV
16562005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1657
1658 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1659 closure can not be stored since it is no longer valid at GC time.
1660 (make_hash_table): Initialize 'hash_fn' field.
1661 (scm_i_rehash): Only store hash_fn in hash table when closre is
1662 NULL.
1663 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1664 non-NULL. Always use a NULL closure.
1665 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1666 few entries.
1667
08d2020d
MV
16682005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1669
1670 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1671 argument; always use scm_delq_x. The delete_fn function works on
1672 the handle, not the key, and it therefore makes no sense to make
1673 it configurable. Changed all callers.
1674 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1675 (scm_hash_clear): Accept plain vectors as hashtables.
1676 (scm_delx_x): Removed.
1677
cb975c21
HWN
16782005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1679
1680 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1681 compatibility with gcc -std=c99.
1682
4c908f2c
MD
16832005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1684
1685 * async.h (scm_mask_ints): Removed left over reference to
1686 scm_root.
1687
1688 * threads.c: Removed fprintf debug statements.
1689
d193b04b
NJ
16902005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1691
1692 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1693
c29748cd
NJ
16942005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1695
1696 * debug.c (scm_make_memoized): Remove unnecessary critical
1697 section, and simplify by using SCM_RETURN_NEWSMOB.
1698
e654b062
MD
16992005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1700
1701 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1702
4bc6f1c6
KR
17032005-03-18 Kevin Ryde <user42@zip.com.au>
1704
1705 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 1706 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 1707
f1531813
KR
17082005-03-13 Kevin Ryde <user42@zip.com.au>
1709
1710 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1711 srfi-60.
1712
1713 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1714 because OR-ing bits into a negative can reduce the value to an inum.
1715
1716 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1717 casting inum to double since that can lose precision.
1718
a9fae247
MV
17192005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1720
1721 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1722 (guilify_self_1): Initialize it.
1723
1724 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1725 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1726 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1727 field.
1728 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1729 recursively.
1730 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1731 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1732 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1733 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1734 scm_after_gc_c_hook here.
1735 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1736 scm_after_gc_c_hook when a full GC has in fact been performed.
1737 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1738
1739 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1740 scm_gc_heap_lock.
1741
1742 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1743 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1744
1745 * inline.h (scm_cell, scm_double_cell): Do not check
1746 scm_gc_running_p, allocation during sweeping is OK.
1747
1748 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1749 not set scm_block_gc.
1750
1751 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1752
1753 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1754 instead of scm_malloc. The latter can not be used during GC.
1755
d1c38e11
MV
17562005-03-09 Marius Vollmer <mvo@zagadka.de>
1757
1758 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1759 years.
1760
99ec43c1
MV
17612005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1762
1763 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1764 scm_gc_running_p. Sweeping can happen in parallel with
1765 allocation.
1766
1767 * inline.h: Updated comments for current threading implementation.
1768
1769 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1770 (scm_i_thread): Removed unused signal_asyncs field.
1771 (threads_mark): Do not mark it.
1772 (guilify_self_1): Do not initialize it. Do initialize
1773 continuation_root field.
1774 (do_thread_exit): Do not remove thread from all_threads list.
1775 (on_thread_exit): Do it here, after leaving guile mode.
1776 (sleep_level): Removed.
1777 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1778 returning. Do not support recursive sleeps.
1779 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1780 entry. Do not support recursive sleeps.
1781
1782 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1783 resize_all_states): Collapsed ensure_state_size and
1784 ensure_all_state_sizes into one function named resize_all_states.
1785 Allocate new vectors outside of single threaded region. Do only
1786 simple things inside that region.
1787 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1788 while adding to the global lists.
1789
1790
461f34aa
MV
17912005-03-08 Marius Vollmer <mvo@zagadka.de>
1792
1793 libltdl is no longer distributed. We expect it to be installed
1794 already.
1795
1796 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1797 (libguile_la_LIBADD): Removed @LIBLTDL@.
1798
4e047c3e
MV
17992005-03-07 Marius Vollmer <mvo@zagadka.de>
1800
1801 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1802 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1803 they also block/unblock execution of asyncs and call
1804 scm_async_click which is declared in async.h but threads.h can not
1805 include async.h since async.h already includes threads.h.
1806 (scm_i_critical_section_level): New, for checking mistakes in the
1807 use of the SCM_CRITICAL_SECTION_* macros.
1808 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1809 critical sections can be nested.
1810
1811 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1812 not zero.
1813
1814 * threads.h, threads.c (scm_frame_lock_mutex): New.
1815 (scm_frame_critical_section): Take mutex as argument.
1816 (framed_critical_section_mutex): New, used as default for above.
1817 (scm_init_threads): Initialize it.
1818 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1819 scm_i_critical_section_mutex; both are initialized statically.
1820
1821 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1822 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
1823 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1824 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
1825
1826 * debug.c (scm_debug_options): Replace
1827 SCM_CRITICAL_SECTION_START/END with a frame and
1828 scm_frame_critical_section.
1829
1830 * continuations.c (scm_make_continuation): No longer a critical
1831 section.
1832 (scm_dynthrow): Abort when scm_i_critical_section_level is
1833 not zero.
1834
d0a45bff
MV
18352005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1836
db6673e5
MV
1837 * threads.c (scm_try_mutex): Renamed argument for consistency.
1838
d0a45bff
MV
1839 * root.c (scm_call_with_dynamic_root): New docstring.
1840
1841 * eval.c: Define _GNU_SOURCE.
1842
9de87eea
MV
18432005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1844
1845 Big merge from the mvo-thread-cleanup branch. The main changes
1846 are:
1847
1848 - The dynamic roots functionality has been split into dynamic
1849 states and continuations barriers. Fluids have been
1850 reimplemented and can now be garbage collected.
1851
1852 - Initialization of Guile now works in a multi-thread friendly
1853 manner. Threads can freely enter and leave guile mode.
1854
1855 - Blocking on mutexes or condition variables or while selecting
1856 can now be reliably interrupted via system asyncs.
1857
1858 - The low-level threading interface has been removed.
1859
1860 - Signals are delivered via a pipe to a dedicated 'signal delivery
1861 thread'.
1862
1863 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1864
1865 * throw.c (scm_handle_by_message): Exit only the current thread,
1866 not the whole process.
1867 (scm_handle_by_message_noexit): Exit when catching 'quit.
1868
1869 * scmsigs.c (take_signal, signal_delivery_thread,
1870 start_signal_delivery_thread, ensure_signal_delivery_thread,
1871 install_handler): Reimplemented signal delivery as explained in
1872 the comments.
1873
1874 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
1875 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
1876 scm_i_sched_yield, scm_i_pthread_sigmask,
1877 SCM_I_PTHREAD_MUTEX_INITIALIZER,
1878 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
1879 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
1880 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
1881 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
1882 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
1883 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
1884 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
1885 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
1886 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
1887 scm_i_pthread_key_create, scm_i_pthread_setspecific,
1888 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
1889 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
1890 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
1891 when using pthreads.
1892 * null-threads.c, null-threads.h: Provide dummy definitions for
1893 the above symbols when not using pthreads.
1894
1895 * modules.h, modules.c (scm_frame_current_module): New.
1896
1897 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
1898 instead of scm_internal_dynamic_wind.
1899
1900 * init.h, init.c (restart_stack, start_stack): Removed.
1901 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
1902 (scm_boot_guile_1): Removed.
1903 (scm_i_init_mutex): New.
1904 (really_cleanup_for_exit, cleanup_for_exit): New.
1905 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
1906 Moved around some init funcs. Call
1907 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
1908 with atexit.
1909
1910 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
1911 Use "!scm_is_eq" instead of "!=".
1912
1913 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
1914 SCM_USE_COOP_THREADS): Removed.
1915
1916 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
1917 maintained. Unlock scm_i_sweep_mutex before running
1918 scm_after_gc_c_hook.
1919 (scm_permanent_object): Allocate outside of critical section.
1920 (cleanup): Removed.
1921
1922 * fluids.h, fluids.c: Reimplemented completely.
1923 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
1924 SCM_FAST_FLUID_SET): Reimplemented as functions.
1925 (scm_is_fluid): New.
1926 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
1927 (scm_make_dynamic_state, scm_dynamic_state_p,
1928 scm_is_dynamic_state, scm_current_dynamic_state,
1929 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
1930 scm_c_with_dynamic_state, scm_with_dynamic_state,
1931 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
1932
1933 * feature.c (progargs_fluid): New.
1934 (scm_program_arguments, scm_set_program_arguments): Use it instead
1935 of scm_progargs.
1936 (scm_init_feature): Allocate it. Also, only add "threads" feature
1937 when SCM_USE_PTHREAD_THREADS is true.
1938
1939 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
1940 scm_make_rec_mutex, with all the consequences.
1941 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
1942 scm_internal_dynamic_wind. Handle dynamic states as second
1943 argument.
1944
1945 * threads.h, threads.c (scm_internal_select): Renamed to
1946 scm_std_select and discouraged old name.
1947 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
1948 and scm_std_usleep.
1949 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
1950 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
1951 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
1952 SCM_THREAD_DATA): Removed.
1953 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
1954 (scm_i_thread): New.
1955 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1956 Use scm_assert_smob_type.
1957 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
1958 scm_thread_self, scm_thread_yield, scm_mutex_init,
1959 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
1960 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
1961 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
1962 scm_cond_init, scm_cond_destroy, scm_cond_wait,
1963 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
1964 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
1965 scm_thread_select): Removed. Replaced with scm_i_pthread
1966 functions as appropriate.
1967 (scm_in_guile, scm_outside_guile): Removed.
1968 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
1969 take a ticket.
1970 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
1971 New.
1972 (scm_i_frame_single_threaded): New.
1973 (scm_init_threads_default_dynamic_state): New.
1974 (scm_i_create_thread): Removed.
1975 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
1976 (scm_make_recursive_mutex): New.
1977 (scm_frame_critical_section): New.
1978 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
1979 latter, changed all uses.
1980 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
1981 scm_i_set_last_debug_frame): New, use them instead of scm_root
1982 stuff.
1983 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
1984 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
1985 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
1986 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
1987 (remqueue): Allow the removal of already removed cells. Indicate
1988 whether a real removal has happened.
1989 (scm_thread): Removed, replaced with scm_i_thread.
1990 (make_thread, init_thread_creatant): Removed.
1991 (cur_thread): Removed.
1992 (block_self, unblock_from_queue): New.
1993 (block, timed_block, unblock): Removed.
1994 (guilify_self_1, guilify_self_2, do_thread_exit,
1995 init_thread_key_once, init_thread_key,
1996 scm_i_init_thread_for_guile, get_thread_stack_base,
1997 scm_init_guile): New initialisation method.
1998 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
1999 thread creation.
2000 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2001 "fair" to fat and implemented new semantics, including reliable
2002 interruption.
2003 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2004 (scm_threads_mark_stacks): Explicitly mark handle.
2005 (scm_std_select): Allow interruption by also selecting on the
2006 sleep_pipe.
2007 (scm_i_thread_put_to_sleep): Handle recursive requests for
2008 single-threadedness.
2009 (scm_threads_prehistory, scm_init_threads): Put current thread
2010 into guile mode via guileify_self_1 and guileify_self_2,
2011 respectively.
2012
2013 * fluid.h (SCM_FLUIDP): Deprecated.
2014
2015 * coop-threads.c: Removed.
2016
2017 * continuations.h, continuations.c (scm_with_continuation_barrier,
2018 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2019 New.
2020
2021 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2022 (async_mutex): New.
2023 (scm_async_click): Protected with async_mutex. Do not deal with
2024 signal_asyncs, which are gone. Set cdr of handled async cell to
2025 #f.
2026 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2027 current sleep.
2028 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2029 since that might not work during early initialization.
2030
2031 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2032 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2033 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2034 and SCM_CRITICAL_SECTION_END.
2035 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2036 SCM_CRITICAL_SECTION_START/END.
2037
2038 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2039 (libguile_la_SOURCES): Added null-threads.c
2040 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2041 threads-plugin.c.
2042 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2043
2044 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2045 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2046 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2047 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2048 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2049 scm_make_root): Removed or deprecated. Replaced with references
2050 to the current thread, dynamic state, continuation barrier, or
2051 some fluid, as appropriate.
2052 (root_mark, root_print): Removed.
2053 (scm_internal_cwdr): Reimplemented guts with
2054 scm_frame_current_dynamic_state and
2055 scm_i_with_continuation_barrier.
2056 (scm_dynamic_root): Return current continuation barrier.
2057
2058
ad3d5a65
MV
20592005-02-28 Marius Vollmer <mvo@zagadka.de>
2060
2061 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2062 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2063 cleanliness.
2064 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2065 IP_DROP_MEMBERSHIP.
2066 Thanks to Greg Troxel!
2067
73a90115
MD
20682005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2069
2070 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2071 block.
2072
5d2cb3ab
MV
20732005-02-25 Marius Vollmer <mvo@zagadka.de>
2074
2075 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2076 so that no two weak alist vectors share a spine.
2077 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2078 during GC before inserting the new alist cell.
2079
838c4126
MV
20802005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2081
2082 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2083 the hashtable.
2084 (scm_hash_fn_create_handle_x): Likewise.
2085 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2086
29fed193
MD
20872005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2088
2089 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2090 the prototypical examples mentioned in the old reference manual.
2091 Instead keep the old semantics of dispatching on type. (Yes, this
2092 is extremely ugly, but the whole point of keeping the deprecated
2093 interface is not to break old code.)
2094
9cc49060
MD
20952005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2096
2097 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2098 scm_i_array_dims.
2099
8447f463
KR
21002005-01-28 Kevin Ryde <user42@zip.com.au>
2101
2102 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2103 integer-expt and multiply/divide. Inexacts and fractions no longer
2104 supported (they happened to work before for left shifts, but not
2105 right). Don't really need inexacts and fractions, since ash is
2106 documented as a "bitwise operation", and all the rest of those only
2107 take exact integers.
2108
1367aa5e
HWN
21092005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2110
856fca7e
HWN
2111 * gc-card.c (scm_i_card_statistics): map structs, closures and
2112 subrs to one tag.
2113
1367aa5e 2114 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2115 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2116
2117 * gc-segment.c (scm_i_all_segments_statistics): new function.
2118 (scm_i_heap_segment_statistics): new function
2119
2120 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2121 statistics on the number of live objects of each type.
2122
2123 * gc-card.c (scm_i_tag_name): new function.
2124 (scm_i_card_statistics): new function.
2125
333db3b8
KR
21262005-01-24 Kevin Ryde <user42@zip.com.au>
2127
2128 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2129 POSIX and C99 don't document errno being set. Reported by Bruno
2130 Haible.
2131 (scm_flock): Update docstring from manual.
2132
8447f463
KR
2133 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2134 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2135 a 64-bit system.
2136
2137 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2138 sa_handler, needs to be a long on 64-bit systems where int is only 32
2139 bits.
2140
88f59e53
MV
21412005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2142
0eeb2611
MV
2143 * environments.c (obarray_enter, obarray_replace): Call
2144 SCM_HASHTABLE_INCREMENT when adding a new entry.
2145
88f59e53
MV
2146 * objects.c: Include goops.h for the scm_class_of prototype.
2147
2148 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2149 sizes to be smaller than the maximum lengths of vectors.
2150
219b2868
MV
21512005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2152
2153 * ports.c, smob.c: Include "libguile/goops.h".
2154
2155 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2156 scm_class_char, scm_class_pair, scm_class_procedure,
2157 scm_class_string, scm_class_symbol,
2158 scm_class_procedure_with_setter, scm_class_primitive_generic,
2159 scm_class_vector, scm_class_null, scm_class_real,
2160 scm_class_complex, scm_class_integer, scm_class_fraction,
2161 scm_class_unknown, scm_port_class, scm_smob_class,
2162 scm_no_applicable_method, scm_class_of): Moved from objects to
2163 goops since they are only useable once goops has been loaded.
2164 (scm_classes_initialized): Removed.
2165 (scm_class_of): Do not check it.
2166 (create_standard_classes): Do not set it.
2167
009c6b9c
MV
21682005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2169
50472546
MV
2170 * objects.h, objects.c (scm_classes_initialized): New.
2171 (scm_class_of): Signal error when scm_classes_initialized is zero.
2172 * goops.c (create_standard_classes): Set scm_classes_initialized
2173 to one.
2174
009c6b9c
MV
2175 * random.c (scm_random_solid_sphere_x): Use
2176 scm_c_generalized_vector_length instead of
2177 scm_uniform_vector_length.
2178
7719cbe9
MV
21792005-01-16 Marius Vollmer <mvo@zagadka.de>
2180
2181 * script.c (scm_compile_shell_switches): Removed debugging output.
2182
1ec44fed
KR
21832005-01-15 Kevin Ryde <user42@zip.com.au>
2184
2185 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2186 docstrings from manual.
2187 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2188
6e4cd850
MV
21892005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2190
0b5a0521
MV
2191 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2192 its value.
2193
2194 Implement u64 and s64 uniform numeric vectors with bignums when
2195 scm_t_uint64 and scm_t_int64 are not available.
2196
2197 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2198 scm_array_handle_u64_elements,
2199 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2200 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2201 is not available.
2202 (scm_take_s64vector, scm_array_handle_s64_elements,
2203 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2204 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2205 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2206 scm_t_int64/scm_t_uint64 are not available.
2207 (uvec_mark): New, to mark the bignums.
2208 (alloc_uvec): Initialize bignums.
2209 (uvec_fast_ref): Return bignums directly.
2210 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2211 assert_exact_integer): New.
2212 (uvec_fast_set): Use them to validate the bignums.
2213 (scm_init_srfi_4): Set mark function of smob when needed.
2214 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2215 scm_int64_max.
2216
6e4cd850
MV
2217 Recognize 1.4 -e syntax.
2218
2219 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2220 (scm_compile_shell_switches): Use them to recognize and convert
2221 1.4 "-e" syntax.
2222
3b698afe
MV
22232005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2224
2225 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2226 deprecated features that once were macros but are now functions
2227 back into macros.
2228
d6dc83a9
MV
22292005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2230
49086691
MV
2231 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2232 * deprecation.c (scm_issue_deprecation_warning,
2233 scm_c_issue_deprecation_warning_fmt): Use it.
2234 (mode): Removed.
2235 (print_summary): New.
2236 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2237 mode.
2238
d6dc83a9
MV
2239 Deprecated SCM_ARRAY* macros.
2240
2241 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2242 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2243 version. Changed all uses.
2244 (scm_tc16_array, scm_i_tc16_array,
2245 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2246 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2247 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2248 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2249 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2250 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2251 SCM_ARRAY_V, SCM_I_ARRAY_V,
2252 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2253 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2254 scm_t_array, scm_i_t_array): Likewise.
2255 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2256 Moved from unif.h to unif.c.
2257 (scm_c_array_rank): New.
2258 (scm_array_rank): Reimplement using it.
2259
2260 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2261 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2262 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2263
dc91d8de
MV
22642005-01-11 Marius Vollmer <mvo@zagadka.de>
2265
2266 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2267 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2268 scm_c_generalized_vector_ref and scm_cvref, and
2269 scm_c_generalized_vector_set_x, respectively.
2270 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2271 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2272
2273 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2274 former to latter and made public. Changed all uses.
2275 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2276 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2277 (scm_i_shap2ra): New internal version of scm_shap2ra.
2278 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2279 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2280 (scm_ra_set_contp): Deprecated, changed all uses to
2281 scm_i_ra_set_contp.
2282 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2283
66d33784
MV
22842005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2285
b06f099d
MV
2286 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2287 Trotts!
2288
5d35ad81
MV
2289 * unif.c (scm_list_to_typed_array): Allow the specification of the
2290 upper bound as well. This is needed for empty arrays.
2291 (l2ra): Give needed number of elements in error message.
2292 (scm_i_print_array): Print length information for arrays that need
2293 it.
2294 (scm_i_read_array): Parse it.
2295
66d33784
MV
2296 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2297 scm_i_object_chars, scm_i_object_length): Brought back from the
2298 dead.
2299
d7d7d401
MV
23002005-01-10 Marius Vollmer <mvo@zagadka.de>
2301
74c58fce
MV
2302 * ramap.c: Replaced single-index uses of scm_array_set_x with
2303 scm_c_generalized_vector_set_x.
2304
d7d7d401
MV
2305 * unif.c (scm_array_rank, scm_array_dimensions,
2306 scm_shared_array_offset, scm_shared_array_increments,
2307 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2308 to simplify code and make it more general.
2309 (scm_shared_array_root): Work with all kinds of arrays, including
2310 naked vectors.
2311 (indices_to_pos): New.
74c58fce
MV
2312 (scm_make_shared_array): Use it instead of scm_aind; use handle
2313 for oldra.
2314
4475d3fe
KR
23152005-01-10 Kevin Ryde <user42@zip.com.au>
2316
2317 * posix.c (scm_mkstemp): Update docstring from manual.
2318
d3ddc95e
KR
2319 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2320
8c8491f5
MV
23212005-01-09 Marius Vollmer <mvo@zagadka.de>
2322
b89ecc6f
MV
2323 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2324 scm_i_uniform_vector_set_proc): New.
2325 (u8ref, u8set, s8ref, s8set, etc): New.
2326 (uvec_reffers, uvec_setters): New.
2327 (uvec_to_list): Use generic scm_array_handle_ref instead of
2328 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2329 (coerce_to_uvec, scm_c_uniform_vector_ref,
2330 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2331
2332 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2333 New.
2334 (scm_t_array_handle): Added ref, set, elements and
2335 writable_elements for fast inline operation of
2336 scm_array_handle_ref and scm_array_handle_set.
2337 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2338 and replaced with inline code that simply calls the ref/set
2339 members of the handle.
2340 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2341 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2342 New.
2343 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2344 and memoize_set.
2345 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2346 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2347 scm_bit_invert_x): Correctly multiply index with increment in the
2348 general case.
2349
8c8491f5
MV
2350 * unif.c (scm_array_handle_set): Correctly execute only one
2351 alternative. D'Oh!
2352 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2353 the array; this covers all cases with much simpler code.
2354
2355 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2356 as well.
2357
cd5d55c7
MV
23582005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2359
2360 * srfi-4.c (uvec_type): New.
2361 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2362 scm_c_uniform_vector_x): Use it to get concrete type.
2363
2364 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2365 fit the docs.
2366
2367 * unif.c (ra2l): Handle zero rank arrays.
2368 (scm_i_print_array): Print zero rank arrays specially.
2369 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2370 (scm_i_read_array): Allow zero rank arrays.
2371
a4aad74e
MV
23722005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2373
2374 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2375 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2376 and SCM_SET_HASHTAB_BUCKET.
2377
2378 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2379 Removed ref_stack field.
2380 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2381 of a print state. Use them everywhere instead of ref_stack.
2382
3a40d5e1
MV
2383 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2384
a4aad74e
MV
2385 * srfi-4.c: Include deprecation.h.
2386
2387 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2388 deprecated.c, eq.c
2389 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2390 (scm_vector_elements, scm_vector_writable_elements,
2391 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2392 unif.[hc].
2393 (SCM_SIMPLE_VECTOR_LOC): Removed.
2394 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2395 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2396 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2397 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2398 latter. Changed use in eq.c.
2399
f01fe441
MV
24002005-01-07 Marius Vollmer <mvo@zagadka.de>
2401
2402 Make the uniform vector routines also deal with one dimensional
2403 arrays.
2404
2405 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2406 SCM_SMOB_PREDICATE in this file.
2407 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2408 of the right type.
2409 (scm_is_uniform_vector): Likewise.
2410 (uvec_fast_ref): Made BASE param const.
2411 (uvec_writable_elements, uvec_elements): New.
2412 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2413 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2414 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2415 arrays.
2416 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2417 argument convention.
2418 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2419 checking.
2420 (scm_uniform_vector_length): Use uvec_length.
2421
2aaf5726
MV
24222005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2423
2424 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2425 scm_c_uniform_vector_size): Removed.
2426 (scm_array_handle_uniform_element_size): New.
2427
2428
2429 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2430 type of POS parameter to be signed, positions can be negative.
2431 (scm_array_handle_release): New, changed all uses of
2432 scm_t_array_handle to properly call it.
2433 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2434 Renamed former to latter, changed all uses.
2435
34ae52fc
MV
24362005-01-05 Marius Vollmer <mvo@zagadka.de>
2437
2438 Updated bitvector routines to also use scm_t_array_handles.
2439
2440 * unif.h (scm_bitvector_elements,
2441 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2442 deliver offset, length and increment to caller. Changed all uses.
2443 (scm_bitvector_release_elements,
2444 scm_frame_bitvector_release_elements,
2445 scm_bitvector_release_writable_elements,
2446 scm_frame_bitvector_release_writable_elements): Removed.
2447 (scm_array_handle_bit_elements,
2448 scm_array_handle_bit_writable_elements,
2449 scm_array_handle_bit_elements_offset): New.
2450 (scm_make_typed_array): The special value for non-initialized
2451 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2452 was a valid value to fill bitvectors with, so it can't really be
2453 specialed out.
2454
c4cb7628
KR
24552005-01-04 Kevin Ryde <user42@zip.com.au>
2456
2457 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2458 Reported by Bill Schottstaedt.
2459
0356881d
MV
24602005-01-02 Marius Vollmer <mvo@zagadka.de>
2461
2462 * sort.c (quicksort): Added INC parameter for non-contigous
2463 vectors.
2464 (quicksort1): New, for contigous vectors. Both functions are
2465 generated from the same code by including "quicksort.i.c".
2466 (scm_restricted_vector_sort_x): Call one of quicksort and
2467 quicksort1, depending on increment of vector.
2468 (scm_sort): Simply call scm_sort_x on a copy of the list or
2469 vector.
2470 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2471 size_t, added inc parameter.
2472 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2473 so that it doesn't leak.
2474 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2475 list or vector.
2476
2477 * ramap.c (scm_array_map_x): Do not try to convert fill value
2478 before filling, any necessary conversion is done while storing.
2479
2480 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2481 doing it inline.
2482
2483 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2484 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2485 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2486
2487 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2488 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2489 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2490 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2491 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2492 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2493 vector elements API or simple vector API, as appropriate. Removed
2494 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2495 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2496
2497 * srfi-4.h, srfi-4.c,
2498 srfi-4.i.c (scm_array_handle_uniform_elements,
2499 scm_array_handle_uniform_writable_elements,
2500 scm_uniform_vector_elements,
2501 scm_uniform_vector_writable_elements):
2502 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2503 scm_t_array_handle, deliver length and increment.
2504 (scm_array_handle_<foo>_elements,
2505 scm_array_handle_<foo>_writable_elements): New.
2506
2507 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2508 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2509
2510 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2511 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2512 scm_array_handle_set, scm_array_handle_elements
2513 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2514 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2515 scm_dimensions_to_uniform_array): Deprecated for real.
2516 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2517 snarfing wont allow a mismatch between C and Scheme arglists.
2518 (scm_make_shared_array, scm_enclose_array): Correctly use
2519 scm_c_generalized_vector_length instead of
2520 scm_uniform_vector_length.
2521
2522 * validate.h (SCM_VALIDATE_VECTOR,
2523 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2524 of SCM_VECTORP.
2525
2526 * weaks.h, weaks.c: Use new internal weak vector API from
2527 vectors.h.
2528
2529 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2530 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2531 'extra' to being regular sources.
2532 (noinst_HEADERS): Added quicksort.i.c.
2533 * quicksort.i.c: New file.
2534
2535 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2536 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2537 and reimplemented. Replaced all uses with scm_vector_elements,
2538 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2539 appropriate.
2540 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2541 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2542 SCM_SIMPLE_VECTOR_LOC): New.
2543 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2544 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2545 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2546 Removed.
2547 (scm_vector_copy): New.
2548 (scm_vector_elements, scm_vector_writable_elements): Use
2549 scm_t_array_handle, deliver length and increment. Moved to
2550 unif.h. Changed all uses.
2551 (scm_vector_release_elements,
2552 scm_vector_release_writable_elements,
2553 (scm_frame_vector_release_elements,
2554 scm_frame_vector_release_writable_elements): Removed.
2555 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2556 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2557 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2558 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2559 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2560 weak vectors.
2561
0336d18b
MV
25622004-12-29 Marius Vollmer <mvo@zagadka.de>
2563
2564 No longer use creators to specify the type of an array. Creators
2565 expose the fact that arrays are wrapped around vectors, but that
2566 might change.
2567
2568 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2569 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2570 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2571 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2572 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2573 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2574 uvec_proc_vars): Removed.
2575 (scm_i_generalized_vector_creator): Removed.
2576 (scm_i_generalized_vector_type): New.
2577
2578 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2579 scm_make_typed_array, scm_array_type, scm_list_to_array,
2580 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2581 (scm_array_creator): Removed.
2582 (scm_array_p): Deprecated second PROT argument.
2583 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2584 Deprecated, reimplemented in terms of scm_make_typed_array and
2585 scm_list_to_typed_array.
2586 (scm_i_proc_make_vector, scm_i_proc_make_string,
2587 scm_i_proc_make_bitvector): Removed.
2588 (type_creator_table, init_type_creator_table, type_to_creator,
2589 make_typed_vector): New.
2590 (scm_i_convert_old_prototype): Removed.
2591 (prototype_to_type): New.
2592 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2593 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2594 minor added clarity.
2595 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2596 instead of scm_make_uve.
2597 (tag_creator_table, scm_i_tag_to_creator): Removed.
2598 (tag_to_type): New.
2599 (scm_i_read_array): Use scm_list_to_typed_array instead of
2600 scm_list_to_uniform_array.
2601
277e8472
MV
26022004-12-27 Marius Vollmer <mvo@zagadka.de>
2603
32b26202
MV
2604 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2605 (scm_bitvector_writable_elements): New.
2606 (scm_bitvector_release, scm_bitvector_release_elements):
2607 Renamed former to latter. Added explicit call to
2608 scm_remember_upto_here_1.
2609 (scm_frame_bitvector_release,
2610 scm_frame_bitvector_release_elements): Renamed former to latter.
2611 (scm_bitvector_release_writable_elements,
2612 scm_bitvector_release_writable_elements): New.
2613 Changed all uses as required by the changes above.
2614
2615 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2616 scm_u8vector_elements, etc): Made return value "const".
2617 (scm_uniform_vector_writable_elements,
2618 scm_u8vector_writable_elements, etc): New.
2619 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2620 Renamed former to latter. Added explicit call to
2621 scm_remember_upto_here_1.
2622 (scm_frame_uniform_vector_release,
2623 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2624 (scm_uniform_vector_release_writable_elements,
2625 scm_frame_uniform_vector_release_writable_elements): New. Takes
2626 crown of longest identifier yet.
2627 Changed all uses as required by the changes above.
2628
277e8472
MV
2629 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2630 void.
2631 (scm_is_vector, scm_vector_p, scm_vector_length,
2632 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2633 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2634 scm_vector_move_left_x, scm_vector_move_right_x,
2635 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2636 (scm_vector_elements, scm_vector_release_elements,
2637 scm_vector_frame_release_elements, scm_vector_writable_elements,
2638 scm_vector_release_writable_elements,
2639 scm_vector_frame_release_writable_elements): New.
2640 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2641 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2642
2643 * ramap.c (scm_ramapc, scm_raeql): Use
2644 scm_c_generalized_vector_length instead of
2645 scm_uniform_vector_length.
2646 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2647 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2648
49c51610
MV
26492004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2650
2651 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2652 member for relocating debug frames.
2653 (scm_make_continuation): Set it.
2654
2655 * stacks.c (read_frame, read_frames, scm_make_stack,
2656 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2657 of continuations instead of calculating the offset ourselves.
2658 Relocate 'vect' member of scm_t_debug_frame.
2659
3b2ee265
KR
26602004-12-16 Kevin Ryde <user42@zip.com.au>
2661
2662 * ramap.c (scm_array_map_x): Check for at least one source argument.
2663
e120686a
KR
26642004-12-14 Kevin Ryde <user42@zip.com.au>
2665
2666 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2667 the C code so for the final call to the predicate procedure is a tail
2668 call, per SRFI-13 spec.
2669
680b5237
KR
26702004-12-10 Kevin Ryde <user42@zip.com.au>
2671
2672 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2673 recent revision to the reference manual.
2674
2675 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2676 with "%", C99 says it's well-defined.
2677
2678 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2679 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2680 bother trying to fit scm_from_ulong, not really worth the trouble if
2681 addresses are more than 4 bytes usually.
2682
446d320c
KR
26832004-11-30 Kevin Ryde <user42@zip.com.au>
2684
2685 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2686 arm32. Reported by Greg Troxel.
2687
f2654760
MV
26882004-11-14 mvo <mvo@zagadka.de>
2689
2690 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2691
2692 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2693
d550e35f
MV
26942004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2695
2696 Enclosed arrays are now their own smob. This has been done to
2697 make the code more explicit about them and to prepare for the time
f2654760
MV
2698 when generalized vectors include arbitrary one-dimensional
2699 arrays. (Uptonow, enclosed arrays have been recognized by their
2700 use of an array as their storage 'vector'. When all generalized
2701 vectors are allowed as storage, including one-dimensional arrays,
2702 this will no longer work.)
d550e35f
MV
2703
2704 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2705 New.
2706 (exactly_one_third, singp): Removed.
2707 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2708 scm_shared_array_offset, scm_shared_array_increments): Handle
2709 enclosed arrays explicitely.
2710 (scm_array_rank): Likewise. Also, do not return zero for
2711 non-arrays, signal an error instead since arrays with rank zero do
2712 exist.
2713 (scm_i_make_ra): New, for specifying the tag of the new array.
2714 (scm_make_enclosed_array): Use it.
2715 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2716 (scm_make_shared_array): Use scm_c_generalized_vector_length
2717 instead of scm_uniform_vector_length.
2718 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2719 (scm_i_cvref): New, doing the job of scm_cvref.
2720 (scm_cvref): Use scm_i_cvref.
2721 (scm_array_ref): Do not accept non-arrays when no indices are
2722 given. Use scm_i_cvref to do the actual access.
2723 ("uniform-array-set1"): Do not register.
2724 (scm_array_set_x, scm_uniform_array_read_x,
2725 scm_uniform_array_write): Handle enclosed arrays explicitly.
2726 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2727 handle enclosed arrays.
2728 (scm_array_to_list): Handle enclosed arrays explicitly.
2729 (rapr1): Removed.
2730 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2731 enclosed arrays.
2732 (scm_i_print_enclosed_array): New.
2733 (tag_proto_table, tag_creator_table): Renamed former to latter.
2734 Added "a" and "b" for strings and bitvectors, resp.
2735 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2736 latter. Tag "a" is in the table now, no need to handle it as a
2737 legacy tag.
2738 (scm_raprin1): Just call scm_iprin1.
2739 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2740 explicitly.
2741 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2742 Use scm_i_print_array as printer for scm_tc16_array.
2743
2ed34885
MV
27442004-11-10 Marius Vollmer <mvo@zagadka.de>
2745
823086c1
MV
2746 * ramap.c (cind): Changed second arg to be pointer to long instead
2747 of uniform vector.
2748 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 2749 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
2750 (scm_array_index_map_x): Likewise.
2751
2752 * unif.c: Changed all uses of scm_array_prototype to
2753 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2754 prototype is known.
2755 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2756 in terms of scm_uniform_vector_read_x and
2757 scm_uniform_vector_write, respectively. Strings and
2758 bitvector support has been dropped.
2759
2ed34885
MV
2760 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2761 needed files directly. Include config.h, <unistd.h> and <io.h>
2762 when available.
2763 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2764
2c72f253
MV
27652004-11-09 Marius Vollmer <mvo@zagadka.de>
2766
2767 * gh_data.c (gh_uniform_vector_length): Properly use
2768 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2769
3cc0a296
MV
27702004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2771
2772 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2773 New.
2774 (scm_i_uniform_vector_creator): Removed.
2775 (scm_i_generalized_vector_creator): New.
2776 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2777 handle generalized vectors, only uniform numeric vectors.
2778 (alloc_uvec): Do length check here...
2779 (make_uvec): ...but not here.
2780 (coerce_to_uvec): Use new generalized vector functions to handle
2781 all kinds of vectors in one go.
2782
2783 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2784 remaining scm_tc7_unused tags to get a neatly ordered list.
2785
2786 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2787 longer handle scm_tc7_bvect bitvectors.
2788
2789 * ramap.c: Use the new generalized vector functions to handle all
2790 vector like things.
2791
2792 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2793 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2794 scm_generalized_vector_length, scm_generalized_vector_ref,
2795 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2796 scm_is_generalized_vector, scm_c_generalized_vector_length,
2797 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2798 New.
2799
2800 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2801 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2802 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2803 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2804 scm_c_bitvector_length, scm_c_bitvector_ref,
2805 scm_c_bitvector_set_x, scm_bitvector_elements,
2806 scm_bitvector_release, scm_frame_bitvector_release,
2807 scm_tc16_bitvector, bitvector_free, bitvector_print,
2808 bitvector_equalp, count_ones, find_first_one): New.
2809 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2810 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2811 using the new C API for bitvectors and maybe count_ones or
2812 find_first_one, as appropriate.
2813 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2814 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2815 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2816 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2817 new functions from above.
2818 (scm_i_proc_make_vector, scm_i_proc_make_string,
2819 scm_i_proc_make_bitvector): Made non-static for use in
2820 scm_i_generalized_vector_creator.
2821 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2822 (scm_make_uve): Validate that the created object is a generalized
2823 vector.
2824 (scm_i_legacy_tag): Removed.
2825 (scm_i_print_array): Do it here.
2826 (scm_raprin1): Only print enclosed arrays.
2827
2828 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2829
c24d026b
MV
28302004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2831
1f2328fe
MV
2832 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2833 added portability.
2834
2835 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2836 for "space". Thanks to Bruce Korb!
2837
c24d026b
MV
2838 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2839 only after dest has been set. Thanks to Hyper Division!
2840
2841 * gh_data.c (gh_uniform_vector_length): Use
2842 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2843
d4ea47c8
MV
28442004-11-03 Marius Vollmer <mvo@zagadka.de>
2845
2846 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2847 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2848 SCM_SET_UVECTOR_LENGTH): Removed.
2849
236288e2
MV
28502004-11-02 Marius Vollmer <mvo@zagadka.de>
2851
9a5fa6e9 2852 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
2853 Thanks!
2854
2855 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2856 first and the second line of the SCM_DEFINE macro call, since old
2857 preprocessors cannot handle definitions that are split into two
2858 lines.
2859
2860 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2861 declarations.
2862
2863 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2864 scm_t_uint32 to fix the mismatch between the function declaration
2865 and definition.
2866
2867 * sort.c (quicksort): Don't use C99 variable declarations.
2868
2869 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2870 SCM_BOOL_F if no type matches.
2871
2872 * threads.c (thread_print): Cast a pointer to size_t when printing
2873 with scm_uintprint.
2874
2875 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
2876 defined.
2877 (scm_array_prototype): Deprecated.
2878
f738b51d
MV
28792004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2880
5d1015ec
MV
2881 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
2882 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
2883 more efficient access to the u32vector.
2884
034486df
MV
2885 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
2886 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
2887 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
2888
2889 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
2890 instead of the old-style dvectors.
2891
2892 * gh_data.c: Use new-style uniform arrays in place of old-style
2893 ones.
2894
2895 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
2896 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
2897
2898 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
2899 instead of old-sytle uvectors.
2900
2901 * convert.c, convert.i.c: Rewritten completely, using
2902 scm_any_to_u8vector, etc and other new-style uniform vector
2903 functions.
2904
2905 * random.c (scm_random_solid_sphere_x,
2906 scm_random_hollow_sphere_x): Do not validate vector argument, this
2907 is already done elsewhere.
2908
2909 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
2910 scm_any_to_u8vector, etc): New.
2911 (scm_uniform_element_size, scm_uniform_vector_length): Do no
2912 longer handle old-style uniform vectors.
2913
f738b51d
MV
2914 * read.c (scm_lreadr): Bugfix: include the last bit in the
2915 bit vector.
2916
5e9c05a1
MV
29172004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2918
327114a2
MV
2919 * unif.h, unif.c (scm_array_creator): New.
2920 (scm_i_get_old_prototype): New.
2921 (scm_array_prototype): use it to return old-style prototype, never
2922 return creators.
2923 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
2924 arg of SCM_UNDEFINED. The latter is wrong.
2925
5e9c05a1
MV
2926 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
2927 (make_uve): Removed.
2928 (scm_i_proc_make_vector, scm_i_proc_make_string,
2929 scm_i_proc_make_u1vector): New.
2930 (scm_init_unif): Initialize them.
2931 (scm_i_convert_old_prototype): New.
2932 (scm_make_uve): Use it to get the creator procedure. Removed all
2933 old code that created old-style uniform vectors.
2934 (scm_array_p): Handle generic vectors.
2935 (scm_dimensions_to_uniform_array): Do not fill new array with
2936 prototype when that is a procedure.
2937 (scm_list_to_uniform_array): Also accept a list of lower bounds as
2938 the NDIM argument.
2939 (scm_i_print_array): Print rank for shared or non-zero-origin
2940 vectors.
2941 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
2942 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
2943 which I do not understand yet.
2944 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 2945
5e9c05a1
MV
2946 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
2947 (iflo2str): Use icmplx2str for complex numbers.
2948
2949 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
2950 scm_i_uniform_vector_prototype): Removed.
2951 (scm_i_uniform_vector_creator): New.
2952 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
2953 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
2954 Updated all tables and generic functions to support them.
2955 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
2956 (scm_init_srfi_4): Initialize them.
2957
2958 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
2959 sizeof(CTYPE) as explained in the comment.
2960
2961 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 2962 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
2963 'i' and 'e' between introducing numbers and uniform vectors. Do
2964 not call scm_i_read_homogenous_vector, since that is also handled
2965 by scm_i_read_array now.
2966
f984af07
MV
29672004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2968
2969 First cut at integrating uniform vectors from srfi-4 with the rest
2970 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
2971 vector. The plan is to gradually replace one type after the other
2972 until none is left and then to consider general cleanups and
2973 optimizations.
2974
2975 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
2976
2977 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
2978 scm_uniform_vector_ref, scm_uniform_vector_set_x,
2979 scm_uniform_vector_to_list, scm_is_uniform_vector,
2980 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
2981 scm_uniform_vector_elements, scm_uniform_vector_element_size,
2982 scm_uniform_vector_release): New.
2983 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
2984 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
2985 from unif.h, unif.c and extended to handle both the old and new
2986 uniform vectors.
2987
2988 * tags.h (scm_tc7_byvect): Commented out.
2989
2990 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
2991 the former to the latter.
2992 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
2993 srfi-4.h, srfi-4.c.
2994 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
2995 (scm_array_p, scm_array_rank, scm_array_dimensions,
2996 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
2997 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
2998 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
2999 vectors. Removed code for scm_tc7_byvect.
3000 (scm_dimensions_to_uniform_array): Fill array with 0 when
3001 prototype is #\nul.
3002 (scm_i_print_array_dimension, scm_i_legacy_tag,
3003 scm_i_print_array): New.
3004 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3005 for scm_tc7_byvect.
3006
3007 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3008 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3009 uniform vectors. Removed code for scm_tc7_byvect
3010
3011 * print.c (iprin1): Removed code for scm_tc7_byvect.
3012 * objects.c (scm_class_of): Likewise.
3013 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3014 * gc-card.c (scm_i_sweep_card): Likewise.
3015 * evalext.c (scm_self_evaluating_p): Likewise.
3016 * eq.c (scm_equal_p): Likewise.
3017
3018 * gh_data.c (gh_chars2byvect): Reimplemented with
3019 scm_make_s8vector.
3020 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3021
3022 * srfi-4.c (take_uvec): New.
3023 (alloc_uvec): Use it.
3024 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3025
3026 * random.c (vector_scale, vector_scale_x): Renamed former to the
3027 latter, since it modifies its argument.
3028 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3029 Do not use scm_universal_vector_length for non-uniform vectors.
3030 Use scm_f64vector_elements to access innards of uniform vectors.
3031
3032 * convert.i.c: Convert srfi-4 style uniform vectors when
3033 requested.
3034 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3035 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3036
79d52182
MV
30372004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3038
3039 * numbers.h, numbers.c (scm_i_print_double): New.
3040
3041 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3042 ../srfi/ but heavily modified.
3043 * Makefile.am: Add them in all the right places.
3044 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3045 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3046 '#u', and '#s'.
3047
3048 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3049 and made non-static. Changed all uses.
3050
6191ccec
MV
30512004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3052
e64e80b0
MV
3053 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3054 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3055 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3056 scm_uintprint to print unsigned integers, raw heap words, and
3057 adresses, using a cast to scm_t_bits to turn pointers into
3058 integers.
3059
3060 * unif.c: Include "libguile/print.h".
3061
c90ac3a8
MV
3062 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3063 scm_t_intmax values.
3064 (scm_uint2str): New, for scm_t_uintmax.
3065 (scm_iint2str): Argument type changed to scm_t_intmax,
3066 reimplemented in terms of scm_uint2str.
3067
3068 * print.c, print.h (scm_uintprint): New, for printing
3069 scm_t_uintmax values.
3070 (scm_intprint): Argument type changed to scm_t_intmax.
3071
77c2594f
MV
3072 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3073 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3074 strategic places so that the loops can be interrupted.
3075
6191ccec
MV
3076 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3077 "-I$(top_srcdir)/libguile-ltdl".
3078 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3079 "../libguile-ltdl/libguile-ltdl.a".
3080
3081 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3082 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3083 instead of <libguile-ltdl.h>.
3084
77600f3e
MV
30852004-10-20 Marius Vollmer <mvo@zagadka.de>
3086
3087 * sort.c (quicksort): Copy pivot out of the array while
3088 constructing the partitions; it could get overwritten otherwise.
3089 Because of the ultimate insertion sort, this bug did not cause
3090 quicksort to fail, it just put all the burdon on the insertion
3091 sort and was thus very slow. Thanks to Rolan Orre for reporting
3092 the slowness!
3093
5000379b
MV
30942004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3095
192cd792
MV
3096 * numbers.c (scm_i_range_error): New.
3097 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3098 scm_out_of_range.
3099
3100 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3101 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3102
3103 * unif.c (scm_array_p): When no prototype is given, explicitely
3104 test for allowable types, do not simply return true. Thanks to
3105 Roland Orre for reporting this!
3106
5000379b
MV
3107 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3108
3109 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3110 segment to scm_max_segment_size.
3111
497eb0b7
HWN
31122004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3113
1367aa5e
HWN
3114 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3115
497eb0b7
HWN
3116 * inline.h (scm_double_cell): abort if GC running.
3117 (scm_cell): idem.
3118
aef0bdb4
MV
31192004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3120
3121 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3122 pos == 0.
3123
3124 Keywords no longer store a 'dash symbol'. Instead, they store a
3125 symbol with their real name.
3126
3127 * keywords.h, keywords.c, deprecated.h, deprecated.c
3128 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3129 terms of scm_is_keyword and scm_keyword_dash_symbol.
3130
3131 * keywords.h, keywords.c, discouraged.h, discouraged.c
3132 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3133 scm_c_make_keyword): Discouraged.
3134
3135 * keywords.h, keywords.c (scm_symbol_to_keyword,
3136 scm_keyword_to_symbol): Implemented in C.
3137 (scm_is_keyword, scm_from_locale_keyword,
3138 scm_from_locale_keywordn): New.
3139
3140 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3141
3142 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3143 scm_from_locale_keyword instead of scm_c_make_keyword.
3144
3145 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3146 better error message.
3147
3148 * deprecated.c: Include discouraged.h and keywords.h.
3149
3150 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3151 reading '#:' or ':'. See NEWS for consequences.
3152
818deb11
MV
31532004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3154
43c25626
MV
3155 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3156 literals are now read-write again (until SCM_STRING_CHARS is
3157 removed).
3158
3159 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3160 strings with an error message that blames SCM_STRING_CHARS.
3161
3162 * options.c (change_option_setting): Use scm_car instead of
3163 explicit type check plus SCM_CAR.
3164
3165 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3166 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3167 (scm_iprin1): Use them instead of the previoulsy hardcoded
3168 strings.
3169 (scm_init_print): Initialize them.
3170
3171 * backtrace.c (display_frame_expr): Do not remove control
3172 characters from the final string. Print it directly using
3173 scm_display.
3174
818deb11
MV
3175 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3176 Thanks to Roland Orre!
3177
d748089e
KR
31782004-09-29 Kevin Ryde <user42@zip.com.au>
3179
3180 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3181 be whole original string in match struct, not offsetted substring.
3182
0ff7e3ff
HWN
31832004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3184
3185 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3186
ad7de4b8
MV
31872004-09-24 Marius Vollmer <mvo@zagadka.de>
3188
2edf319f
MV
3189 * Makefile.am (EXTRA_DIST): Added gettext.h.
3190
d180337b
MV
3191 * smob.c, smob.h (scm_assert_smob_type): New.
3192
05d7cf89 3193 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3194 Include GUILE_CFLAGS.
3195 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3196 now.
3197 (libpath.h): Put GUILE_CFLAGS in the build-info.
3198
c9fedf8a
MV
31992004-09-23 Marius Vollmer <mvo@zagadka.de>
3200
3201 * print.h (scm_print_state): Added highlight_objects.
3202 * print.c (make_print_state, scm_free_print_state): Initialize it
3203 to SCM_EOL.
3204 (scm_iprin1): Wrap output in '{...}' when object is contained in
3205 highlight_objects.
3206
3207 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3208 scm_backtrace_with_highlights): New. Set highlight_objects of
3209 printstate.
3210
3211 * error.c (scm_error_scm): Document new meaning of data/rest
3212 argument for out-of-range and wrong-type-arg errors.
3213 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3214 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3215 exception so that it gets highlighted in the backtrace.
3216 Don't talk about "argument" when not giving a position.
3217
3218 * throw.c (handler_message): The rest argument is the fourth
3219 argument, not everything after the third. Call
3220 scm_display_backtrace_with_highlights, passing the rest argument
3221 when appropriate.
3222
d5ac9b2a
MV
32232004-09-22 Marius Vollmer <mvo@zagadka.de>
3224
3225 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3226 <bruno@clisp.org>:
3227
3228 * i18n.c: Handle --disable-nls (thanks Bruno).
3229
3230 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3231 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3232
3233 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3234 LC categories.
05d7cf89 3235 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3236
3237 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3238 scm_bind_textdomain_codeset): Make wrappers similar to C function
3239 they wrap.
3240
3241 * i18n.h: New file.
3242 * i18n.c: New file.
3243 * gettext.h: New file, taken from GNU gettext.
3244 * init.c: Include libguile/i18n.h.
3245 (scm_init_guile_1): Add call to scm_init_i18n().
3246 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3247 (DOT_X_FILES): Add i18n.x.
3248 (DOT_DOC_FILES): Add i18n.doc.
3249 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3250 (modinclude_HEADERS): Add i18n.h.
3251
d2e53ed6
MV
32522004-09-22 Marius Vollmer <mvo@zagadka.de>
3253
2cdfe016
MV
3254 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3255
d2e53ed6
MV
3256 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3257 discouraged.h. Replaced all uses with scm_is_pair.
3258 (SCM_I_CONSP): New name for SCM_CONSP.
3259
3260 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3261 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3262 scm_cadr, etc): New.
3263 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3264 uses with scm_is_null.
5dd82006 3265
d2e53ed6
MV
3266 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3267 instead of explicit code.
5dd82006 3268
5dfdf243
MV
32692004-09-22 Marius Vollmer <mvo@zagadka.de>
3270
b50c53e5
MV
3271 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3272 Reworded logic a bit so that #f is returned immediately when s1 is
3273 too short to contain s2.
3274
5dfdf243 3275 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3276 zero-terminated locale string before matching against it.
5dfdf243
MV
3277
3278 * strings.h, strings.c (scm_substring_read_only,
3279 scm_c_substring_read_only, scm_i_substring_read_only): New.
3280 (RO_STRING_TAG, IS_RO_STRING): New.
3281 (scm_i_string_writable_chars): Bail on read-only strings.
3282
3283 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3284 literals, thus making them read-only as specified by R5RS.
3285
22ab5ba3
MV
32862004-09-22 Marius Vollmer <mvo@zagadka.de>
3287
3288 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3289 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3290
2663421c
MV
32912004-09-21 Marius Vollmer <mvo@zagadka.de>
3292
0d83cb90
MV
3293 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3294 numbers.c.
3295 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3296 Thanks to Andreas Vögele!
0d83cb90 3297
2663421c
MV
3298 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3299 just on a line of its own.
3300
3301 * srfi-13.c (scm_string_any, scm_string_every,
3302 scm_string_tabulate, string_upcase_x, string_down_case_x,
3303 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3304 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3305 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3306 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3307 indices, which can also be negative.
3308
b00b73f9
MV
33092004-09-20 Marius Vollmer <mvo@zagadka.de>
3310
3311 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3312
3313 * threads.c (scm_threads_mark_stacks): Call
3314 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3315 only used once.
3316
adba74f3
HWN
33172004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3318
05d7cf89 3319 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3320 Bugfix: when subtracting unsigned values, make sure that result
3321 does not wrap.
3322
f6de32c8
KR
33232004-09-09 Kevin Ryde <user42@zip.com.au>
3324
3325 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3326 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3327 by Andreas Vögele.
f6de32c8 3328
e548be5f
MV
33292004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3330
eb8d0af1
MV
3331 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3332
e548be5f
MV
3333 * eq.c (real_eqv): Pretend that all NaNs are equal.
3334
3335 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3336
e7acba81
MV
33372004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3338
874fbad1
MV
3339 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3340 use size_t for some locals instead of int.
3341
e7acba81
MV
3342 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3343 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3344 (skip_scsh_block_comment): Use scm_input_error instead of
3345 scm_misc_error in case of EOF.
3346
5de12658
KR
33472004-09-07 Kevin Ryde <user42@zip.com.au>
3348
3349 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3350 Bug report by Bill Schottstaedt.
3351
3352 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3353 column.
3354 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3355
3356 * posix.c (scm_access): Update docstring per manual.
3357
3358 * posix.c (scm_nice): Correction to error detection. Reported by
3359 Matthias Koeppe.
3360
3361 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3362 throw error before unlocking mutex with SCM_ALLOW_INTS.
3363
e227addf
KR
33642004-09-06 Kevin Ryde <user42@zip.com.au>
3365
3366 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3367 available. This also gets around CLK_TCK being absent when
3368 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3369
edea856c
SJ
33702004-09-03 Stefan Jahn <stefan@lkcc.org>
3371
3372 * threads.c (scm_threads_mark_stacks): Fixed local variable
3373 definitions.
3374
e7acba81 3375 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3376 local variable definitions.
3377
3378 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3379 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3380 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3381 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3382 scm_makfrom0str().
3383
874fbad1 3384 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3385 part.
3386
3387 * numbers.c (scm_init_numbers): Removed check_sanity() call
3388 inside GUILE_DEBUG. The function has been removed somewhen...
3389
3390 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3391 MinGW32 because it conflicts with its pthread headers.
3392
d9eb2d67
MV
33932004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3394
3395 * strings.c (SCM_STRINGP): Accept all strings.
3396 (SCM_STRING_CHARS): Reject shared substrings here.
3397
3398 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3399 the Copyright years.
3400
c495c342
KR
34012004-08-27 Kevin Ryde <user42@zip.com.au>
3402
3403 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3404 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3405 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3406
57aa5515
MV
34072004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3408
3409 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3410 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3411 scm_i_symbol_is_interned, scm_i_mem2symbol,
3412 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3413
ce25760f
MV
34142004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3415
19ff6ffc
MV
3416 * srfi-13.c: First cut at thread-safeness and proper use of
3417 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3418 been inserted. Made sure that no internal string pointer is used
3419 across a SCM_TICK or a possible GC.
3420
ce25760f
MV
3421 * script.c (scm_compile_shell_switches): Use
3422 scm_from_locale_string instead of scm_makfrom0str.
3423
3424 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3425 always been.
3426
c5080b51
MV
34272004-08-25 Marius Vollmer <mvo@zagadka.de>
3428
3429 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3430 strop.c.
3431
3432 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3433 * strop.h, strop.c: Removed, they are now empty.
3434 * Makefile.am: Updated for new and removed files.
3435
3436 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3437 to scm_string_to_symbol.
3438
3439 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3440 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3441 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3442 charset instead of libc functions.
3443
3444 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3445 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3446 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3447 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3448 instead of explicit code.
3449
3450 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3451 "srfi-13.h" instead of "strop.h".
3452
3453 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3454 scm_init_srfi_14. Do not call scm_init_strop.
3455
4b0d27f2
MV
34562004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3457
3458 * numbers.c (scm_inf_p): Synced docstring back from manual.
3459
3ece39d6
MV
34602004-08-22 Marius Vollmer <mvo@zagadka.de>
3461
3462 * strings.c (get_str_buf_start): New helper function.
3463 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3464 scm_i_string_char, scm_i_string_writable_chars): Use it.
3465 (scm_i_substring_copy): Make START argument optional for C
3466 callers, for upcoming SRFI-13 integration.
3467
34682004-08-21 Marius Vollmer <mvo@zagadka.de>
3469
3470 From Richard Todd, Thanks!
3471
3472 * script.c (scm_compile_shell_switches): added '-L' switch to add
3473 to the %load-path.
3474
5fa0939c
DH
34752004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3476
3477 * eval.c (unmemoize_exprs): When dropping internal body markers
3478 from the output during unmemoization, also drop those that are not
3479 immediately at the beginning of a body.
3480
2146fdeb
MV
34812004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3482
c1f54b3d
MV
3483 * eval.c (scm_lookupcar1): Report "Variable used before given a
3484 value" insetad of an "Unbound" one for variables that are found
3485 but still contain SCM_UNDEFINED.
2146fdeb
MV
3486
3487 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3488 expects a null-terminated string in the locale encoding, but
3489 scm_i_string_writable_chars doesn't give that. Fixed by letting
3490 mkstemp modify a locale version of the tmpl argument and copying
3491 the result back into tmpl.
3492
3493 * strop.c (scm_substring_move_x): Store into str2, not str1.
3494
d4f76919
KR
34952004-08-20 Kevin Ryde <user42@zip.com.au>
3496
3497 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3498 to modify the input string.
3499
b5247a6b
MV
35002004-08-19 Marius Vollmer <mvo@zagadka.de>
3501
3502 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3503 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3504 scm_c_symbol_length.
3505
f26b9395
MV
35062004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3507
3508 New string implementation, with copy-on-write strings and
3509 mutation-sharing substrings, and a new internal string API.
3510 Symbols can now share memory with strings.
3511
3512 * tags.h (scm_tc7_stringbuf): New tag.
3513
3514 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3515 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3516 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3517 uses.
3518 (scm_i_make_string, scm_c_make_string): New, to replace
3519 scm_allocate_string. Updated all uses.
3520 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3521 SCM_STRING_LENGTH): Deprecated.
3522 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3523 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3524 Discouraged. Replaced all uses with scm_from_locale_string or
3525 similar, as appropriate.
3526 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3527 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3528 scm_substring_shared, scm_substring_copy): New.
3529
3530 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3531 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3532 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3533 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3534 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3535 Deprecated.
3536 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3537 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3538 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3539 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3540 Updated all uses.
3541 (scm_gensym): Generate only the number suffix in the buffer, just
3542 string-append the prefix.
3543
3544 * error.c (scm_memory_error): Do not try to throw, just abort.
3545 Throwing will not work anyway.
3546
3547 * gh.h, gh-data.c (gh_set_substr): Made src const.
3548
3549 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3550 (scm_mode_bits): Use it.
3551 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3552 a vector normally and fill that instead of consing a list with a
3553 blocked GC.
3554
3555 * read.c (scm_i_casei_streq): New, for counted strings.
3556
3557 * threads.c (gc_section_count): Removed, thread-sleeping can not
3558 be nested.
3559 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3560 admin mutex so that we can be put to sleep by other threads while
3561 blocking on that mutex. Lock all the heap mutex of all threads,
3562 including ourselves.
3563 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3564 call scm_i_enter_guile.
3565 (scm_thread_mark_stacks): Expect all threads to be suspended.
3566
3567 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3568 scm_gc_mallocated, for now.
3569 (scm_init_storage): Initialize it.
3570 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3571
3572 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3573 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3574 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3575 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3576
cd505b38
MV
3577 * strop.c (scm_string_copy): Use scm_c_substring to get a
3578 copy-on-write string.
3579
8a807b26
KR
35802004-08-18 Kevin Ryde <user42@zip.com.au>
3581
3582 * arbiters.c (FETCH_STORE): New macro.
3583 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3584 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3585 scm_try_arbiter and scm_release_arbiter.
3586 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3587 for speed on i386, otherwise using mutex.
3588
3589 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3590 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3591 exact and inexact is #f.)
3592
3593 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3594 to get thread safety of scm_ttyname.
3595
3596 * ports.c (ttyname): Remove prototype, unused.
3597
d6cd4c36 3598 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3599 Reported by Michael Tuexen.
d6cd4c36 3600
fa0c0a4b
MV
36012004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3602
3603 * load.c (scm_init_load_path): Do not pass NULL to
3604 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3605 not set. Thanks to Bill Schottstaedt.
3606
70f7ee41
MV
36072004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3608
3609 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3610 locale strings instead of accessing their internals.
3611 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3612 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3613 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3614
3615 * simpos.c (scm_system): Convert SCM strings to locale strings
3616 instead of accessing their internals.
3617
3618 * script.c (scm_compile_shell_switches): Convert version to locale
3619 string before printing it.
3620
3621 * rdelim.c (scm_read_delimited_x): Avoid
3622 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3623 of scm_from_long for the returned number of read characters.
3624
3625 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3626 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3627
3628 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3629 Use them instead of SCM_SYSCALL when one or two strings need to be
3630 converted into locale strings.
3631 (my_rename): New, gathers platform dependent code for renaming.
3632 (scm_rename): Use it.
3633 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3634 strings instead of accessing their internals.
3635 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3636 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3637 SCM_STRING_LENGTH.
3638
3639 * extensions.c (load_extension): Convert lib and init to locale
3640 strings instead of accessing the internals directly.
3641 (scm_c_load_extension): Use scm_from_locale_string instead of
3642 scm_makfrom0str.
3643
3644 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3645 scm_fdes_to_port, but take mode bits directly instead of as a C
3646 string.
3647 (scm_i_fdes_to_port): Implement using above.
3648 (scm_open_file): Use scm_i_fdes_to_port together with
3649 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3650 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3651 with scm_i_mode_bits to avoid accessing internals of SCM string
3652 from C.
3653
3654 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3655 SCM string as argument.
3656
3657 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3658 bits directly instead of C string.
3659 (scm_void_port): Implement using above.
3660 (scm_sys_make_void_port): Use scm_i_void_port together with
3661 scm_i_mode_bits to avoid accessing internals of SCM string.
3662
3663 * strings.h, strings.c (scm_i_get_substring_spec): New.
3664
3665 * socket.c, rw.c, deprecated.h, validate.h
3666 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3667 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3668 scm_to_locale_string, etc.
3669 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3670 above, plus scm_i_get_substring_spec.
3671
3672 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3673 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3674 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3675 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3676 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3677 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3678 with more explicit scm_remember_upto_here_1, etc, or introduced
3679 them in the first place.
3680
3681 * posix.c (WITH_STRING): New helper macro. Use it where one
3682 locale string is needed for a short piece of code.
3683 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3684 when one locale string is needed.
3685 (scm_mkstemp): Convert tmpl to a locale string.
3686 (scm_putenv): Rewritten to use only C strings.
3687 (scm_setlocale, scm_crpt): Convert argument strings to locale
3688 strings.
3689
36902004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3691
3692 * load.c (scm_primitive_load_path): Do not check for absolute
3693 filenames when scm_sys_search_load_path returns false, which will
3694 return absolute filenames unchanged.
3695
bb26cc2d
MV
36962004-08-11 Marius Vollmer <mvo@zagadka.de>
3697
3698 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3699 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3700 of an alist. Thanks to Matthias Koeppe!
3701
02573e4c
MV
37022004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3703
3704 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3705 Moved from string.h to deprecated.h.
3706
3707 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3708
f9751e86 3709 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
3710 SCM_I_MAKE_STRING_TAG, changed all uses.
3711 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3712 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3713 respectively. For a short time, the old names are still there as
3714 aliases. Not all uses have been changed yet, but the ones in
3715 strings.c have.
3716 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3717 SCM_T_BITS_MAX.
3718 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3719 scm_take_locale_string, scm_take_locale_stringn,
3720 scm_to_locale_string, scm_to_locale_stringn,
3721 scm_to_locale_stringbuf): New.
3722 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3723 deprecated.[hc]. Implemented in terms of the new functions above.
3724 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3725 scm_makfrom0str): Reimplemented in terms of the new functions from
3726 above. They will be discouraged shortly.
3727 (scm_substring): Do not use scm_mem2string.
3728 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3729 to replace similar code from posix.c, simpos.c, and dynl.c.
3730 (scm_string_append): Use memcpy instead of explicit loop. Do not
3731 use register keyword. Use plain 'char' instead of 'unsigned
3732 char'.
3733
3734 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3735 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3736
3737 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3738 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3739 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3740 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3741
3742 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3743 string. This avoids a conversion round-trip.
3744
3745 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3746 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3747 SCM_I_STRING_LENGTH, respectively.
3748 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3749
3750 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3751 of a string, call scm_display on the string itself.
3752
3753 * dynwind.c, dynwind.h (scm_frame_free): New.
3754
3755 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3756 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3757 Replaced uses of SCM_STRING_CHARS with proper uses of
3758 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3759 Replaced scm_mem2string with scm_from_locale_string.
3760
3761 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3762 Removed, replaced all uses with scm_i_allocate_string_pointers.
3763
3764 * load.h, load.c (scm_internal_parse_path): Removed.
3765 (scm_parse_path): Use scm_string_split to do the work.
3766 (scm_init_load_path): Use scm_parse_path instead of
3767 scm_internal_parse_path.
3768 (scm_search_path): Rewritten string handling part of the code in
3769 terms of scm_to_locale_stringbuf and so that it is thread safe.
3770
3771 * error.c (scm_error_scm): Throw directly instead of calling
3772 scm_error, this avoids the back and forth conversion of SUBR and
3773 MESSAGE and also plugs a memory leak.
3774 (scm_error): Call scm_error_scm.
3775
3776 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3777 (display_header): Print FNAME when it is true, not
3778 merely when it is a string.
3779
3780 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3781 unceremoniously. They were unused by Guile itself, and external
3782 use should stop immediately.
3783
3784
409eb4e5
MV
37852004-08-10 Marius Vollmer <mvo@zagadka.de>
3786
3787 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3788 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3789 deprecated versions installed in deprecated.h and deprecated.c.
3790 Changed all uses.
3791
a00eaf19
RB
37922004-08-06 Rob Browning <rlb@defaultvalue.org>
3793
3794 * net_db.c (scm_resolv_error): don't cause an exception while
3795 trying to throw an exception -- call scm_misc_error with correct
3796 arguments. The previous arguments needed a format escape that
3797 wasn't in any of the format strings.
3798
bcb88c93
KR
37992004-08-06 Kevin Ryde <user42@zip.com.au>
3800
8f094b97
KR
3801 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3802 so as not to depend on signedness of plain char. For byvect range
3803 check, throw out-of-range rather than wrong-type-arg.
3804
bcb88c93
KR
3805 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3806 signed byte range checks by using scm_to_schar and scm_from_schar,
3807 don't want to depend on signedness of C char.
3808
29e61124
KR
38092004-08-05 Kevin Ryde <user42@zip.com.au>
3810
3811 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3812 SCM_DEFER_INTS.
3813 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3814 guaranteed if multiple threads compete to unlock.
3815 Update docstrings per doc/ref/api-scheduling.texi.
3816
99de794f
KR
3817 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3818 stat on the filename, to be certain a file rename can't mean we get
3819 info on one filesystem object but open another. This fstat usage is
3820 similar to Emacs copy-file.
3821
29e61124
KR
3822 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3823
3824 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3825 SIGINT and SIGQUIT, since those values are ints.
3826
759aa8f9
MV
38272004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3828
7241f213
MV
3829 * num2integral.i.c, num2float.i.c: Removed.
3830 * Makefile.am (noinst_HEADERS): Updated.
3831
f9656a9f
MV
3832 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3833 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
3834 (scm_complex_p): New, export as "complex?" to Scheme.
3835 (scm_number_p): Export as "number?" to Scheme.
3836 (scm_is_complex, scm_is_number): New.
3837 (scm_c_make_rectangular, scm_c_make_polar): New.
3838 (scm_make_rectangular, scm_make_polar): Use above.
3839 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3840 New.
3841 (scm_make_complex): Discouraged by moving to discouraged.h and
3842 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3843
759aa8f9
MV
3844 * discouraged.h, discouraged.c, numbers.c, numbers.h
3845 (scm_is_rational): New.
3846 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3847 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3848 Removed prototypes.
3849 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3850 Discouraged by moving to discouraged.h and discouraged.c.
3851 Replaced all uses with scm_from_double.
3852 (scm_num2float, scm_num2double): Discouraged by moving prototype
3853 to discouraged.h and rewriting in terms of scm_to_double.
3854 Replaced all uses with scm_to_double.
3855 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3856 explicit code.
3857 (scm_from_double): Do not implement in terms of scm_make_real, use
3858 explicit code.
3859
531bf3e6
MV
38602004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3861
759aa8f9
MV
3862 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3863
531bf3e6
MV
3864 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3865 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3866
3867 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3868 Renamed to SCM_I_* in order to avoid collisions with the versions
3869 defined in deprecated.h.
3870
3871 * discouraged.h, discouraged.c: New files.
3872
3873 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
3874 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
3875 deprecated to being discouraged by moving to discouraged.h.
3876
3877 * numbers.h, numbers.c, discouraged.h, discouraged.c
3878 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
3879 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
3880 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
3881 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
3882 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
3883 scm_num2ulong_long): Discouraged by moving to discouraged.h and
3884 discouraged.c and reimplementing in terms of scm_from_* and
3885 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
3886 functions.
3887
3888 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
3889 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
3890 scm_i_size2big, scm_i_ptrdiff2big): Removed.
3891 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
3892 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
3893 explicit code.
3894
5ec82e96
KR
38952004-08-02 Kevin Ryde <user42@zip.com.au>
3896
3897 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
3898 and current usage and migration.
3899
58f28989
KR
39002004-07-31 Kevin Ryde <user42@zip.com.au>
3901
3902 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
3903 it's not thread safe.
3904 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
3905 advantage of this.
3906 * fports.c (scm_open_file): Use scm_strerror likewise.
3907 * filesys.c (scm_stat, scm_lstat): Ditto.
3908
3909 * filesys.c (scm_copy_file): Avoid fd leak when destination file
3910 cannot be opened.
3911
3912 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
3913 update, for thread safety.
3914 (gensym_counter): Move into scm_gensym which is its only user.
3915 (scm_init_symbols): No need to explicitly initialize gensym_counter.
3916
03696aab
MV
39172004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3918
51fdb325
MV
3919 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
3920 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
3921 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
3922 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
3923 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
3924 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
3925 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
3926 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
3927 defined in terms of scm_to_signed_integer, etc, but in terms of
3928 scm_to_int8, etc.
3929
3930 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
3931
03696aab
MV
3932 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
3933 no longer used.
3934
3935 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
3936 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
3937
3938 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
3939 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
3940 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
3941 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
3942 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
3943 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
3944 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
3945
3946 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
3947 the functions below.
3948
3949 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
3950 conv-uinteger.i.c.
3951
3952 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
3953 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
3954 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
3955 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
3956 scm_from_uint64): Turned from macros into proper functions.
3957 (scm_to_signed_integer, scm_to_unsigned_integer,
3958 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
3959 conv-integer.i.c and conv-uinteger.i.c, as well.
3960
3961 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
3962 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
3963 the limits. Those are always defined.
3964
1f15779e
KR
39652004-07-29 Kevin Ryde <user42@zip.com.au>
3966
3967 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
3968
48360eb3
KR
39692004-07-28 Kevin Ryde <user42@zip.com.au>
3970
3971 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
3972 safety.
3973
c3f3c841
KR
3974 * unif.c (scm_array_set_x): For svect, use scm_num2short for
3975 consistency with other vector types and to get arg and func name into
3976 error message.
3977
c82f8ed6
MV
39782004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3979
3980 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
3981 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
3982 scm_from_bool, respectively.
3983 (SCM_NINUMP): Added.
3984
3985 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
3986 deprecated.h. Replaced all uses with scm_is_eq.
3987
317b4c4a
KR
39882004-07-24 Kevin Ryde <user42@zip.com.au>
3989
3990 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
3991 * posix.c (scm_crypt): Use it to protect static data in crypt().
3992
e11e83f3
MV
39932004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3994
3995 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 3996 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
3997 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
3998 versions to deprecated.h and deprecated.c. Changed all uses to
3999 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4000 scm_from_*, as appropriate.
4001
4002 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4003 the unexisting scm_cross_dynwind_binding_scope for inums on the
4004 windlist.
4005
a55c2b68
MV
40062004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4007
4008 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4009 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4010 byte-wise address to a SCM integer. Changed all uses.
4011 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4012 scm_to_ipv6 and added type and range checking, for converting from
4013 an IPv& byte-wise address to a SCM integer. Changed all uses.
4014 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4015 is now done by scm_to_ipv6.
4016
4017 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4018 not accept inexact integers.
4019
4020 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4021 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4022 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4023 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4024 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4025 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4026 fixnum/bignum distinction visible. Changed all uses to
4027 scm_to_size_t or similar.
4028
40292004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4030
4031 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4032
48a06bd5
KR
40332004-07-10 Kevin Ryde <user42@zip.com.au>
4034
4035 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4036 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4037 such a size causes divide-by-zeros in scm_hasher.
4038
052fbfd9
KR
4039 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4040 leak.
4041
43240c9c
MV
40422004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4043
4044 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4045 Rewritten using the same logic as scm_to_signed_integer and
4046 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4047 use CHAR_BIT instead of hardcoding 8.
4048 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4049 SCM_I_LLONG_MIN etc. instead.
4050
4051 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4052 SCM_I_MAKINUM and changed all uses.
4053 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4054
a3de8e7b
MV
4055 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4056 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4057 them by assuming twos-complement.
4058
c9eb03bb
MV
40592004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4060
4061 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4062 configure now produces.
4063 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4064 definitions, giving the limits of the integer types defined by
4065 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4066 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4067
4068 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4069 SHORT_MIN.
4070 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4071 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4072 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4073 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4074 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4075 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4076 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4077 scm_from_uintmax): New.
4078
7888309b
MV
40792004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4080
4081 * tags.h (scm_is_eq): New.
4082
4083 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4084 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4085 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4086 scm_from_bool, and scm_is_bool, respectively.
4087
4088 * boolean.h (scm_is_bool): Fix bug in prototype.
4089 (scm_from_bool): The argument is "x" not "f", stupid.
4090
4091 * boolean.c (scm_is_bool): Fix typo.
4092
4093 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4094 scm_is_unsigned_integer, scm_to_signed_integer,
4095 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4096 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4097 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4098 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4099 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4100 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4101 New.
4102
800570a6
MV
41032004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4104
4105 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4106 scm_to_bool): New.
4107
9fcf3cbb
DH
41082004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4109
4110 * backtrace.c (display_expression, display_frame): Call
4111 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4112 single memoized expression.
4113
4114 * debug.c (memoized_print): Don't try to unmemoize the memoized
4115 object, since we can't know whether it holds a single expression
4116 or a body.
4117
4118 (scm_mem_to_proc): Removed check for lambda expression, since it
4119 was moot anyway. Whoever uses these functions for debugging
4120 purposes should know what they do: Creating invalid memoized code
4121 will cause crashes, independent of whether this check is present
4122 or not.
4123
4124 (scm_proc_to_mem): Take the closure's code as it is and don't
4125 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4126 memoized code should not be modified.
4127
4128 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4129 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4130 available as a guile internal function instead. However,
4131 scm_i_unmemoize_expr will only work on memoized objects that hold
4132 a single memoized expression. It won't work with bodies.
4133
4134 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4135 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4136 i. e. a list of expressions.
4137
4138 * eval.c (unmemoize_exprs): Drop internal body markers from the
4139 output during unmemoization.
4140
4141 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4142 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4143 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4144 as guile internal functions instead. scm_i_unmemoize_expr will
4145 only work on a single memoized expression, while
4146 scm_i_unmemocopy_body will only work on bodies.
4147
90df793f
DH
41482004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4149
4150 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4151
4152 (scm_cons_source, scm_primitive_eval): Prefer higher level
4153 predicate SCM_FALSEP over SCM_IMP.
4154
8048c00b
RB
41552004-06-15 Rob Browning <rlb@defaultvalue.org>
4156
4157 * script.c (scm_shell_usage): minor phrasing change.
4158
4159 * gc_os_dep.c: update ifdefery for macosx.
4160 (scm_get_stack_base): separate result initialization from
4161 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4162 3.3. Thanks to Andreas Vögele.
8048c00b 4163
d93294d4
HWN
41642004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4165
4166 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4167
212e58ed
DH
41682004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4169
4170 * list.[ch] (scm_i_finite_list_copy): New internal function to
4171 copy lists that are known to be finite (though not necessarily
4172 proper).
4173
4174 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4175 a closure's argument list like an expression of a body.
4176
4177 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4178 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4179 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4180 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4181 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4182 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4183 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4184 unmemoize_builtin_macro): New static functions and symbols.
4185
4186 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4187 now has a slightly different meaning: The memoized form that is
4188 receives as its argument is now interpreted as a sequence of
4189 expressions from a body.
4190
4191 (unmemocar, scm_unmemocar): Since the whole functionality of
4192 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4193 has its old content back and is deprecated, while unmemocar has
4194 been removed.
4195
4196 (SCM_BIT7): Removed.
4197
4198 (CEVAL): For unmemoizing a single expression, call
4199 unmemoize_expression instead of scm_unmemocopy, which now expects
4200 a sequence of body expressions. Eliminated unnecessary empty
4201 environment frame when executing let* forms. Eliminated
4202 unmemoization step from evaluator.
4203
9ccea370
MV
42042004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4205
4206 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4207 macroexp and made static. Added new version of scm_macroexp that
4208 emits a deprecation warning and then calls macroexp.
4209 (scm_m_undefine): Issue deprecation warning.
4210
57d23e25
DH
42112004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4212
4213 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4214 Modified to make set! work on symbols that represent syntactic
4215 keywords.
4216
141521ad
HWN
42172004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4218
4219 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4220 compound expression as lvalue errors.
4221
7c2f56a4
MV
42222004-05-24 Marius Vollmer <mvo@zagadka.de>
4223
4224 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4225 WINDER_DATA to a SCM.
4226
366ecaec
DH
42272004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4228
4229 * goops.c (compute_getters_n_setters, create_standard_classes,
4230 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4231 lambda expression rather than creating them with scm_closure.
4232
26ecfa39
DH
42332004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4234
4235 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4236 misplaced syntactic keywords. This will not work unless guile's
4237 defmacro feature is deprecated.
4238
4239 (scm_m_case): Fixed a bug that caused the list of labels to grow
4240 with every case form.
4241
f865229a
KR
42422004-05-19 Kevin Ryde <user42@zip.com.au>
4243
4244 * numbers.c (scm_round_number): For inum and big, just return x. For
4245 real, use scm_round for 2^54-1 etc problems covered there.
4246
4247 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4248 doesn't provide trunc. This was for when `truncate' was done as a
4249 scm_tc7_dsubr, no longer required.
4250
4251 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4252 to stack marking call, two parameters and no cast on t->base.
4253
63947c7a
MV
42542004-05-18 Marius Vollmer <mvo@zagadka.de>
4255
4256 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4257 processed hashtables back into the weak_hashtables list. Thanks
4258 to Bill Schottstaedt!
4259
e7313a9d
DH
42602004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4261
4262 * eval.c (unmemoize_quote): New static function.
4263
4264 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4265 representation of 'quote' and '@slot-ref' to an improper list.
4266 This reduces execution time, the number of cells used to hold the
4267 memoized code, and thus also reduces garbage collection time.
4268
4269 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4270
4271 (SCM_CEVAL): Changed macro handling to also work with macros that
4272 return improper lists. Added an assertion, that the code returned
4273 by a macro transformer will not lead to cycles in the memoized
4274 code.
4275
e5156567
DH
42762004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4277
4278 No functional change, just rearrangements of functions within the
4279 file.
4280
4281 * eval.c (scm_ilookup, scm_unbound_variable_key,
4282 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4283 the definitions used for execution, since that's where they will
4284 belong to later.
4285
651f07f8
DH
42862004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4287
4288 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4289 throughout guile, has not been part of an official release yet,
4290 and the concept of sloppy predicates has never been a good idea.
4291
4292 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4293 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4294 Simplified.
4295
770e048f
DH
42962004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4297
4298 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4299 to make explicit what happens.
4300
2ff08405
DH
43012004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4302
4303 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4304 explicit what happens.
4305
4306 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4307 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4308
89afb9cd
MV
43092004-05-11 Marius Vollmer <mvo@zagadka.de>
4310
4311 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4312 is indeed a procedure when it isn't a number.
4313
3d5ebfa9
MV
43142004-05-10 Marius Vollmer <mvo@zagadka.de>
4315
4316 Convert floating point numbers into strings with an arbitrary
4317 radix. Thanks to Richard Todd!
4318
4319 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4320 fit.
4321 (fx): Removed.
4322 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4323 number_chars): New, to support variable radices.
4324 (idbl2str): Use above instead of the old base-10 only tables.
4325 (iflo2str): Pass on new RADIX argument to idbl2str.
4326 (scm_number_to_string): Pass radix to iflo2str.
4327 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4328 iflo2str.
4329 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4330 possible radices.
4331
3ae69bb4
KR
43322004-05-10 Kevin Ryde <user42@zip.com.au>
4333
4334 * numbers.c (scm_logbit_p): Correction to test above the end of an
4335 inum. Reported by Jan Konecny.
4336
27968825
MV
43372004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4338
4339 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4340 scm_t_bits. Updated all users.
4341 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4342 duplicating the code.
4343 (SCM_CELL_OBJECT_LOC): New.
4344 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4345 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4346
4347 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4348 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4349 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4350 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4351 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4352 SCM_SMOB_OBJECT_3_LOC): New.
4353 * smob.c (scm_i_set_smob_flags): New function.
4354
4355 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4356 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4357 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4358 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4359 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4360 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4361
4362 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4363 taking the address of SCM_CELL_WORD_1, the latter being no longer
4364 an lvalue.
4365
4366 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4367 of casting SCM_CELL_WORD_LOC.
4368
3cf17ef0
KR
43692004-05-02 Kevin Ryde <user42@zip.com.au>
4370
37026925 4371 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4372 --disable-deprecated. Reported by Andreas Vögele.
37026925 4373
3cf17ef0 4374 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4375 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4376
c5854598
KR
4377 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4378 code has support for. Fixes building with AIX cc, which is ansi but
4379 doesn't define __STDC__. Reported by Keith Crane.
4380 (var_start): Remove macro, this variation no longer required.
4381 (scm_list_n): Use va_start directly.
4382
f26c1a32
KR
43832004-05-01 Kevin Ryde <user42@zip.com.au>
4384
4385 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4386 is now gone. Reported by Andreas Vögele.
f26c1a32 4387
dfa6017e
KR
43882004-04-28 Kevin Ryde <user42@zip.com.au>
4389
4390 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4391 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4392 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4393 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4394 Also cast through unsigned char to avoid passing negatives to those
4395 macros if input contains 8-bit values.
4396
4397 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4398 corrections to range check for signed numbers. Remove
4399 scm_remember_upto_here_1(num) from these checks, since num is used
4400 subsequently anyway.
4401
4402 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4403 avoid warning from gcc 3.4. Reported by Hyperdivision.
4404
4405 * numbers.c (scm_bit_extract): Use min instead of MIN.
4406 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4407 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4408
4409 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4410 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4411
a0d06a00 4412 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4413 Reported by Andreas Vögele.
a0d06a00 4414
dfa6017e
KR
4415 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4416 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4417 by Andreas Vögele.
dfa6017e 4418
36245b66
DH
44192004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4420
4421 * eval.c (s_macro_keyword): New static identifier.
4422
4423 (scm_m_define): Change order to first create binding and
4424 evaluating the expression afterwards.
4425
4426 (scm_m_set_x): Memoize complete set! expression. Only leave
4427 symbols if no binding exists at memoization time. Throw error if
4428 assigning to a syntactic keyword.
4429
4430 (lazy_memoize_variable): New function.
4431
4432 (CEVAL): When execution set!, perform lazy memoization if
4433 unmemoized symbol is detected.
4434
4435 * modules.c (module_variable): Return variables with unbound
4436 value.
4437
4438 * tags.h: Fix comment.
4439
4d81111e
KR
44402004-04-25 Kevin Ryde <user42@zip.com.au>
4441
da8bcb2f
KR
4442 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4443 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4444 in 8-bit locales, and ensures consistency with char-upper-case? and
4445 char-lower-case? which already use ctype.h.
4446 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4447 Remove.
4448 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4449
4d81111e
KR
4450 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4451 call. Reported by Hyperdivision.
4452
4453 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4454 Reported by Hyperdivision.
4455
4456 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4457 Hyperdivision.
4458
7e6e6b37
DH
44592004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4460
4461 Hide the implementation of ilocs and isyms in eval.c.
4462
4463 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4464 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4465 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4466 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4467 eval.h to eval.c.
4468
4469 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4470 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4471 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4472 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4473 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4474 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4475 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4476 renamed to ISYMNUM.
4477
4478 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4479 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4480 Extracted printing of ilocs and isyms to guile internal functions
4481 scm_i_print_iloc, scm_i_print_isym of eval.c.
4482
caab294f
KR
44832004-04-22 Kevin Ryde <user42@zip.com.au>
4484
7aaf4758
KR
4485 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4486
caab294f
KR
4487 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4488 rounding in x+0.5 when x is a big value already an integer. In
4489 certain hardware rounding cases x+0.5 can give an adjacent integer,
4490 leading to that as the result, when we really just wanted x itself.
4491
b1cb24ff
DH
44922004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4493
4494 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4495
4496 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4497 added const qualifiers, cast intentionally unused expressions to
4498 void for emphasis, improved comment.
4499
5065b40d
DH
45002004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4501
4502 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4503 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4504 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4505 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4506 Defined the tc8-tag for flags to be 0x04, which will mean that
4507 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4508 to the reduced number of bits and the simpler bit pattern for
4509 SCM_BOOL_F, certain machines may be able to use more efficient
4510 processor instructions to deal with SCM_BOOL_F.
4511
4512 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4513 never been defined in a released version, thus no need to
4514 deprecate them.
4515
4516 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4517 instead of tc9 tags.
4518
4519 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4520 of tc9 tags.
4521
4522 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4523 could have used this definition.
4524
4525 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4526 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4527 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4528 as isyms, as special isyms don't exist any more.
4529
9fa6c119
KR
45302004-04-18 Kevin Ryde <user42@zip.com.au>
4531
e08d2eee
KR
4532 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4533 safety.
4534
9fa6c119
KR
4535 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4536 explicit swapping code.
4537
c9cdd396
KR
45382004-04-15 Kevin Ryde <user42@zip.com.au>
4539
4540 * cpp_sig_symbols.in: Add SIGSYS.
4541
4542 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4543 recursion.
4544
4545 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4546 frac/big and frac/frac, use scm_less_p for exact comparison.
4547
83ac9c59
KR
4548 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4549 with big/inum.
4550
84a4be9a
KR
4551 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4552
84fad130
HWN
45532004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4554
6b69393d
HWN
4555 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4556
84fad130
HWN
4557 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4558 scm_c_{up,down}case.
4559 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4560 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4561
c3110a30
KR
45622004-04-06 Kevin Ryde <user42@zip.com.au>
4563
0b288f36
KR
4564 * numbers.c (scm_ash): Remove stray "}" in docstring.
4565
ea2508c8
KR
4566 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4567 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4568 calling mpz_cmp_ui in most cases.
4569
c3110a30
KR
4570 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4571 for big == abs(most-negative-fixnum) special case.
4572 (abs_most_negative_fixnum): Remove, no longer used.
4573
4574 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4575 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4576 calling (sigaction NSIG).
4577
4578 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4579 and fork error cases to do this.
4580
dec40cd2
DH
45812004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4582
4583 * eval.c (CEVAL): Don't distinguish between short and long
4584 instructions when dispatching - just always dispatch on the
4585 instruction code, which is common for short and long instructions.
4586 Further, removed unnecessary goto statements and added comment.
4587
0e7bb795
DH
45882004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4589
4590 * eval.c (scm_unmemocopy): Don't distinguish between short and
4591 long instructions when dispatching - just always dispatch on the
4592 instruction code, which is common for short and long instructions.
4593 Further, removed unnecessary goto statements, fixed indentation
4594 and replaced SCM_IMP predicates by SCM_NULLP.
4595
f9986767
DH
45962004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4597
4598 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4599 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4600 'checkmacro'.
4601
fbc42231
KR
46022004-03-31 Kevin Ryde <user42@zip.com.au>
4603
4604 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4605
434f2f7a
DH
46062004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4607
4608 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4609 SCM_DEBUGGINGP:
4610
4611 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4612 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4613 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4614 single interface that also matches the naming conventions.
4615 Probably scm_debug_mode_p should be part of the private interface
4616 anyway.
4617
4618 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4619 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4620 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4621 to scm_debug_mode_p.
4622
4623
4624 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4625
4626 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4627 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4628 from debug.h to eval.h.
4629
4630 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4631 more, just leave it with setting scm_debug_mode_p, which is
4632 equivalent for practical purposes.
4633
4634 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4635 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4636
4637 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4638
4639 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4640 static and renamed it to ceval throughout. Provide a new exported
4641 but deprecated function scm_ceval as a wrapper for backwards
4642 compatibility. The same is done for the deval/scm_deval pair of
4643 functions.
4644
4645 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4646 throughout. Defined CEVAL to ceval or deval, based on compilation
4647 phase.
4648
4649 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4650 to ceval and deval instead of calling *scm_ceval_ptr.
4651
4652 * eval.c (dispatching_eval): New deprecated static function.
4653
4654 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4655 to emulate its old behaviour as closely as possible.
4656
4657
4658 Change the evaluator such that only expressions for which pair? is
4659 true are passed to CEVAL, and such that all other expressions are
4660 evaluated outside of CEVAL:
4661
4662 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4663 expression that is assumed to be memoized already. All but
4664 expressions of the form '(<form> <form> ...)' are evaluated inline
4665 without calling an evaluator.
4666
4667 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4668 expressions of the form '(<form> <form> ...)' inline without
4669 calling an evaluator.
4670
4671 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4672 the special case of unmemoized symbols passed on the top level.
4673
4674 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4675 is known that the expression passed to CEVAL is of the form
4676 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4677 now it is known that the input expression of CEVAL is a pair.
4678
46792004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4680
4681 * eval.c (is_self_quoting_p): New static function.
4682
4683 (scm_m_quote): Use is_self_quoting_p.
4684
4685 (copy_tree): Corrected typo in comment.
4686
702551e6
HWN
46872004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4688
bfefbf18
HWN
4689 * eval.c (s_scm_copy_tree): idem.
4690
4691 * list.c (s_scm_filter): remove "pointer" from doc string.
4692
702551e6
HWN
4693 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4694
4695 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4696
4697 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4698 (display_frame): idem.
4699 (display_backtrace_file_and_line): idem.
4700
4701 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4702 arguments.
4703
3cd23214
KR
47042004-03-26 Kevin Ryde <user42@zip.com.au>
4705
88a7ae1f
KR
4706 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4707
3cd23214
KR
4708 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4709 big==0 since that never occurs.
4710
4711 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4712 scm_modular_expt, matching scheme level name `modulo-expt'.
4713
4714 * numbers.c (scm_modular_expt): Return a negative remainder for a
4715 negative divisor, the same as `modulo' does.
4716
47172004-03-26 Eric Hanchrow <offby1@blarg.net>
4718
4719 * numbers.c, numbers.h (scm_modular_expt): New function.
4720
2926035a
KR
47212004-03-25 Kevin Ryde <user42@zip.com.au>
4722
4723 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4724 return inexact as required by r5rs.
4725
62360b89
DH
47262004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4727
4728 * eval.c: Separated some definitions relevant for execution from
4729 the memoization part of the file.
4730
4731 (copy_tree): New static function
4732
4733 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4734 structures are detected now and will lead to an exception instead
4735 of forcing guile to run in an endless loop, using up all the
4736 system's memory. Second, arrays in the cdr of an improper list
4737 are now copied. See the new test cases in eval.test.
4738
47392004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
4740
4741 * posix.c (scm_gethostname): Make sure len is initialised before
4742 it is used. Restructured to (hopefully) represent possible
4743 configurations more clearly in the code. Added unwind handler.
4744
3bd3bae8
KR
47452004-03-23 Kevin Ryde <user42@zip.com.au>
4746
4747 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4748 MAXHOSTNAMELEN when available.
4749
254bf78d
MV
47502004-03-21 Marius Vollmer <mvo@zagadka.de>
4751
4752 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4753 terminator. Rewritten the logic as a state machine, I must have
4754 been doing too much VHDL lately...
4755
4756 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4757 themselves. Thanks to Han-Wen Nienhuys!
4758
4759 * list.c: Changed docstrings so that they no longer talk about
4760 returning 'pointers' to something.
4761
009c34a2
HWN
47622004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4763
4764 * gc.c: remove set_debug_cell_accesses! when
4765 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4766 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4767 debugging conditionally.
4768
54733c95
KR
47692004-03-21 Kevin Ryde <user42@zip.com.au>
4770
4771 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4772
bbaf8747
KR
47732004-03-20 Kevin Ryde <user42@zip.com.au>
4774
4775 * posix.c (scm_gethostname): Preserve errno across free() call.
4776
726f82e7
HWN
47772004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4778
4779 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4780 free cells.
4781
e1350d6a
KR
47822004-03-14 Kevin Ryde <user42@zip.com.au>
4783
4784 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4785 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4786
62055253
KR
47872004-03-07 Kevin Ryde <user42@zip.com.au>
4788
4789 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4790 than "GMT" always.
4791 (filltime): Make zname parameter "const".
4792
92e64b87
MD
47932004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4794
4795 * threads.c, threads.h (scm_c_scm2thread): New function.
4796
004ad931
KR
47972004-02-29 Kevin Ryde <user42@zip.com.au>
4798
4799 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4800 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4801 particular don't assume "defined (__alpha__) && ! defined (linux)"
4802 means OSF. Remove "SCO" code, which was not really SCO specific and
4803 which John W. Eaton advises should be long past being needed.
4804
4805 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4806 error throw.
4807
72ea45ac
KR
48082004-02-24 Kevin Ryde <user42@zip.com.au>
4809
4810 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4811
2af0602e
KR
48122004-02-22 Kevin Ryde <user42@zip.com.au>
4813
4814 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4815 complex, same as for two args. (Handle only inum, big, real, frac).
4816
b114eafe
KR
48172004-02-21 Kevin Ryde <user42@zip.com.au>
4818
4819 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4820 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 4821 Reported by Andreas Voegele.
b114eafe 4822
1e55d288
NJ
48232004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4824
4825 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4826 validation.
4827
4828 * read.c (scm_lreadparen): Removed.
4829 (scm_lreadparen1): Renamed scm_i_lreadparen.
4830
eb741d98
HWN
48312004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4832
4833 * list.c (scm_list_n): validate non-immediate arguments;
4834 this will catch forgotten a SCM_UNDEFINED.
4835
4e28ba5e
MV
48362004-02-18 Marius Vollmer <mvo@zagadka.de>
4837
4838 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4839 Thanks to Bill Schottstaedt!
4840
4841 * socket.h (scm_gethost): Removed prototype it is already in
4842 "net_db.h". Thanks to Bill Schottstaedt!
4843
ef861ead
KR
48442004-02-18 Kevin Ryde <user42@zip.com.au>
4845
4846 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4847 order parameter to mpz_import, in fact with just one word there's no
4848 order to worry about at all.
4849
4850 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4851 and frac==complex, make an exact comparison rather than converting
4852 with fraction2double.
4853
4854 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4855 shared library, since environ is not directly available there.
4856
4857 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4858 standard.
4859
4860 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4861 errno EINVAL in case localtime and gmtime don't set it.
4862 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4863 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4864
ae43d08e 48652004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 4866
c9ea6462
KR
4867 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4868 which were permitted in the past for these.
4869
292dfa7f
KR
4870 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
4871 previous change to numbers.c.
4872
ae43d08e
KR
4873 * script.c (scm_shell_usage): Print bug-guile email address, as per
4874 GNU standard. Reported by Han-Wen Nienhuys.
4875
711a9fd7
MD
48762004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4877
4878 * unif.c (scm_make_uve): Removed local variable and simplified
4879 code in order to avoid compiler used uninitialized warnings.
4880
4881 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
4882 scm_hash_map.
4883 (scm_hash_fold): Use scm_call_3 directly in the call to
4884 scm_internal_hash_fold instead of going via fold_proc (which is
4885 now removed).
4886 (scm_hash_for_each): Use a trampoline +
4887 scm_internal_hash_for_each_handle.
4888 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
4889 functions.
4890
3da7f6b2
KR
48912004-02-12 Kevin Ryde <user42@zip.com.au>
4892
344a212f
KR
4893 * ports.c (scm_port_line): In docstring, note first line is 0.
4894 (scm_set_port_line_x): In docstring, note first line is 0.
4895 (scm_port_column): In docstring, there's no default to current input
4896 port, and remove shared port-line @defun.
4897 (scm_set_port_column_x): In docstring, there's no default to current
4898 input port, note first column is 0, remove shared set-port-line!
4899 @defun.
4900
3da7f6b2
KR
4901 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
4902 convert args the same way that array-set! does.
4903
4904 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
4905 for dvect.
4906 (scm_array_p): Add missing "break"s in switch, fix llvect test look
4907 for "l" not "s", fix dvect to be false for singp(prot) since such a
4908 value is for fvect.
4909 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
4910 (exactly_one_third): New variable.
4911 (scm_init_unif): Initialize it.
3da7f6b2 4912
cd21f5eb
NJ
49132004-02-10 Neil Jerram <neil@ossau.uklinux.net>
4914
4915 * read.c (scm_read_opts): Change `escaped-parens' to
4916 `elisp-strings'.
4917
16353acc
NJ
49182004-02-08 Neil Jerram <neil@ossau.uklinux.net>
4919
4920 * read.c (scm_read_opts): New opts `elisp-vectors' and
4921 `escaped-parens'.
4922 (s_vector): New.
4923 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
4924 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
4925 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
4926 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
4927 `escaped-parens' option set.
4928 (scm_read_token): If elisp vector syntax active, disallow [ and ]
4929 in tokens.
4930 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
4931 (scm_lreadparen1): New.
4932
4933 * read.h: Remove conditionally compiled last arg to
4934 scm_lreadparen.
4935 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
4936
f62b9dff
HWN
49372004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
4938
4939 * eval.c (m_expand_body): remove stray variable new_body.
4940
ef5b6b61
MV
49412004-01-22 Marius Vollmer <mvo@zagadka.de>
4942
4943 * eval.c (m_expand_body): Rewrite the expression in place (by
4944 overwriting FORMS) also when a letrec is constructed, not only
4945 when no definitions are found. Do not return rewritten expression
4946 to emphasize the in-place rewriting. Changed all users.
4947
7eec4c37
HWN
49482004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
4949
4950 * gc.c: add protected_object_count, a number that is dumped from
4951 gc_stats()
4952
25ffbdac
MV
49532004-01-11 Marius Vollmer <mvo@zagadka.de>
4954
4955 * dynwind.h, dynwind.c (scm_frame_unwind,
4956 scm_frame_unwind_handler): Renamed and changed all uses.
4957 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
4958
08568c95
KR
49592004-01-11 Kevin Ryde <user42@zip.com.au>
4960
4961 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
4962 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
4963 changes made to scheme-compound.texi.
4964
5565749c
MV
49652004-01-10 Marius Vollmer <mvo@zagadka.de>
4966
25ffbdac
MV
4967 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
4968 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
4969
4970 * guile-snarf.in: Use mkdir to create a unique temporary directory
4971 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 4972
fc6bb283
MV
49732004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4974
7ebccde8
MV
4975 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
4976 argument since it is always zero now. Changed all callers.
4977 Removed code for handling fluids.
96e3b2f8
MV
4978
4979 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
4980 the wind chain explicitely. Use scm_c_with_fluid for the common
4981 case of only one fluid.
4982 (scm_with_fluid): New.
4983 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
4984
fc6bb283 4985 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
4986 (scm_with_fluid): New.
4987 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
4988
4989 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
4990 do the unwinding directly. It is simple enough.
4991
4992 * dynwind.h, dynwind.c: Did the following renamings:
4993 scm_begin_frame -> scm_frame_begin,
4994 scm_end_frame -> scm_frame_end,
4995 scm_on_unwind -> scm_frame_unwind,
4996 scm_on_rewind -> scm_frame_rewind,
4997 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
4998 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
4999 Changed all uses.
5000
5001 * aync.h, async.c: Did the follwing renamings:
5002 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5003 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5004 Changed all uses.
5005
5006 * ports.h, ports.c: Did the follwing renamings:
5007 scm_with_current_input_port -> scm_frame_current_input_port,
5008 scm_with_current_output_port -> scm_frame_current_output_port,
5009 scm_with_current_error_port -> scm_frame_current_error_port.
5010 Changed all uses.
5011
298ab996
KR
50122004-01-07 Kevin Ryde <user42@zip.com.au>
5013
5014 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5015 Reported by Richard Todd.
5016
ba40113e
KR
5017 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5018 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5019
298ab996
KR
5020 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5021 traversing the args list, fixes segv if an improper list is given.
5022 Reported by Rouben Rostamian.
5023
aacff585
MV
50242004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5025
5026 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5027 swap_data on stack, use a 'malloc obj'.
5028
5029 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5030 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5031 scm_i_... since they are internal. Changed all uses.
5032
5033 * dynwind.c (frame_print): Removed, use the default printer.
5034 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5035 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5036 to protect SCM values.
5037
5038 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5039 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5040 Changed all uses.
5041 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5042
49c00ecc
MV
50432004-01-05 Marius Vollmer <mvo@zagadka.de>
5044
5045 * ports.h, ports.c (scm_with_current_input_port,
5046 scm_with_current_output_port, scm_with_current_error_port): New.
5047
5048 * async.h, async.c (scm_with_blocked_asyncs,
5049 scm_with_unblocked_asyncs): New.
5050
dab514a8
MV
50512004-01-03 Marius Vollmer <mvo@zagadka.de>
5052
5053 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5054 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5055 New.
5056 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5057 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5058 function when the outermost wind point has been reached. The
5059 latter is used to copy a continuation stack at the right time.
5060 scm_dowinds remains available.
5061 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5062 tc16_guard, guards_print): Removed.
5063 (scm_internal_dynamic_wind): Reimplemented using frames.
5064
5065 * continuations.c (copy_stack): New, do only the stack copying
5066 part of copy_stack_and_call.
5067 (copy_stack_and_call): Copy the stack after unwinding and before
5068 rewinding.
5069 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5070 copy_stack_and_call.
5071
441a25d9
KR
50722004-01-04 Kevin Ryde <user42@zip.com.au>
5073
5074 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5075 can give bad results due to rounding.
441a25d9 5076
e0499207
KR
5077 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5078 setzone/restorezone protection for DOS.
5079
89fcf1b4
MV
50802003-12-26 Marius Vollmer <mvo@zagadka.de>
5081
5082 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5083 and scm_t_uintmax to be defined in scmconfig.h
5084
caff34d4
KR
50852003-12-03 Kevin Ryde <user42@zip.com.au>
5086
5087 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5088
5089 * numbers.c (scm_make_ratio): Check for numerator equal to
5090 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5091 giving integer -1.
5092
5093 * numbers.c (scm_real_part): Return fraction unchanged rather than
5094 converting to flonum.
5095
2d0b85ac
DH
50962003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5097
5098 * modules.c (module_variable): Fixed (and thus simplified) the
5099 definition of SCM_BOUND_THING_P to reflect the fact that since
5100 after the 1.4 series of guile, obarrays only hold variable
5101 objects.
5102
2297981d
MV
51032003-11-30 Marius Vollmer <mvo@zagadka.de>
5104
5105 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5106
5107 From Paul Jarc:
5108
5109 * read.c (scm_lreadr): Signal an error for invalid escape
5110 sequences in strings. Code cleanups too.
5111
5112 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5113 writing control characters in strings.
5114
51152003-11-21 Marius Vollmer <mvo@zagadka.de>
5116
5117 * ports.c (scm_drain_input): Bug fix: only access the port after
5118 checking that it indeed is one.
5119
5c264007
DH
51202003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5121
5122 * eval.c (s_bad_define): New static identifier.
5123
5124 (m_body): Fixed comment.
5125
5126 (scm_m_define): Don't generate memoized code for definitions that
5127 are not on the top level. As a consequence, no memoized code at
5128 all is generated for definitions any more: Top level definitions
5129 are executed immediately during memoization and internal
5130 definitions are handled separately in m_expand_body.
5131
5132 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5133 definitions. Consequently, there is no unmemoizing code any more
5134 that might modify the environment. Thus, the old scm_unmemocopy
5135 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5136
5137 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5138 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5139 over SCM_NIMP in places, where the argument is known to be part of
5140 a proper list.
5141
018d4730
KR
51422003-11-21 Kevin Ryde <user42@zip.com.au>
5143
5144 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5145 for bignums.
5146
5147 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5148 to share some shifting.
5149
5150 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5151 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5152 since gc does this.
5153
4bca30d8
MV
51542003-11-19 Marius Vollmer <mvo@zagadka.de>
5155
fb16d26e
MV
5156 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5157 structure. Previously, not all cases with a negative denominator
5158 were covered.
5159
4bca30d8
MV
5160 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5161 scm_divide2real when forming the fractional part. This allows
5162 "#e1.2" to yield 6/5.
5163
5164 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5165 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5166 fractions were equal to each other regardless of value. Ooops.
5167
5168 * numbers.c (scm_rationalize): Return an inexact result when given
5169 inexact arguments.
5170
5171 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5172 non-numbers.
5173
bdf26b60
MV
51742003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5175
5176 Support for exact fractions from Bill Schottstaedt! Thanks!
5177
5178 * print.c (scm_iprin1): Handle fractions.
5179
5180 * objects.h (scm_class_fraction): New.
5181 * objects.c (scm_class_fraction): New.
5182 (scm_class_of): Handle fractions.
5183
5184 * hash.c (scm_hasher): Handle fractions.
5185
5186 * numbers.c: New code for handling fraction all over the place.
5187 (scm_odd_p, scm_even_p): Handle inexact integers.
5188 (scm_rational_p): New function, same as scm_real_p.
5189 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5190 New exact functions that replace the inexact 'dsubr'
5191 implementations.
5192 (scm_numerator, scm_denominator): New.
5193
5194 * numbers.h (SCM_NUMP): Recognize fractions.
5195 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5196 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5197 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5198 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5199 SCM_FRACTION_REDUCED): New.
5200 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5201 New prototypes.
5202 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5203 scm_rational_p): New prototypes.
5204 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5205 scm_i_print_fraction): New prototypes.
5206
5207 * goops.c (create_standard_classes): Create "<fraction>" class.
5208
5209 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5210
5211 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5212 case in the switch, but do nothing for now.
5213
5214 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5215 to doubles when calling 'dsubr' functions.
5216
5217 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5218
28fda544
RB
52192003-11-18 Rob Browning <rlb@defaultvalue.org>
5220
5221 * gen-scmconfig.c (main): remove public definition of
5222 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5223 direct typedef of long_long and ulong_long inside deprecated block
5224 when appropriate.
5225
5226 * deprecated.h: move long_long and ulong_long definitions to
5227 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5228 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5229
b58e7420
MV
52302003-11-17 Marius Vollmer <mvo@zagadka.de>
5231
9a1d7d7c
MV
5232 * hash.c (scm_string_hash): New hashing algorithm that takes the
5233 complete string into account.
5234
b58e7420
MV
5235 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5236 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5237 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5238 SCM_ASSYNT.
b58e7420
MV
5239
5240 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5241 the "-e" option instead of scm_str2symbol. This allows things
5242 like (@ ...) to be specified for the entry point.
5243
461bffb1
DH
52442003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5245
5246 * eval.c (scm_m_letstar): Create memoized code in place to
5247 minimize consing.
5248
6f81708a
DH
52492003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5250
5251 * eval.c (s_splicing): Commented and reformulated.
5252
5253 (lookup_global_symbol, lookup_symbol): New static functions.
5254
5255 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5256
5257 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5258 creating a temporary pair for scm_lookupcar.
5259
5260 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5261 created deprecated wrapper function scm_unmemocar.
5262
5263 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5264 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5265 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5266 undefineds, sym_three_question_marks): Moved around without
5267 modifications.
5268
5269 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5270
910b5125
DH
52712003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5272
5273 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5274 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5275 No further modifications.
5276
c86c440b
DH
52772003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5278
5279 * eval.c (s_mixed_body_forms): New static identifier.
5280
5281 (canonicalize_define, scm_m_define): The check for a bad
5282 expression is performed in canonicalize_define now.
5283
5284 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5285 static helper functions for m_expand_body.
5286
5287 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5288 expand user defined macros. Fixed handling of the definition/
5289 expression boundary. Fixed handling of definitions grouped with
5290 'begin. Use canonicalize_define to expand definitions.
5291
3890131a
MV
52922003-11-13 Marius Vollmer <mvo@zagadka.de>
5293
b58e7420
MV
5294 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5295 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5296
5df36eac
MV
5297 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5298 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5299 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5300 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5301 New macros from Paul Jarc. Thanks!
5302
3890131a
MV
5303 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5304 return NULL when the machine type is unknown. Previously,
5305 gc_os_dep.c would refuse to compile.
5306
430b8401
DH
53072003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5308
5309 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5310 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5311 scm_m_body to m_body.
5312
328dc9a3
DH
53132003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5314
5315 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5316 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5317 scm_m_expand_body to m_expand_body and made it static. Added
5318 deprecated wrapper scm_m_expand_body.
5319
5320 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5321 of scm_m_expand_body.
5322
c2337a61
KR
53232003-11-09 Kevin Ryde <user42@zip.com.au>
5324
5325 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5326 argument. Reported by Mike Gran.
5327
ced8edb0
DH
53282003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5329
5330 * eval.c (s_missing_body_expression): New static identifier.
5331
5332 (s_body): Removed.
5333
5334 (scm_m_expand_body): Fixed core dump when passing a body with
5335 defines, but without expressions (see additions to syntax.test).
5336 Use ASSERT_SYNTAX to signal syntax errors.
5337
0f572ba7
DH
53382003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5339
5340 * eval.c (canonicalize_define): New static helper function.
5341
5342 (memoize_define, canonicalize_define): Extract handling of
5343 function currying to canonicalize_define.
5344
2510c810
DH
53452003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5346
5347 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5348 Make sure that error checking in debug mode is not worse than in
5349 standard mode.
5350
34adf7ea
DH
53512003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5352
5353 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5354 handled in scm_m_body any more, but rather in scm_m_lambda.
5355
5356 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5357 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5358 calling functions of scm_m_body.
5359
5360 (scm_m_lambda): Avoid unnecessary consing when creating the
5361 memoized code.
5362
89bff2fc
DH
53632003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5364
5365 * eval.c (s_expression): Added comment.
5366
5367 (s_empty_combination, error_unbound_variable): New static
5368 identifiers.
5369
5370 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5371 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5372 signal syntax errors.
5373
5374 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5375 scheme objects.
5376
60a49842
DH
53772003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5378
5379 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5380 Grouped together with unmemocopy, without modifications.
5381
5382 (build_binding_list, unmemocopy): Renamed names of list arguments
5383 and variables to reflect the actual order of the list elements.
5384
70c1c108
DH
53852003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5386
5387 * eval.c (s_defun): New static identifier.
5388
5389 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5390 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5391 when creating the memoized code.
5392
0ee39677
KR
53932003-10-19 Kevin Ryde <user42@zip.com.au>
5394
5395 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5396
5397 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5398 in accordance with R5RS, which just mpz_get_d doesn't really give.
5399
9a848baf
DH
54002003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5401
5402 * eval.c (s_bad_slot_number): New static identifier.
5403
5404 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5405 signal syntax errors. Avoid unnecessary consing when creating the
5406 memoized code.
5407
da48db62
DH
54082003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5409
5410 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5411 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5412 errors. Avoid unnecessary consing when creating the memoized
5413 code.
5414
5415 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5416 standard case. Make sure line and file information are copied to
5417 every created expression.
5418
82b3e2c6
DH
54192003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5420
5421 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5422 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5423 when creating the memoized code.
5424
5425 (scm_m_atbind): Reversed the order, in which the init expressions
5426 are stored and executed. The order of execution is now equal to
5427 the order in which the initializers of the let-forms are executed.
5428 Use check_bindings and transform_bindings.
5429
5430 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5431 !SCM_NULLP. Added some comments.
5432
21628685
DH
54332003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5434
5435 * eval.c: Sorted include files alphabetically.
5436
5437 (scm_m_begin): Added comment.
5438
5439 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5440 unnecessary consing when creating the memoized code.
5441
5442 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5443 syntax errors. Be more specific about the kind of error that was
5444 detected.
5445
5446 (scm_m_quote, unmemocopy): As an optimization, vector constants
5447 are now inserted unquoted into the memoized code. During
5448 unmemoization the quotes are added again to provide syntactically
5449 correct code.
5450
d6754c23
DH
54512003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5452
5453 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5454 scm_m_expand_body, check_bindings): Extracted syntax checking of
5455 bindings to new static function check_bindings.
5456
5457 (scm_m_let, memoize_named_let): Extracted handling of named let to
5458 new static function memoize_named_let.
5459
5460 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5461 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5462 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5463 unnecessary consing when creating the memoized code.
5464
03a3e941
DH
54652003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5466
5467 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5468 static identifiers.
5469
5470 (s_clauses, s_formals, s_duplicate_formals): Removed.
5471
5472 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5473 specific about the kind of error that was detected. Prepare for
5474 easier integration of changes for separated memoization.
5475
da48db62 54762003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5477
5478 * eval.c (s_duplicate_binding): New static identifier.
5479
5480 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5481
5482 (scm_m_define): Added comment about how we check for duplicate
5483 formals.
5484
5485 (scm_m_do): Added check for duplicate bindings.
5486
5487 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5488 unnecessary consing when creating the memoized code.
5489
5490 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5491 scm_c_improper_memq to c_improper_memq, since it is not exported.
5492
5493 (transform_bindings): Call scm_c_memq rather than
5494 scm_c_improper_memq.
5495
5496 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5497
da48db62 54982003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5499
5500 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5501 static identifiers.
5502
5503 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5504 specific about the kind of error that was detected. Avoid use of
5505 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5506 code, this way also making sure that file name, line number
5507 information etc. remain available.
5508
da48db62 55092003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5510
5511 * eval.c (memoize_as_thunk_prototype): New static function.
5512
5513 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5514 Avoid unnecessary consing when creating the memoized code.
5515
9b9a35b6
KR
55162003-10-12 Kevin Ryde <user42@zip.com.au>
5517
5518 * list.c (scm_append): Track argument number and use in error.
5519
cc56ba80
DH
55202003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5521
5522 * eval.c (s_missing_expression, s_bad_variable): New static
5523 identifiers.
5524
5525 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5526 R5RS terminology for the naming of variables. Be more specific
5527 about the kind of error that was detected. Make sure file name,
5528 line number etc. are added to all freshly created expressions.
5529 Avoid unnecessary consing when creating the memoized code.
5530
609a8b86
DH
55312003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5532
5533 * eval.c (s_extra_expression, s_misplaced_else_clause,
5534 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5535
5536 (s_extra_case_clause): Removed.
5537
5538 (scm_m_case, scm_m_cond): If a clause appears after an else
5539 clause, report a misplaced else clause.
5540
5541 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5542 specific about the kind of error that was detected. Handle bound
5543 'else and '=>. Avoid unnecessary consing when creating the
5544 memoized code.
5545
5546 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5547 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5548 syntactic keyword '=>.
5549
58a2510b
DH
55502003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5551
5552 * eval.c (scm_m_case): Allow empty lists of case labels.
5553
2a6f7afe
DH
55542003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5555
5556 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5557
5558 * print.c (scm_isymnames): Add names for the new memoizer codes.
5559
5560 * eval.c (s_missing_clauses, s_bad_case_clause,
5561 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5562 literal_p): New static identifiers.
5563
5564 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5565 specific about the kind of error that was detected. Check for
5566 duplicate case labels. Handle bound 'else. Avoid unnecessary
5567 consing when creating the memoized code.
5568
5569 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5570 the syntactic keyword 'else.
5571
e6729603
DH
55722003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5573
5574 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5575 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5576
5577 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5578 unnecessary consing when creating the memoized code.
5579
9ddeb776
KR
55802003-10-09 Kevin Ryde <user42@zip.com.au>
5581
5582 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5583 cast gives for values bigger than a long, or for nan or inf.
5584
df5af69a
DH
55852003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5586
5587 * smob.h (scm_make_smob_type): Made the declaration match the
5588 definition.
5589
da0e6c2b
MV
55902003-10-07 Marius Vollmer <mvo@zagadka.de>
5591
5592 * goops.c, objects.h, smob.c, smob.h: Make type names char
5593 const * instead of char *. Thanks to Paul Jarc!
5594
591924eb
KR
55952003-10-02 Kevin Ryde <user42@zip.com.au>
5596
ff6ea7b9 5597 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5598 rather than scm_strport_to_string, so as to guard against the port
5599 having been closed by the called procedure. Reported by Nic Ferrier.
5600
f03314f9
DH
56012003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5602
5603 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5604
5605 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5606 tags.h to deprecated.h.
5607
534c55a9
DH
56082003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5609
5610 This set of patches introduces a new tc7 code scm_tc7_number for
5611 numbers. Bignums, reals and complex numbers are turned from smobs
5612 into subtypes of scm_tc7_number.
5613
5614 * tags.h (scm_tc7_number): New.
5615
5616 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5617 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5618 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5619 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5620 (scm_class_of), print.c (scm_iprin1), smob.c
5621 (scm_smob_prehistory): Don't handle bignums, reals and complex
5622 numbers as subtypes of scm_tc7_smob any more.
5623
5624 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5625 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5626
29c4382a
DH
56272003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5628
5629 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5630 sizeof (scm_t_complex) to determine the memory size of the
5631 malloc'd area for complex numbers.
5632
47ae1f0e
DH
56332003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5634
5635 * numbers.c (scm_bigequal): Fixed.
5636
859b6b2f
MV
56372003-09-16 Marius Vollmer <mvo@zagadka.de>
5638
5639 * stime.c (scm_current_time): 'time' does not set errno so don't
5640 use SCM_SYSERROR for reporting errors.
5641
e17d318f
DH
56422003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5643
5644 This set of patches eliminates the dependency between the
5645 implementation of evaluator specific memoization codes and special
5646 constants like #f, '() etc. ('flags'), which are not evaluator
5647 specific. The goal is to remove definitions of evaluator
5648 memoization codes completely from the public interface. This will
5649 make it possible to experiment more freely with optimizations of
5650 guile's internal representation of memoized code.
5651
5652 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5653
5654 * print.c (iflagnames): New array, holding the printed names of
5655 guile's special constants ('flags').
5656
5657 (scm_isymnames): Now holds only the printed names of the
5658 memoization codes.
5659
5660 (scm_iprin1): Separate the handling of memoization codes and
5661 guile's special constants.
5662
5663 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5664 SCM_IFLAGNUM): new
5665
5666 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5667 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5668 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5669 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5670 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5671 values.
5672
5673 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5674
5675 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5676 tc9 macros and scm_tc9_flag.
5677
eecac806
MV
56782003-09-15 Marius Vollmer <mvo@zagadka.de>
5679
5680 * posix.c (scm_setgroups): Check that the gid list is not too
5681 long. Thanks to Paul Jarc!
5682
22f2cf2d
DH
56832003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5684
5685 * tags.h: Reduced the number of short instructions from 14 to 13.
5686 The typecode of the former 14th short instruction is now used to
5687 represent long instructions. Changed some comments to reflect
5688 this fact.
5689
5690 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5691 previously used by SCM_IM_DEFINE.
5692
5693 (SCM_IM_DEFINE): Turned into a long instruction.
5694
5695 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5696 instruction.
5697
5698 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5699 code that is separate from all instructions, one level of dispatch
5700 for long instructions can be eliminated.
5701
5702 * print.c (scm_isymnames): Removed some commented code.
5703
62f548e1
MV
57042003-09-12 Marius Vollmer <mvo@zagadka.de>
5705
97a61c5f
MV
5706 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5707 compiler on IA64.
5708
50e0ba57
MV
5709 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5710
5711 * modules.c (scm_module_reverse_lookup): Check that the obarray
5712 really is a hashtable and do nothing if not.
5713
62f548e1
MV
5714 * inline.h: Use "extern inline" only with GCC. Use "static
5715 inline" else.
5716
0d5e3480
DH
57172003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5718
5719 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5720 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5721
5722 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5723 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5724 deprecated.h.
5725
6b412e91
DH
57262003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5727
5728 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5729 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5730
5731 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5732 0.0==some_expression to some_expression==0.0. The latter is
5733 better readable. The former is preferred by some people, since it
5734 leads to a compiler error when confusing == with =. However, when
5735 using gcc, a warning will be issued if in an if-statement an
5736 assigment appears. Since many Guile developers are using gcc,
5737 such errors will not remain unnoticed anyway. We can therefore
5738 focus on better readability.
5739
7e3b25bf
DH
57402003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5741
5742 * tags.h: Added description of Guile's type system. Removed some
5743 old and misleading comments.
5744
3ea39242
DH
57452003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5746
5747 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5748 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5749
5d7d39ff
DH
57502003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5751
5752 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5753
5754 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5755 respective SLOPPY macro.
5756
baa84a20
DH
57572003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5758
5759 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5760 type string, not SCM_TYP7S.
5761
ba15f500
KR
57622003-09-03 Kevin Ryde <user42@zip.com.au>
5763
5764 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5765 2s-complement.
5766
53bb8782
KR
5767 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5768 current timezone requiring SCM_DEFER_INTS.
5769
defdc4b4
NJ
57702003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5771
5772 * script.c (scm_compile_shell_switches): Make -s switch optional
5773 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5774 VanDevender for the patch!)
5775
0f008a15
KR
57762003-08-30 Kevin Ryde <user42@zip.com.au>
5777
5778 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5779 and to have non-integer types rejected as per other logical funcs.
5780
438a3ba1
KR
57812003-08-28 Kevin Ryde <user42@zip.com.au>
5782
5783 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5784
98dceb37
KR
57852003-08-23 Kevin Ryde <user42@zip.com.au>
5786
5787 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5788 thread safe, and could take a long time too.
5789
1fa79a38
KR
57902003-08-22 Kevin Ryde <user42@zip.com.au>
5791
5792 * numbers.c (scm_difference): Correction to bignum - negative inum.
5793
d97f9b42
KR
57942003-08-14 Kevin Ryde <user42@zip.com.au>
5795
5796 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5797 [__GNUC__]: Use volatile asm macros rather than a function call.
5798 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5799 macros while defining functions.
5800
5801 * simpos.c (getenv): Use <stdlib.h> for prototype.
5802 (scm_system): In docstring, refer to status:exit-val rather than
5803 "functions above".
5804
b9052fcc
KR
58052003-08-09 Kevin Ryde <user42@zip.com.au>
5806
5807 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5808 list set by source-properties! rather than an SRCPROPS object,
5809
8e5b4b9e
KR
58102003-07-29 Kevin Ryde <user42@zip.com.au>
5811
5812 * properties.c (scm_primitive_property_ref): In docstring, note
5813 parameters to not-found-proc, use hyphens rather than underscores for
5814 that parameter name.
5815 (scm_primitive_property_set_x): In docstring, VAL is the value
5816 parameter not CODE.
5817
20703ac4
MV
58182003-07-27 Marius Vollmer <mvo@zagadka.de>
5819
c6ccee34
MV
5820 * print.c (scm_print_symbol_name): handle more weird characters by
5821 escaping the symbol name properly. Thanks to Paul Jarc!
5822
2f4931bf
MV
5823 * posix.h (scm_setgroups): New prototype.
5824 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5825 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5826 Don't use SCM_WRITABLE_VELTS.
5827
265c456f
MV
5828 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5829 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5830 Matthias Koeppe!
5831
20703ac4
MV
5832 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5833 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5834 compiles when SCM_C_INLINE is undefined.
5835
59c4bb82
DH
58362003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5837
5838 * __scm.h: Reformulated the architecture and compiler properties
5839 in terms of properties of scm_t_bits and SCM variables rather than
5840 in terms of c standard types. This is since it is not known which
5841 of the standard types scm_t_bits and SCM variables will be defined
5842 to.
5843
d7850c8d
KR
58442003-07-24 Kevin Ryde <user42@zip.com.au>
5845
5846 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5847 and real.
5848
8a0c514f
KR
58492003-07-18 Kevin Ryde <user42@zip.com.au>
5850
5851 * numbers.c (scm_product): In complex * bignum, correction to
5852 REAL/IMAG fetch, x is the complex, not y.
5853
0aacf84e
MD
58542003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5855
5856 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5857 scm_inf_p test as Scheme values.
5858 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5859 and a positive inum.
5860 Use GNU indentation style.
5861
192de9a4
DH
58622003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5863
5864 * values.c (scm_values): Build lists of length 1 by using
5865 scm_list_1 instead of using scm_cons.
5866
bbb4438a
KR
58672003-07-10 Kevin Ryde <user42@zip.com.au>
5868
b58c85ce
KR
5869 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5870 * list.c (scm_list_n): Ditto.
5871
bbb4438a
KR
5872 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
5873
287f8ad1
KR
58742003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
5875
5876 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
5877 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
5878 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
5879 the other using intptr_t.
5880
005d2366
KR
58812003-07-08 Kevin Ryde <user42@zip.com.au>
5882
0aacf84e 5883 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
5884 (scm_magnitude): Use hypot.
5885
5886 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
5887 @footnote since it doesn't go through to guile-procedures.txt.
5888
5889 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
5890 outside @var to quieten makeinfo, and use @code.
5891
cbfe8e62
HWN
58922003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5893
5894 * gc-malloc.c (decrease_mtrigger): new function
5895 (increase_mtrigger): new function, separate debug registering and
5896 mtrigger administration.
5897 (scm_gc_realloc): bugfix: do mtrigger administration before the
5898 actual realloc, for the realloc might invalidate a GC-d segment of
5899 memory. Thanks to Sam Hocevar for pointing this out.
5900 (scm_gc_realloc): use scm_malloc_reregister instead of
5901 unregistering and registering in sequence.
5902
aeb4c2e1
HWN
59032003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5904
5905 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
5906
4c27f8d2
HWN
59072003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5908
5909 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
5910 clauses.
5911
983e697d
MV
59122003-06-29 Marius Vollmer <mvo@zagadka.de>
5913
5914 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
5915 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
5916 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
5917 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
5918 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
5919 the release_1_6 branch.
5920
78b6566e
SJ
59212003-06-25 Stefan Jahn <stefan@lkcc.org>
5922
5923 * continuations.c: Redeclaration of getcontext() via the
5924 __asm__ ("getcontext") directive.
5925
5926 * continuations.h: Include <ucontext.h> instead of
5927 <sys/ucontext.h>.
5928
1ebb8497
KR
59292003-06-21 Kevin Ryde <user42@zip.com.au>
5930
5931 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
5932 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
5933 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
5934 available.
5935 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
5936 (isfinite): Remove, conflicts with C99 isfinite().
5937
fbf85ba4
MV
59382003-06-19 Marius Vollmer <mvo@zagadka.de>
5939
5940 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
5941 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
5942 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
5943 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
5944 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
5945 the release_1_6 branch.
5946
fcc5d734
SJ
59472003-06-14 Stefan Jahn <stefan@lkcc.org>
5948
5949 * threads.h: Redefined scm_getspecific() and scm_setspecific()
5950 to be functions instead of macros.
5951
5952 * threads.c: Conditionalized inclusion of <sys/time.h> and
5953 <unistd.h>.
5954 (scm_getspecific, scm_setspecific): Made these two function
5955 real part of the API.
5956
5957 * posix.c (s_scm_putenv): Added some code to make a
5958 (putenv "FOO="), i.e. setting an empty string, work also on
5959 Win32 systems. Thanks to Kevin Ryde for the proposal.
5960
c3ae8e07
KR
59612003-06-12 Kevin Ryde <user42@zip.com.au>
5962
75b14838
KR
5963 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
5964 freebsd to comment about need to use unsetenv.
c3ae8e07 5965
9d9fa092
MV
59662003-06-02 Marius Vollmer <mvo@zagadka.de>
5967
5968 * ports.c (scm_peek_char): Safe the column of the port around the
5969 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
5970
f2478375
KR
59712003-06-07 Kevin Ryde <user42@zip.com.au>
5972
5973 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
5974 and friends required by scm_t_bits setups.
5975
6375e040
DH
59762003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5977
5978 * tags.h (scm_tc2_int): Added.
5979
5980 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
5981 scm_tc2_int.
5982
5983 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
5984 scm_tcs_closures): Hard coded values replaced by symbolic ones.
5985
f5c6ec2f
DH
59862003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5987
5988 * eval.c: Partially undid my patch from 2003-05-31. This patch
5989 caused the segfault referenced in the previous changelog entry.
5990
47dbd81e
DH
59912003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5992
5993 * tags.h: Fixed comment about the immediate type code layout.
5994
5995 * eval.c: Fixed handling of non-special instructions. Without
5996 this patch, guile will segfault on (#\0) and similar instructions.
5997
3ec52c51
KR
59982003-06-05 Kevin Ryde <user42@zip.com.au>
5999
6000 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6001 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6002
e418bd7c
KR
6003 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6004 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6005
d0624e39
DH
60062003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6007
6008 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6009 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6010 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6011 generalized it to apply not only to C level functions but also to
6012 scheme level functions.
6013
6014 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6015 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6016 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6017 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6018 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6019 respectively.
6020
6021 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6022 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6023 eval.h into eval.c and a copy is placed into deprecated.h.
6024
6025 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6026 into eval.c. This definition was not part of the API in any
6027 officially released version of guile and thus does not need to go
6028 through a phase of deprecation.
6029
e90c3a89
DH
60302003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6031
d0624e39
DH
6032 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6033 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6034 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6035 definitions are make static and renamed from scm_s_xxx to s_xxx.
6036 In deprecated.c the original definitions are copied.
6037
d0624e39
DH
6038 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6039 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6040 eval.h into eval.c and a copy (slightly modified to work in user
6041 code) is placed into deprecated.h.
6042
6043 * eval.c: Use the local static s_xxx definitions instead of the
6044 scm_s_xxx definitions throughout.
6045
14b18ed6
DH
60462003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6047
6048 This set of patches separates the representation of the cxr family
6049 of functions (car, cdr etc.) from the dsubr family of functions
6050 (i. e. functions that take a double precision floating point
6051 argument). Further, the algorithm for handling the cxr function
6052 is improved.
6053
6054 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6055 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6056 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6057 cosh, tanh), objects.c (scm_class_of), procprop.c
6058 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6059 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6060 typecode for the dsubr family of functions.
6061
6062 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6063 ramap_dsubr.
6064
6065 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6066 (scm_init_pairs): Make use of the (now usable) second cell element
6067 of a scm_tc7_cxr function to implement the cxr family of functions
6068 more efficiently.
6069
2ca0d207
DH
60702003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6071
6072 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6073 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6074 end of an if-else-if-sequence of checks.
6075
9a069bdd
DH
60762003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6077
6078 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6079 execution. Generalize apply_closure to apply_proc and use that
6080 for call-with-values.
6081
e910e9d2
DH
60822003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6083
6084 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6085 a non closure.
6086
1e498fbd
SJ
60872003-05-30 Stefan Jahn <stefan@lkcc.org>
6088
6089 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6090 appropriately for mingw32 hosts.
6091
6092 * numbers.h: Defining copysign(), isnan() and finite() to
6093 be prefixed by a single '_' for mingw32 hosts.
6094
c47e2599
KR
60952003-05-30 Kevin Ryde <user42@zip.com.au>
6096
6097 * numbers.c (z_negative_one): New variable.
6098 (scm_init_numbers): Initialize it.
6099 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6100
2e945bcc
SJ
61012003-05-29 Stefan Jahn <stefan@lkcc.org>
6102
6103 * win32-dirent.c: Use malloc() instead of scm_malloc().
6104
6105 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6106 warning.
6107
6108 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6109 mingw32 build.
6110
6111 * modules.c (s_scm_module_import_interface): Renamed local
6112 variable interface to _interface. Seems like 'interface'
6113 is a special compiler directive for the mingw32 compiler.
6114
6115 * mkstemp.c: Provide prototype to avoid compiler warning.
6116
6117 * load.c (s_scm_search_path): Fixed absolute and relative
6118 path detections for native Windows platforms.
6119
6120 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6121 to build on mingw32).
6122
6123 * gc-freelist.c ("s_scm_map_free_list",
6124 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6125
6126 * fports.c (fport_fill_input): Disable use of
6127 fport_wait_for_input() on Win32 platforms.
6128
6129 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6130
6131 * Makefile.am: Modified some rules for cross compiling.
6132
ddd8f927
DH
61332003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6134
6135 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6136 proper function object and the correct number of arguments are now
6137 performed in the application part of SCM_CEVAL.
6138
6139 (scm_badformalsp): Removed.
6140
f8ba2197
DH
61412003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6142
6143 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6144
79f55b7c
MD
61452003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6146
a502595f
MD
6147 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6148 always being false by inserting preprocessor conditional. (Thanks
6149 to Bruce Korb.)
6150
79f55b7c
MD
6151 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6152 (void *) in order to avoid an aliasing warning; thanks to Bruce
6153 Korb.)
6154
6155 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6156
6157 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6158 SCM_STACK_PTR.
6159
6160 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6161 thread->base --> t->base.
6162
6163 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6164
47dee228
MV
61652003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6166
6167 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6168 scm_variable_set_name_hint, scm_builtin_variable,
6169 scm_internal_with_fluids, scm_make_gsubr,
6170 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6171 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6172 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6173 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6174 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6175 scm_make_subr_with_generic, scm_make_subr_opt,
6176 scm_call_catching_errors, scm_make_smob_type_mfpe,
6177 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6178 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6179 branch. Some have been slightly rewritten.
6180 (scm_i_object_chars, scm_i_object_length): New, to support
6181 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6182
e681d187
DH
61832003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6184
6185 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6186 names and inits in the memoized code of do.
6187
7e59d9d4
MD
61882003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6189
6190 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6191 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6192 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6193 a compilation error if error-on-warning is enabled).
6194
9950a42c
MV
61952003-05-17 Marius Vollmer <mvo@zagadka.de>
6196
6197 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6198 removes preprocessor directives from the snarfage that might
6199 otherwise confuse us. These directives appear when compiling with
6200 "-g3", for example.
6201
0068984b
HWN
62022003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6203
26e68795
HWN
6204 * ChangeLog: add my surname
6205
0068984b
HWN
6206 * srcprop.c (scm_finish_srcprop): use
6207 scm_gc_register_collectable_memory()
6208 (scm_make_srcprops): idem.
6209
131805f0
HWN
62102003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6211
6212 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6213 wrap-around for scm_mtrigger
6214 (scm_gc_register_collectable_memory): abort on overflowing
6215 scm_mallocated().
6216
d4611024
KR
62172003-05-13 Kevin Ryde <user42@zip.com.au>
6218
6219 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6220 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6221
7aaf8dc9
MD
62222003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6223
dfd03fb9
MD
6224 * backtrace.c (scm_display_error_message): Introduced fancy
6225 printing with max level 7 and length 10. (Purpose: avoid printing
6226 gigantic objects in error messages.)
6227
6228 * print.c, print.h (scm_i_port_with_print_state): New function.
6229
6230 * print.c (scm_iprin1, scm_printer_apply,
6231 scm_port_with_print_state): Use scm_i_port_with_print_state.
6232 (scm_simple_format): Modified not to destroy print states.
6233 (print_state_mutex): New mutex.
6234 (scm_make_print_state, scm_free_print_state, scm_prin1):
6235 Lock/unlock print_state_mutex.
6236
7aaf8dc9
MD
6237 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6238 Use current names in definitions.
6239
a4d9ffa1
KR
62402003-05-10 Kevin Ryde <user42@zip.com.au>
6241
6242 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6243
d25e96a4
KR
6244 * numbers.c (scm_integer_length): On negative bignums, adjust
6245 mpz_sizeinbase to account for it looking at absolute value where we
6246 want ones-complement.
6247
6248 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6249 since we're only using the ulong return value, and x might not fit.
6250
5bf6a6f0
DH
62512003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6252
6253 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6254 read. This will allow to make the definition in read.c static.
6255
f58c472a
DH
62562003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6257
6258 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6259 from evalext to eval. This will allow to make some of the
6260 definitions in eval.c static.
6261
90382aeb
KR
62622003-05-06 Kevin Ryde <user42@zip.com.au>
6263
6264 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6265 (scm_logcount): Use mpz_com, not mpz_neg.
6266
3b88ed2a
DH
62672003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6268
6269 The purpose of this patch is to make guile's internal memoizers
6270 distinguishable from memoizing macros created on the scheme level
6271 or from user provided primitive memoizing macros. The reason is,
6272 that the internal memoizers are the only ones that are allowed to
6273 transform their scheme input into memoizer byte code, while all
6274 other memoizing macros may only transform scheme code into new
6275 scheme code.
6276
6277 To achieve this, a new macro type 'builtin-macro!' is introduced.
6278 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6279 this will change when the memoizer and executor are separated.
6280
6281 * macros.[ch] (scm_i_makbimacro): New.
6282
6283 * macros.h (SCM_BUILTIN_MACRO_P): New.
6284
6285 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6286
6287 * eval.c, goops.c: All of guile's primitive memoizing macros are
6288 primitive builtin-macros now.
6289
6290 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6291 builtin-macros are handled equally to memoizing macros.
6292
b0780eb1
MV
62932003-05-04 Marius Vollmer <mvo@zagadka.de>
6294
6295 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6296 work around a bug in GCC 2.95.2 but is now a bug in itself.
6297
1cbf4fe9
MV
62982003-05-02 Marius Vollmer <mvo@zagadka.de>
6299
6300 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6301 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6302 scm_tcs_symbols): New.
6303
1a61d41b
MV
63042003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6305
096ecbaf
MV
6306 * deprecated.h, deprecated.c (scm_protect_object,
6307 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6308 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6309 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6310 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6311 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6312 scm_ptob_descriptor, scm_port_rw_active,
6313 scm_close_all_ports_except): New.
6314
1a61d41b
MV
6315 * ports.c (scm_c_port_for_each): New function, mostly copied from
6316 scm_port_for_each.
6317 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6318 * ports.h (scm_c_port_for_each): New prototype.
6319
c8e1d354
MD
63202003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6321
6322 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6323 macro was introduced in anticipation of GOOPS method compilation
6324 code.)
6325
6326 * goops.c: Removed binding of @dispatch.
6327
a4aa2134
DH
63282003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6329
6330 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6331 instructions that bind the macros on the scheme level back to
6332 goops.c in order to make sure again that the bindings go into the
6333 (oop goops) module and are not visible from the outside.
6334
9fbee57e
DH
63352003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6336
6337 * eval.c: Non functional change: Separated R5RS and non-R5RS
6338 macros into different sections of the file and ordered the
6339 memoizers alphabetically.
6340
12841895
DH
63412003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6342
6343 * eval.c (scm_ilookup): Rewritten to improve readability.
6344
6a3f13f0
DH
63452003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6346
6347 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6348 Partially reverted patch from 2003-04-23 in oder to find a better
6349 compromise between readability and debuggability.
6350
b0c5d67b
DH
63512003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6352
6353 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6354 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6355 definitions of the special goops memoizers from goops.[ch] to
6356 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6357 throughout guile.
6358
b9ad392e
MD
63592003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6360
6361 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6362
6363 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6364
6365 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6366
6367 * ioext.c (scm_fdes_to_ports): Ditto.
6368
6369 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6370 lock/unlock scm_i_port_table_mutex.
6371
6372 * strports.c (scm_mkstrport): Ditto.
6373
6374 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6375
6376 * fports.c (scm_fdes_to_port): Ditto.
6377
d0b07b5d
DH
63782003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6379
6380 This set of patches contains no functional changes, only debatable
6381 minor stylistic ones. Still, in order to prepare a patch between
6382 my local copy and the CVS version, I decided to submit the changes
6383 below. Then, the patch will hopefully only contain relevant
6384 modifications :-)
6385
6386 * eval.c (iqq): Added const specifier.
6387
6388 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6389 Use NULL instead of 0 to indicate that a pointer is returned.
6390 Removed some misleading 'fall through' comments.
6391
6392 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6393 Split up long expressions into smaller ones to be more debugging
6394 friendly.
6395
a98e8e98
DH
63962003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6397
6398 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6399 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6400 rather than casting to SCM.
6401
c178c3a6
DH
64022003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6403
6404 * sort.c, pairs.h: Removed unnecessary includes.
6405
d339981a
DH
64062003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6407
6408 * sort.c: Replaced hand-made trampline code by the new official
6409 mechanism from eval.c. This fixes a segfault in the new test file
6410 sort.test.
6411
6412 (quicksort, compare_function, scm_restricted_vector_sort_x,
6413 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6414 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6415 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6416 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6417 eval.c.
6418
6419 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6420 cmp_fun_t): Removed.
6421
6422 (compare_function): Added.
6423
6424 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6425 arithmetics with index arithmetics. Changed quicksort to work on
6426 an array of SCM values instead of an array of characters. Avoid
6427 bytewise copying of SCM elements. Avoid allocating memory on the
6428 stack with alloca. Fixed some comments.
6429
821f18a4
DH
64302003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6431
6432 * eval.c (EXTEND_ENV): Eliminated.
6433
6434 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6435 EXTEND_ENV.
6436
94fb5a6e
DH
64372003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6438
6439 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6440
6441 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6442 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6443
6444 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6445 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6446 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6447 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6448 functions such that they check if the object is a non-immediate.
6449 Further, renamed identifiers to use the scm_dbg_ prefix and made
6450 their inclusion into the lib dependent of the
6451 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6452
fce0b22d
DH
64532003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6454
6455 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6456 debug option.
6457
1685446c
DH
64582003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6459
821f18a4 6460 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6461 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6462 any calls to SCM_NCONSP any more.
6463
6464 * unif.c (l2ra): Eliminate redundant check.
6465
9ff1720f
DH
64662003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6467
6468 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6469 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6470 SCM_NNULLP. Now, guile itself does not include any calls to
6471 SCM_NNULLP any more.
6472
05b15362
DH
64732003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6474
6475 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6476 scm_copy_tree): Place assignment expressions which are part of
6477 other expressions into an expression of their own.
6478
0c88d7df
DH
64792003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6480
6481 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6482 compare SCM values with !=.
6483
5cb22e96
DH
64842003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6485
6486 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6487 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6488 and definition of the memoizer for the generalized set! macro from
6489 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6490 define the macro object.
6491
6492 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6493 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6494 eval.c, it is made static and renamed to s_set_x.
6495
6496 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6497 over SCM_N<foo>.
6498
a44a9715
DH
64992003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6500
6501 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6502 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6503 to undefineds and registered the object as a permanent object.
6504
6505 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6506 static in eval.c, renamed it to f_apply and registered the object
6507 as a permanent object.
6508
1b43d24c
DH
65092003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6510
5cb22e96 6511 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6512 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6513
aec16f99
DH
65142003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6515
6516 * numbers.c (scm_logtest): Fixed argument bug in the call to
6517 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6518
f96460ce
DH
65192003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6520
6521 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6522 type errors that showed up when compiling with SCM_DEBUG defined.
6523
d0f6ceb8
DH
65242003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6525
6526 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6527 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6528 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6529 fix compile errors with --disable-deprecated.
6530
19a7a089
RB
65312003-04-17 Rob Browning <rlb@defaultvalue.org>
6532
6533 * numbers.c (scm_integer_expt): fix case where we were declaring
6534 vars in the middle of a statement block. Thanks to Thamer
6535 Al-Harbash.
6536
47cd67db
MD
65372003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6538
0fd7dcd3
MD
6539 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6540 change.
6541
47cd67db
MD
6542 * eq.c (scm_eqv_p): Turned into a primitive generic.
6543
3b8b889c
RB
65442003-04-16 Rob Browning <rlb@defaultvalue.org>
6545
312006bb
RB
6546 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6547 Thanks to Boyd Gerber.
6548 Added check for __arm__ in addition to arm for LINUX and copied
6549 __s390__ defines from upstream libgc. Thanks to James Treacy for
6550 reporting the problems.
c7ef2ea1 6551
3b8b889c
RB
6552 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6553
6554 * socket.c: use SCM_CHAR_BIT.
6555
6556 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6557
6558 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6559
43261b39
MD
65602003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6561
6562 * feature.c (scm_init_feature): Always add threads feature.
6563
58241edc
MD
65642003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6565
6566 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6567 scm_at_assert_bound_ref. (We don't want the unbound check. See
6568 oop/goops/active-slot.scm.)
6569
94e91275
RB
65702003-04-14 Rob Browning <rlb@defaultvalue.org>
6571
6572 * tags.h: scm_t_intptr should have been intptr_t.
6573
3071ea27
RB
65742003-04-13 Rob Browning <rlb@defaultvalue.org>
6575
6576 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6577 test. Instead use
6578 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6579 as gc_os_dep.c suggests is appropriate.
6580
6581 * goops.c (prep_hashsets): make static to match prototype.
6582 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6583 Chin.
6584
6585 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6586 Albert Chin.
6587
6588 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6589 Klausner.
6590
21ab2aeb
MD
65912003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6592
6593 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6594 indicated through extra fields in getters-n-setters.
6595 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6596 (Thanks to Andy Wingo.)
6597
dff96e95
HWN
65982003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6599
6600 * gc-segment.c: add comment
6601
07921c76
RB
66022003-04-07 Rob Browning <rlb@defaultvalue.org>
6603
b5331f10
RB
6604 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6605 clash.
6606
07921c76
RB
6607 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6608 and add regression test to standalone/.
6609
66102003-04-06 Rob Browning <rlb@defaultvalue.org>
6611
6612 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6613 Thanks to Dale P. Smith.
6614
6615 * random.c: #include gmp.h.
6616 (scm_c_random_bignum): normalize result on return.
6617
6618 * init.c: #include gmp.h.
6619
6620 * numbers.h: remove the gmp.h #include (not needed now).
6621
6622 * posix.h: change occurences of "id" to something else so we don't
6623 cause trouble when included via objective-c (can't hurt, might
6624 help). Still have usage in debug.h, though.
6625
938f6b7c
MD
66262003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6627
372691d8
MD
6628 * random.c (scm_c_random_bignum): Don't generate a random number
6629 equal to m (the second argument of scm_c_random_bignum); only
6630 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6631 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6632 scm_var_random_state.
372691d8 6633
938f6b7c
MD
6634 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6635 clause.
6636
6cdb8c3f
RB
66372003-04-05 Rob Browning <rlb@defaultvalue.org>
6638
938f6b7c 6639 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6640 uses before any code.
6641
15635be5
MD
66422003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6643
1ecfd013
MD
6644 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6645 not top_srcdir.
6646
15635be5
MD
6647 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6648 processing it in order to avoid an infinite loop.
6649
6650 * print.c (scm_prin1): Remember old state of pstate->writingp.
6651
73be1d9e
MV
66522003-04-05 Marius Vollmer <mvo@zagadka.de>
6653
6654 * Changed license terms to the plain LGPL thru-out.
6655
ad815c06
RB
66562003-04-04 Rob Browning <rlb@defaultvalue.org>
6657
6658 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6659 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6660 rewrite to handle GMP bignums.
6661
6662
6663 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6664
6665 * ports.c (scm_getc): minor tweak.
6666
6667 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6668 rewrite to handle GMP bignums.
6669
6670 * numbers.c: rewrite *many* functions to handle GMP bignums.
6671
6672 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6673 handle GMP bignums.
6674
6675 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6676
6677 * init.c (check_config): remove SCM_BIGDIG conditionals.
6678 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6679
6680 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6681
6682 * eval.c: remove SCM_BIGDIG conditionals.
6683
6684 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6685
6cdb8c3f
RB
66862003-03-31 Rob Browning <rlb@defaultvalue.org>
6687
6688 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6689 to Kevin Ryde.)
6690
66912003-03-27 Rob Browning <rlb@defaultvalue.org>
6692
6693 * threads.h: fix various preprocessor usages of new public
6694 symbols to expect 0 or 1 values rather than 1 or undefined.
6695 i.e. change #ifdef to #if, etc.
6696
6697 * threads.c: fix various preprocessor usages of new public
6698 symbols to expect 0 or 1 values rather than 1 or undefined.
6699 i.e. change #ifdef to #if, etc.
6700
6701 * tags.h: fix various preprocessor usages of new public
6702 symbols to expect 0 or 1 values rather than 1 or undefined.
6703 i.e. change #ifdef to #if, etc.
6704
6705 * stacks.c: fix various preprocessor usages of new public
6706 symbols to expect 0 or 1 values rather than 1 or undefined.
6707 i.e. change #ifdef to #if, etc.
6708
6709 * stackchk.h: fix various preprocessor usages of new public
6710 symbols to expect 0 or 1 values rather than 1 or undefined.
6711 i.e. change #ifdef to #if, etc.
6712
6713 * stackchk.c: fix various preprocessor usages of new public
6714 symbols to expect 0 or 1 values rather than 1 or undefined.
6715 i.e. change #ifdef to #if, etc.
6716
6717 * sort.c: fix various preprocessor usages of new public
6718 symbols to expect 0 or 1 values rather than 1 or undefined.
6719 i.e. change #ifdef to #if, etc.
6720
6721 * read.c: fix various preprocessor usages of new public
6722 symbols to expect 0 or 1 values rather than 1 or undefined.
6723 i.e. change #ifdef to #if, etc.
6724
6725 * random.c: fix various preprocessor usages of new public
6726 symbols to expect 0 or 1 values rather than 1 or undefined.
6727 i.e. change #ifdef to #if, etc.
6728
6729 * print.c: fix various preprocessor usages of new public
6730 symbols to expect 0 or 1 values rather than 1 or undefined.
6731 i.e. change #ifdef to #if, etc.
6732
6733 * objects.c: fix various preprocessor usages of new public
6734 symbols to expect 0 or 1 values rather than 1 or undefined.
6735 i.e. change #ifdef to #if, etc.
6736
6737 * numbers.h: fix various preprocessor usages of new public
6738 symbols to expect 0 or 1 values rather than 1 or undefined.
6739 i.e. change #ifdef to #if, etc.
6740
6741 * null-threads.c: fix various preprocessor usages of new public
6742 symbols to expect 0 or 1 values rather than 1 or undefined.
6743 i.e. change #ifdef to #if, etc.
6744
6745 * lang.c: fix various preprocessor usages of new public
6746 symbols to expect 0 or 1 values rather than 1 or undefined.
6747 i.e. change #ifdef to #if, etc.
6748
6749 * lang.h: fix various preprocessor usages of new public
6750 symbols to expect 0 or 1 values rather than 1 or undefined.
6751 i.e. change #ifdef to #if, etc.
6752
6753 * iselect.h: fix various preprocessor usages of new public
6754 symbols to expect 0 or 1 values rather than 1 or undefined.
6755 i.e. change #ifdef to #if, etc.
6756
6757 * init.c: fix various preprocessor usages of new public
6758 symbols to expect 0 or 1 values rather than 1 or undefined.
6759 i.e. change #ifdef to #if, etc.
6760
6761 * gh_data.c: fix various preprocessor usages of new public
6762 symbols to expect 0 or 1 values rather than 1 or undefined.
6763 i.e. change #ifdef to #if, etc.
6764
6765 * gh.h: fix various preprocessor usages of new public
6766 symbols to expect 0 or 1 values rather than 1 or undefined.
6767 i.e. change #ifdef to #if, etc.
6768
6769 * gen-scmconfig.c: change most new public symbols to be defined to
6770 0 or 1 rather than being either 1 or undefined.
6771
6772 * gc_os_dep.c: fix various preprocessor usages of new public
6773 symbols to expect 0 or 1 values rather than 1 or undefined.
6774 i.e. change #ifdef to #if, etc.
6775 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6776
6777 * gc.h: fix various preprocessor usages of new public
6778 symbols to expect 0 or 1 values rather than 1 or undefined.
6779 i.e. change #ifdef to #if, etc.
6780
6781 * gc-card.c: fix various preprocessor usages of new public
6782 symbols to expect 0 or 1 values rather than 1 or undefined.
6783 i.e. change #ifdef to #if, etc.
6784
6785 * gc-mark.c: fix various preprocessor usages of new public
6786 symbols to expect 0 or 1 values rather than 1 or undefined.
6787 i.e. change #ifdef to #if, etc.
6788
6789 * feature.c: fix various preprocessor usages of new public
6790 symbols to expect 0 or 1 values rather than 1 or undefined.
6791 i.e. change #ifdef to #if, etc.
6792
6793 * evalext.c: fix various preprocessor usages of new public
6794 symbols to expect 0 or 1 values rather than 1 or undefined.
6795 i.e. change #ifdef to #if, etc.
6796
6797 * eval.h: fix various preprocessor usages of new public
6798 symbols to expect 0 or 1 values rather than 1 or undefined.
6799 i.e. change #ifdef to #if, etc.
6800
6801 * eval.c: fix various preprocessor usages of new public
6802 symbols to expect 0 or 1 values rather than 1 or undefined.
6803 i.e. change #ifdef to #if, etc.
6804
6805 * eq.c: fix various preprocessor usages of new public
6806 symbols to expect 0 or 1 values rather than 1 or undefined.
6807 i.e. change #ifdef to #if, etc.
6808
6809 * coop.c: fix various preprocessor usages of new public
6810 symbols to expect 0 or 1 values rather than 1 or undefined.
6811 i.e. change #ifdef to #if, etc.
6812
6813 * coop-threads.c: fix various preprocessor usages of new public
6814 symbols to expect 0 or 1 values rather than 1 or undefined.
6815 i.e. change #ifdef to #if, etc.
6816
6817 * coop-pthreads.c: fix various preprocessor usages of new public
6818 symbols to expect 0 or 1 values rather than 1 or undefined.
6819 i.e. change #ifdef to #if, etc.
6820
6821 * coop-defs.h: fix various preprocessor usages of new public
6822 symbols to expect 0 or 1 values rather than 1 or undefined.
6823 i.e. change #ifdef to #if, etc.
6824
6825 * convert.i.c: fix various preprocessor usages of new public
6826 symbols to expect 0 or 1 values rather than 1 or undefined.
6827 i.e. change #ifdef to #if, etc.
6828
6829 * continuations.c: fix various preprocessor usages of new public
6830 symbols to expect 0 or 1 values rather than 1 or undefined.
6831 i.e. change #ifdef to #if, etc.
6832
6833 * _scm.h: fix various preprocessor usages of new public symbols to
6834 expect 0 or 1 values rather than 1 or undefined. i.e. change
6835 #ifdef to #if, etc.
6836
d11d697a
MV
68372003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6838
9686f86d
MV
6839 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6840
6841 * deprecated.c, deprecated.h: New files, to collect deprecated
6842 things in one place.
6843 * Makefile.am: Added them in all the right places.
6844
d11d697a
MV
6845 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6846 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6847 builds work.
9686f86d
MV
6848 (DOT_X_FILES): Removed "iselect.x".
6849 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 6850
e3c0c3b9
RB
68512003-03-25 Rob Browning <rlb@defaultvalue.org>
6852
6853 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6854 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6855
6856 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6857
6858 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6859
6860 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6861 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6862
6863 * threads.h: replace usage of struct timespect with
6864 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6865 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6866 favor of scm_t_timespec from scmconfig.h.
6867
6868 * threads.c: move libguile/_scm.h include to the top so we pick up
6869 any critical defines like _GNU_SOURCE early. Replace usage of
6870 struct timespect with scm_t_timespec. Replace usage of
6871 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
6872 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
6873
6874 * threads-plugin.h: replace usage of struct timespect with
6875 scm_t_timespec.
6876
6877 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
6878 usage of struct timespect with scm_t_timespec.
6879
6880 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
6881 HAVE_INTTYPES_H handling to scmconfig.h. #include
6882 "libguile/__scm.h". Rework handling for scm_t_bits,
6883 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
6884 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
6885 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
6886 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
6887 SCM_HAVE_ARRAYS.
6888
6889 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
6890
6891 * struct.c: #include <config.h> if HAVE_CONFIG_H.
6892
6893 * strports.c: #include <config.h> if HAVE_CONFIG_H.
6894
6895 * strop.c: #include <config.h> if HAVE_CONFIG_H.
6896
6897 * stime.h: move handling of time related headers to scmconfig.h.
6898
6899 * stime.c: #include <config.h> if HAVE_CONFIG_H.
6900
6901 * stacks.c: replace usage of STACK_GROWS_UP with
6902 SCM_STACK_GROWS_UP.
6903
6904 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6905 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6906
6907 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6908 of uint32 and HAVE_UINT_32 with scm_t_int32.
6909
6910 * smob.c: #include <config.h> if HAVE_CONFIG_H.
6911
6912 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
6913
6914 * script.c: #include <config.h> if HAVE_CONFIG_H.
6915
6916 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
6917
6918 * scmconfig.h.top: new file -- preamble for scmconfig.h.
6919
6920 * rw.c: #include <config.h> if HAVE_CONFIG_H.
6921
6922 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
6923
6924 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6925
6926 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
6927
6928 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6929 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
6930 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
6931 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6932
6933 * ramap.c: replace usage of HAVE_LONG_LONGS with
6934 "SCM_SIZEOF_LONG_LONG != 0".
6935
6936 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
6937 "libguile/scmconfig.h".
6938
6939 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
6940
6941 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6942 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6943
6944 * posix.c: #include <config.h> if HAVE_CONFIG_H.
6945
6946 * ports.c: #include <config.h> if HAVE_CONFIG_H.
6947
6948 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6949
6950 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
6951 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
6952 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
6953 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
6954 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
6955 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
6956 "SCM_SIZEOF_LONG_LONG != 0".
6957
6958 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6959 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
6960 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
6961 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
6962
6963 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
6964
6965 * null-threads.h: replace usage of struct timespect with
6966 scm_t_timespec.
6967
6968 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
6969
6970 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
6971 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
6972 scm_t_uint64 and rename usages.
6973
6974 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
6975
6976 * load.c: #include <config.h> if HAVE_CONFIG_H.
6977
6978 * iselect.h: move handling of time related headers to scmconfig.h.
6979 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
6980 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
6981 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
6982
6983 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6984 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6985 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
6986
6987 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
6988
6989 * inline.h: #include "libguile/__scm.h" at the top. Change code
6990 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
6991 what to do instead of creating a new public #define. Rename usage
6992 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6993 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
6994 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
6995
6996 * inline.c: rearrange handling -- now we just #define
6997 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
6998 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
6999 appropriate, and we use that in inline.h along with the above
7000 define to determine how to respond.
7001
7002 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7003 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7004
7005 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7006
7007 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7008 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7009
7010 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7011
7012 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7013
7014 * gen-scmconfig.c: new file -- see comments in file for details.
7015
7016 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7017
7018 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7019 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7020
7021 * gc.h: replace usage of SIZEOF_LONG with
7022 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7023 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7024 since we handle that in scmconfig.h now.
7025
7026 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7027
7028 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7029 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7030 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7031
7032 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7033
7034 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7035 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7036
7037 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7038
7039 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7040
7041 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7042 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7043
7044 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7045
7046 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7047 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7048
7049 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7050 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7051 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7052 with "SCM_SIZEOF_LONG_LONG != 0".
7053
7054 * error.c: #include <config.h> if HAVE_CONFIG_H.
7055
7056 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7057 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7058 with "SCM_SIZEOF_LONG_LONG != 0".
7059
7060 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7061
7062 * coop.c: replace usage of struct timespect with scm_t_timespec.
7063 #include <config.h> if HAVE_CONFIG_H.
7064
7065 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7066 usage of struct timespect with scm_t_timespec. Replace usage of
7067 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7068
7069 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7070 usage of struct timespect with scm_t_timespec. Replace usage of
7071 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7072
7073 * coop-defs.h: move handling of time related headers to
7074 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7075 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7076 timespect with scm_t_timespec.
7077
7078 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7079
7080 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7081
7082 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7083 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7084
7085 * continuations.c: move libguile/_scm.h include to the top so we
7086 pick up any critical defines like _GNU_SOURCE early.
7087
7088 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7089
7090 * async.c: #include <config.h> if HAVE_CONFIG_H.
7091
7092 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7093
7094 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7095 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7096
7097 * __scm.h: move libguile/scmconfig.h include up to the top, so
7098 we're sure to pick up any critical defines like _GNU_SOURCE early.
7099 #include <limits.h> removed in favor of scmconfig.h inclusion when
7100 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7101 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7102 scmconfig.h inclusion when appropriate. Various Win32 related
7103 definitions removed in favor of scmconfig.h inclusion when
7104 appropriate.
7105 (HAVE_UINTPTR_T): definition removed (see NEWS).
7106 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7107 (HAVE_LONG_LONGS): definition removed (see NEWS).
7108 (HAVE_LONG_LONG): definition removed (see NEWS).
7109 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7110
7111 * Makefile.am: scmconfig.h is now generated by building and
7112 running gen-scmconfig.h and capturing its output. gen-scmconfig
7113 uses config.h and the configure.in generated gen-scmconfig.h to
7114 decide what to output. See gen-scmconfig.c for details.
7115 (noinst_PROGRAMS): add gen-scmconfig.
7116 (gen_scmconfig_SOURCES): new variable.
7117 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7118 cross-compiling right.
7119 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7120 (BUILT_SOURCES): add scmconfig.h.
7121
25e0bf97
MV
71222003-03-19 Marius Vollmer <mvo@zagadka.de>
7123
7124 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7125 Adrian Bunk. Thanks!
7126
74b6d6e4
MD
71272003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7128
7129 * goops.c (make_class_from_template): New fourth arg:
7130 applicablep.
7131 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7132 cpls.
7133
7134 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7135
7136 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7137 second arg: applicablep.
7138 (scm_i_inherit_applicable): New function.
7139
7140 * goops.c, goops.h (scm_class_applicable,
7141 scm_class_extended_accessor): New classes.
7142
5c9e7dad
DH
71432003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7144
7145 * procs.c (scm_procedure_documentation): Removed redundant
7146 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7147 predicates.
7148
f8af5c6d
MD
71492003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7150
c614a00b
MD
7151 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7152
109c2c9f
MD
7153 * modules.c (scm_module_import_interface): New function.
7154
f8af5c6d
MD
7155 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7156 scm_class_accessor.
7157 (scm_class_accessor): New class.
7158
a48d60b1
MD
71592003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7160
7161 * goops.c (scm_primitive_generic_generic): Enable primitive
7162 generic if not enabled.
7163 (scm_sys_goops_loaded): Setup unextended primitive generics.
7164
7165 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7166
7167 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7168 snarf macros.
7169
7170 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7171 testing example. All uses of SCM_GPROC should be converted.)
7172
7173 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7174 scm_assoc.
7175
7176 * eq.c (scm_equal_p): Turned into a primitive generic.
7177
84edc049
RB
71782003-02-27 Rob Browning <rlb@defaultvalue.org>
7179
7180 * Makefile.am (scmconfig.h): new target -- generate file from
7181 ../config.h.
7182 (modinclude_HEADERS): remove version.h.
7183 (nodist_modinclude_HEADERS): add version.h.
7184
ea5c9285
MD
71852003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7186
b4a1358c
MD
7187 This fixes a serious GC bug, introduced during the latest
7188 reorganization of the GC, which disabled freeing of structs and
7189 GOOPS objects:
7190
7191 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7192 SCM_EOL.
53af8255
MD
7193 (scm_struct_prehistory): Move scm_free_structs to
7194 scm_before_mark_c_hook.
ea5c9285 7195
b4a1358c
MD
7196 * gc-card.c (sweep_card): Check that we haven't swept structs on
7197 this card before. That can happen if scm_i_sweep_all_segments has
7198 been called from some other place than scm_igc.
7199
c35738c1
MD
72002003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7201
231a4ea8
MD
7202 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7203 (since hash tables now adapt their size).
7204
7205 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7206 (current number of prehistory bindings; hashtable code will select
7207 a prime which is greater than this value).
7208
7209 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7210 (current number of initial symbols).
7211
7212 * properties.c (scm_init_properties): Don't specify size of
7213 scm_properties_whash.
7214
7215 * objprop.c (scm_init_objprop): Don't specify size of
7216 scm_object_whash.
7217
7218 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7219
c35738c1
MD
7220 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7221
7222 The following changes introduce the use of resizable hash tables
7223 throughout Guile. It also renames the old *-hash-table* functions
7224 to *-alist-vector* and places them, together with the rest of the
7225 weak vector support, in the module (ice-9 weak-vector). We should
7226 probably introduce a new, better, API for weak references, for
7227 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7228 look like and are used like ordinary pairs.)
7229
7230 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7231 leaf_environment_fold, obarray_remove_all): Use hashtable
7232 accessors.
7233
7234 * gc.c (scm_init_storage): Moved hook initialization to
7235 scm_storage_prehistory.
7236 (scm_storage_prehistory): New function.
7237 (scm_igc): Added commentary about placement of
7238 scm_after_sweep_c_hook.
7239
7240 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7241 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7242 SCM_WVECT_WEAK_VALUE_P.
7243
7244 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7245 functions.
7246 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7247 Removed.
7248 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7249 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7250
7251 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7252 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7253
7254 * modules.c (module-reverse-lookup): Use hashtable accessors.
7255
7256 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7257
7258 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7259 scm_make_weak_value_alist_vector,
7260 scm_make_doubly_weak_alist_vector): New functions.
7261
7262 * weaks.c (scm_init_weaks_builtins): New function.
7263
7264 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7265 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7266 SCM_WVECT_NOSCAN_P): New macros.
7267
7268 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7269 and SCM_WVECT_WEAK_VALUE_P.
7270
7271 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7272 allocate_weak_vector and exported.
7273
0a4c1355
MD
72742003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7275
7276 * hashtab.c: Undid thread safety. (We decided that it's better to
7277 let the user explicitly protect the tables (or not) according what
7278 is suitable for the application.)
7279
87ca11ff
MD
72802003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7281
7282 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7283 thread safe and handle resizing tables.
7284 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7285 SCM_DEFER/ALLOW_INTS.
7286
f59a096e
MD
72872003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7288
7289 * hashtab.c (scm_vector_to_hash_table,
7290 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7291 functions.
7292 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7293 safe and handle resizing tables.
7294
7295 * weaks.c (scm_make_weak_key_hash_table,
7296 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7297 Size argument made optional. Return resizable table if not
7298 specified.
7299
4b612c5b
MD
73002003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7301
7302 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7303 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7304
b3d7f6df
MD
73052003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7306
7307 * debug.c (scm_procedure_source): Handle all objects for which
7308 procedure? is #t. (Thanks to Bill Schottstaedt.)
7309
756414cf
MD
73102003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7311
361d631f
MD
7312 * futures.c (mark_futures): Don't need to mark data of recycled
7313 futures.
7314 (scan_futures, cleanup_undead): Be smarter about marking
7315 futures---avoid unnecessary passes through future lists.
7316
756414cf
MD
7317 * futures.h, futures.c: New files; Introduced recycling of
7318 futures. For fine-grained threading this lifts performance to
7319 another level. We can now use parallelization in inner loops of
7320 Guile programs without impossible overhead.
7321
7322 * threads.h, threads.c: Moved futures to their own file.
7323
7324 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7325 (DOT_X_FILES): Added futures.x.
7326 (DOT_DOC_FILES): Added futures.doc.
7327 (modinclude_HEADERS): Added futures.h.
7328
7329 * threads.c, threads.h (scm_i_create_thread): Renamed from
7330 create_thread and made global.
7331
7332 * futures.c (scm_make_future): New procedure.
7333
7334 * eval.c: #include "libguile/futures.h".
7335
7336 * init.c: #include "futures.h"
7337 (scm_init_guile_1): Call scm_init_futures.
7338
7339 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7340
7341 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7342
7343 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7344 functions.
7345
7346 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7347
b4debead
MD
73482003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7349
7350 * threads.c (create_thread): Don't unwind dynwind chain of parent
7351 thread before creation. Just start the new thread with an empty
7352 dynwind chain.
7353
93f26b7b
MD
73542003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7355
7356 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7357
38d8927c
MD
73582003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7359
41c96c32
MD
7360 * threads.c (scm_timed_wait_condition_variable): Support timed
7361 waiting also for simple condition variables.
7362
38d8927c
MD
7363 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7364 of calling the procedure change-object-class.
7365
9cf5d9b7
MD
73662003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7367
7368 * ramap.c (scm_ramapc): Typo in error message.
7369
bbf8d523
MD
73702003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7371
b46fae00
MD
7372 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7373 slots with instance allocation.
7374
bbf8d523
MD
7375 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7376 class.
7377 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7378
7379 * goops.c (scm_generic_function_methods): Support extended
7380 generic functions.
7381
ebf9b47c
MD
73822002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7383
7384 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7385 Thanks to Neil for pointing this out!
ebf9b47c 7386
14a9ba3f
NJ
73872002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7388
7389 * lang.h: Remove declarations matching definitions removed from
7390 lang.c (just below).
7391
c6a040a8
NJ
73922002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7393
6054d805
NJ
7394 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7395 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7396 and already commented out.
7397
c6a040a8
NJ
7398 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7399 scm_lreadparen): Support reading vectors with Elisp syntax if
7400 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7401 is not currently defined, and there isn't even a configure switch
7402 to enable it yet.)
7403
3742c12f
MV
74042002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7405
7406 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7407 builds work.
7408 (EXTRA_DIST): Added version.h.in.
7409
fb50ef08
MD
74102002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7411
7412 This change makes it possible for one thread to do lazy sweeping
7413 while other threads are running. Now only the mark phase need to
7414 have all threads asleep. We should look further into this issue.
7415 Presently, I've put the locking of scm_i_sweep_mutex at
7416 "conservative" places due to my current lack of knowledge about
7417 the garbage collector. Please feel free to restrict these regions
7418 further to allow for maximal parallelism!
7419
7420 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7421
7422 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7423 scm_gc_register_collectable_memory): Substitute locking of
7424 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7425 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7426 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7427 the single-thread section (which now only contains the mark
7428 phase).
7429 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7430 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7431
7432 * threads.c (gc_section_mutex): Removed.
7433
9ed24633
MD
74342002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7435
0d48aca5
MD
7436 * threads.c (create_thread): Clear parent field in root state in
7437 order not to unnecessarily remember dead threads.
7438
9ed24633
MD
7439 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7440 (scm_trampoline_1, scm_trampoline_2): Use them.
7441
29717c89
MD
74422002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7443
7444 Partial introduction of real plugin interface.
7445
7446 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7447 (EXTRA_DIST): Added threads-plugin.c.
7448
7449 * threads-plugin.h, threads-plugin.c: New files.
7450
7451 * threads.h: #include "libguile/threads-plugin.h".
7452
7453 * threads.c: #include "libguile/threads-plugin.c".
7454
7455 * pthread-threads.c: Temporarily remove debugging functions.
7456
7457 * threads.c, threads.h (scm_yield): Added back.
7458
e29e0b09
MD
74592002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7460
7461 * threads.c (really_launch): Detach before unlocking
7462 thread_admin_mutex in order not to risk being joined.
7463 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7464 thread_admin_mutex locked during GC.
7465
7466 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7467 functions.
7468
0b6843b1 74692002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7470
6da2dfc4
MD
7471 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7472 support for debugging mutex operations.
7473
1b92fb6b
MD
7474 * threads.c (scm_thread): Removed filed joining_threads.
7475 (thread_print): Print thread number as well as address of thread
7476 structure.
0b6843b1
MD
7477 (scm_join_thread): Bugfix.
7478 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7479 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7480 scm_broadcast_condition_variable): Use the low-level API.
7481 (scm_all_threads): Return copy of thread list (to prevent
7482 unintended destruction).
7483 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7484
93cd4dcd
MD
7485 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7486 pthread "native" recursive mutex support.
7487
2ff4f181
MD
74882002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7489
28d52ebb
MD
7490 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7491 Simply lock a thread C API recursive mutex.
7492 (SCM_NONREC_CRITICAL_SECTION_START,
7493 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7494 SCM_REC_CRITICAL_SECTION_END): Removed.
7495
7496 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7497 direct calls to scm_rec_mutex_lock / unlock around the three calls
7498 to scm_m_expand_body.
7499
7500 * eval.c, eval.h (promise_free): New function.
7501 (scm_force): Rewritten; Now thread-safe; Removed
7502 SCM_DEFER/ALLOW_INTS.
7503
7504 * pthread-threads.h: Added partially implemented plugin interface
7505 for recursive mutexes. These are, for now, only intended to be
7506 used internally within the Guile implementation.
7507
7508 * pthread-threads.c: New file.
7509
7510 * threads.c: Conditionally #include "pthread-threads.c".
7511
7512 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7513 thread-safe;
7514
7515 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7516 SCM_GLOBAL_REC_MUTEX): New macros.
7517
7518 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7519 macros---use mutexes instead.
7520
7521 * tags.h (SCM_IM_FUTURE): New tag.
7522
7523 * eval.c (scm_m_future): New primitive macro.
7524 (SCM_CEVAL): Support futures.
7525 (unmemocopy): Support unmemoization of futures.
7526
7527 * print.c (scm_isymnames): Name of future isym.
7528
2ff4f181
MD
7529 * version.c: Unmade some changes to my private copy that got
7530 committed by mistake.
7531
392d2833
MD
75322002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7533
e200ddee
MD
7534 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7535 2002-12-10.
7536
392d2833
MD
7537 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7538
7539 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7540 logical place.
7541
7542 * threads.c (create_thread): Remember root object until the handle
7543 of the new thread is on all_threads list.
7544
7545 * root.c (scm_make_root): Moved copying of fluids until after
7546 creation of root handle so that the fluids are GC protected. Also
7547 removed the critical section.
7548
c4c52ebe
MD
75492002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7550
960c408c
MD
7551 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7552
3cdde9d6 7553 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7554 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7555 (scm_realloc): Serialize call to realloc
7556 (scm_calloc): Same for calloc.
7557 Thanks to Wolfgang Jaehrling!
7558 (Now we have to make sure all calls to malloc/realloc are made
7559 through scm_malloc.)
7560
960c408c
MD
7561 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7562
c4c52ebe
MD
7563 * threads.c (really_launch): Release heap (to prevent deadlock).
7564 (create_thread): Release heap before locking thread admin mutex.
7565
b0dc3d71
MD
75662002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7567
7568 * threads.c (scm_i_thread_invalidate_freelists): New
7569 function.
7570
7571 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7572
7573 * modules.c (scm_export): Inserted a return statement.
7574
06e80f59
HWN
75752002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7576
7577 * modules.c (scm_export): new function
7578
7579 * gc-card.c: add a note about malloc()/free() overhead.
7580
a12611c3
MD
75812002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7582
7583 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7584 in srcdir.
7585
c7fabadf
MD
75862002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7587
7588 These changes remove scm_ints_disabled (which hasn't has any
7589 effect in Guile for quite some time).
7590
7591 * async.c, error.h (scm_ints_disabled): Removed.
7592
7593 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7594 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7595 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7596 (old_ints): Removed.
7597
7598 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7599 critical section.
7600 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7601 SCM_ALLOW_INTS.
7602
9bc4701c
MD
76032002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7604
52340b65
MD
7605 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7606 Removed accidental #if 0 around these functions.
7607
9bc4701c
MD
7608 These changes are the start of support for preemptive
7609 multithreading. Marius and I have agreed that I commit this code
7610 into the repository although it isn't thoroughly tested and surely
7611 introduces many bugs. The bugs should only be exposed when using
7612 threads, though. Signalling and error handling for threads is
7613 very likely broken. Work on making the implementation cleaner and
7614 more efficient is needed.
7615
7616 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7617 (SCM_NONREC_CRITICAL_SECTION_START,
7618 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7619 SCM_REC_CRITICAL_SECTION_END): New macros.
7620 (SCM_CRITICAL_SECTION_START/END): Defined here.
7621
7622 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7623 the three calls to scm_m_expand_body.
7624
7625 * gc.h: #include "libguile/pthread-threads.h";
7626 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7627
7628 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7629 scm_t_key;
7630
7631 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7632 access.
7633
7634 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7635
7636 * gc-freelist.c, threads.c (really_launch): Use
7637 SCM_FREELIST_CREATE.
7638
7639 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7640
7641 * gc.c (scm_i_expensive_validation_check, scm_gc,
7642 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7643 heap administration so that those pieces of code are executed
7644 single-threaded. We might consider rewriting these code sections
7645 in terms of a "call_gc_code_singly_threaded" construct instead of
7646 calling the pair of scm_i_thread_put_to_sleep () and
7647 scm_i_thread_wake_up (). Also, we would want to have as many of
7648 these sections eleminated.
7649
7650 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7651
7652 * inline.h: #include "libguile/threads.h"
7653
7654 * pthread-threads.h: Macros now conform more closely to the
7655 pthreads interface. Some of them now take a second argument.
7656
7657 * threads.c, threads.h: Many changes.
7658
76592002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7660
7661 * Makefile.am (version.h): Changed $^ --> $< in rule for
7662 version.h.
7663
b2cbe8d8
RB
76642002-12-08 Rob Browning <rlb@defaultvalue.org>
7665
7666 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7667 (SCM_MINOR_VERSION): use @--@ substitution now.
7668 (SCM_MICRO_VERSION): use @--@ substitution now.
7669 (scm_effective_version): new function prototype.
7670
7671 * version.c (scm_effective_version): new function, also add
7672 effective-version.
7673
7674 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7675 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7676 SCM_LIBRARY_DIR.
7677 (version.h): generate this here rather than configure.in. This
7678 approach tracks source edits better (i.e. more immediately).
7679 Might be worth considering for other .in files too.
7680
5441c65c
MV
76812002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7682
7683 Reorganized thread package selection. A thread package now only
7684 implements a small set of pthread like functions and Guile
7685 implements the rest on top of that. Guile's implementation is
7686 what the "coop-pthreads" package has been previously. Support for
7687 "coop" threads has been removed until I get time to add it again.
7688
7689 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7690 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7691 null-threads.c, coop-pthreads.c.
7692 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7693 pthread-threads.h.
7694
7695 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7696
7697 * threads.h: Do not include "libguile/coop-defs.h". Include
7698 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7699 (previously deprecated) C level thread API prototypes. They are
7700 now in the thread package specific headers, "null-threads.h" and
7701 "pthread-threads.h".
7702 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7703 New.
7704 (scm_threads_init): Removed.
7705 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7706 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7707 SCM_I_THREAD_SWITCH_COUNT): Define here.
7708 (scm_single_thread_p): Removed.
7709 (scm_call_with_new_thread): Take two args directly instead of list
7710 of two args.
7711 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7712 SCM_SET_THREAD_LOCAL_DATA): Define here.
7713
7714 * threads.c: Merged with "coop-pthreads.c".
7715
7716 * null-threads.h: Implement pthread-like API as a set of macros.
7717
7718 * pthread-threads.h: New, implement pthread-like API by deferring
7719 to pthread itself.
7720
7721 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7722 has been lost in the reorganization.
7723
504d99c5
MD
77242002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7725
7726 The following change makes it possible to move procedure
7727 application dispatch outside inner loops. The motivation was
7728 clean implementation of efficient replacements of R5RS primitives
7729 in SRFI-1.
7730
7731 The semantics is clear: scm_trampoline_N returns an optimized
7732 version of scm_call_N (or NULL if the procedure isn't applicable
7733 on N args).
7734
7735 Applying the optimization to map and for-each increases efficiency
7736 noticeably. For example, (map abs ls) is 8 times faster than
7737 before.
7738
7739 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7740
7741 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7742
7743 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7744 (map, for-each): Handle also application on two args as a special
7745 case; Use trampolines.
7746
7747 Other changes:
7748
7749 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7750 (subr2oless): Removed.
7751 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7752 vector GC protected.
7753
7754 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7755 scm_out_of_range.
7756
63dd3413
DH
77572002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7758
7759 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7760
4ba5f279
MD
77612002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7762
7763 * debug.c (scm_make_iloc): Added missing "return".
7764
56ae231f
MV
77652002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7766
7767 * strports.c (scm_eval_string_in_module): Validate second arg to
7768 be a module. Thanks to Arno Peters!
7769
80b28865
DH
77702002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7771
7772 * .cvsignore: remove goops.c
7773
c88b1456
DH
77742002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7775
7776 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7777 module_variable, scm_module_lookup_closure,
7778 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7779 scm_system_module_env_p): Don't compare SCM values with C
7780 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7781 over SCM_NFALSEP.
7782
a8a19efc
DH
77832002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7784
7785 * eval.h (SCM_MAKE_ILOC): New macro.
7786
7787 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7788 the iloc bitpattern here.
7789
76734914
MD
77902002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7791
7792 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7793 part of the API, otherwise it's difficult to write Guile
7794 extensions using non-blocking I/O => moved #include
7795 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7796
7797 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7798 s_unlock_mutex.
7799
8b5b4a75
MV
78002002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7801
7802 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7803 are defined in configure.in.
7804
7805 * threads.c: Removed SCM_API from function definitions. SCM_API
7806 is only for declarations.
7807
e5a83084
MD
78082002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7809
9be8bb45
MD
7810 * coop-pthreads.h: Added support for thread specific data to the
7811 generic C API for the coop-pthreads case.
7812
e5a83084
MD
7813 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7814 change.
6c214b62 7815 (scm_cond_broadcast): Added missing function.
e5a83084 7816
7edf178e
MV
78172002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7818
7819 * coop.c (coop_next_runnable_thread): Removed, wich should have
7820 happened when GUILE_ISELECT was hard-wired.
7821
7f5b1b77
MV
78222002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7823
7caa1b07
MV
7824 * Makefile.am (libguile_la_SOURCES): Added threads.c
7825 (DOT_DOC_FILES): Added threads.doc.
7826 (DOT_X_FILES): Added threads.x.
7827 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7828 (noinst_HEADERS): Added coop-pthreads.c.
7829 (modinclude_HEADERS): Added coop-pthreads.h.
7830
7831 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7832 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7833
bb11cbf4
MV
7834 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7835 Thanks to Bill Schottstaedt!
7836
1d4cbbed
MV
7837 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7838
7f5b1b77
MV
7839 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7840 SCM_COPT_THREADS is defined.
7841 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7842 is defined.
7843
7844 * coop-pthreads.c: Some harmless renamings of internal stuff.
7845 (create_thread): New, generalized version of
7846 scm_call_with_new_thread.
7847 (scm_call_with_new_thread): Use it.
7848 (scm_spawn_thread): New, use create_thread.
7849
d52f53b1
MV
78502002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7851
7852 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7853 start testing it now.
7854
7855 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7856 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7857 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7858 is defined.
7859
30f920c3
MV
78602002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7861
7862 * scmsigs.c (signal_cell_handlers, install_handler_data,
7863 scm_delq_spine_x, really_install_handler, install_handler): New
7864 scheme for triggering signal handlers, to simplify take_signal.
7865 (take_signal): Simplified, to avoid race conditions.
7866 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7867 hasn't exited yet.
7868
7869 * async.c (scm_async_click): Reset pending_asyncs, handle
7870 signal_asyncs. Don't set cdr of a non-signal async to #f.
7871 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
7872 always. Set pending_asyncs.
7873 (scm_system_async_mark_for_thread): Check that thread has not
7874 exited.
7875 (scm_unmask_signals, decrease_block): Call scm_async_click after
7876 block_asyncs becomes zero.
7877
7878 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
7879 active_asyncs.
7880
7881 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
7882 fields.
7883 * root.c (root_mark): Mark them.
7884 (make_root): Initialize them.
7885
7886 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
7887 USE_COOP_THREADS.
7888 (scm_internal_select): Define one version for USE_COOP_THREADS and
7889 one for USE_NULL_THREADS.
7890 (scm_init_iselect): Likewise.
7891
7892 * inline.h (scm_cell, scm_double_cell): Also allow
7893 USE_COPT_THREADS to not protect the slot initializers.
7894
7895 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
7896 because threads need to be initialized before the stack, but
7897 gsubrs such as scm_timed_condition_variable_wait can only be
7898 created later.
7899
7900 * threads.h: Include "coop-pthreads.h" when requested.
7901 (scm_threads_make_mutex, scm_threads_lock_mutex,
7902 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
7903 not implemented anyway.
7904 (scm_init_thread_procs, scm_try_mutex,
7905 scm_timed_condition_variable_wait,
7906 scm_broadcast_condition_variable, scm_c_thread_exited_p,
7907 scm_thread_exited_p): New prototypes.
7908 (struct timespec): Define if not already defined.
7909 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7910 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7911 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7912 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
7913 deprecated.
7914
7915 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
7916 requested.
7917 (scm_thread_exited_p): New.
7918 (scm_try_mutex, scm_broadcast_condition_variable): Newly
7919 registered procedures.
7920 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
7921 Use the latter as the procedure for "wait-condition-variable",
7922 thus offering a optional timeout parameter to Scheme.
7923 (scm_wait_condition_variable): Implement in terms of
7924 scm_timed_wait_condition_variable.
7925 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7926 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
7927 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7928 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
7929 scm_make_mutex, etc, and deprecate.
7930 (scm_init_threads): Do not create smobs, leave this to
7931 scm_threads_init. Do not include "threads.x" file.
7932 (scm_init_thread_procs): New, include "threads.x" here.
7933
7934 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
7935 scm_null_mutex_lock, scm_null_mutex_unlock,
7936 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
7937 scm_null_condvar_wait, scm_null_condvar_signal,
7938 scm_null_condvar_destroy): Removed.
7939 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
7940 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
7941 scm_cond_destory): Do not define, they are now deprecated and
7942 handled by threads.{h,c}.
7943
7944 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
7945 (scm_threads_init): Create smobs here, using the appropriate
7946 sizes.
7947 (block): Removed, now unused.
7948 (scm_c_thread_exited_p): New.
7949 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
7950 scm_null_mutex_destroy, scm_null_condvar_init,
7951 scm_null_condvar_wait, scm_null_condvar_signal,
7952 scm_null_condvar_destroy): Removed and updated users to do their
7953 task directly.
7954 (scm_try_mutex, timeval_subtract,
7955 scm_timed_wait_condition_variable,
7956 scm_broadcast_condition_variable): New.
7957 (scm_wait_condition_variable): Removed.
7958
7959 * coop-defs.h (coop_m): Added 'level' field.
7960 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7961 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7962 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7963 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
7964 define.
7965 (coop_condition_variable_broadcast): New.
7966
7967 * coop-threads.c (scm_threads_init): Create smobs here, using the
7968 appropriate sizes.
7969 (scm_c_thread_exited_p, scm_try_mutex,
7970 scm_timed_wait_condition_variable,
7971 scm_broadcast_condition_variable): New.
7972 (scm_wait_condition_variable): Removed.
7973
7974 * coop.c (coop_new_mutex_init): Initialize level.
7975 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
7976 level.
7977 (coop_condition_variable_signal): Renamed to
7978 coop_condition_variable_broadcast and reimplemented in terms of
7979 that. Thus...
7980 (coop_condition_variable_broadcast): New.
7981
7982 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
7983
7984 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
7985
087ed40d
MV
79862002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
7987
65a23095
MV
7988 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
7989 of system headers.
7990
087ed40d
MV
7991 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
7992 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 7993 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 7994
5ec1d2c8
DH
79952002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
7996
7997 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
7998 scm_definedp to scm_defined_p and deprecated scm_definedp.
7999
100ae50d
DH
80002002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8001
8002 * async.h, async.c (scm_system_async): Fixed deprecation to work
8003 correctly when deprecated features are excluded.
8004
2794cb50
MV
80052002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8006
8007 * async.c (scm_system_async_mark_for_thread): Validate thread
8008 argument.
8009
8010 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8011
8012 * feature.c (scm_init_feature): Don't add 'threads' for
8013 USE_NULL_THREADS.
8014
8015 * inline.h (scm_cell, scm_double_cell): Also allow
8016 USE_NULL_THREADS to not protect the slot initializers.
8017
8018 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8019 "USE_THREAD".
8020
8021 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8022 (modinclude_HEADERS): Added null-threads.h.
8023
8024 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8025 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8026 (scm_init_threads): Use generic type names scm_t_mutex and
8027 scm_t_cond instead of coop_m and coop_c.
8028
8029 * null-threads.c, null-threads.h: New files.
8030
ff810d7a
MV
80312002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8032
8033 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8034 This is to support makes that know about "$<" only in pattern
8035 rules, like Sun's make.
8036
a90bdb73
MV
80372002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8038
8039 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8040 substitution. Thanks to David Allouche!
8041
e71a8bf2
DH
80422002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8043
8044 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8045 !SCM_ENABLE_DEPRECATED.
8046
41f77ff5
MV
80472002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8048
504d99c5 8049 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8050 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8051 otherwise.
8052
8053 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8054 USE_THREADS is defined. Use scm_root otherwise.
8055 (scm_sigaction_for_thread): Ignore THREAD argument when
8056 USE_THREADS is not defined. Also, move THREAD argument defaulting
8057 out of HAVE_SIGACTION section, which was a bug.
8058
6d16b125
MV
80592002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8060
8061 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8062 signal_handlers, not the closure that is used as the async.
8063 The closure is stored in signal_handler_cells, as previously.
8064
acfa1f52
MV
80652002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8066
8067 * root.h (scm_root_state): Added 'block_async' slot.
8068 (scm_active_asyncs): Removed abbrev.
8069 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8070
8071 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8072 abbrev.
8073
8074 * async.h (scm_call_with_blocked_asyncs,
8075 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8076 scm_c_call_with_unblocked_asyncs): New prototypes.
8077 (scm_mask_signals, scm_unmask_signals): Deprecated.
8078 (scm_mask_ints): Turned into a macro.
8079 * async.c (scm_mask_ints): Removed.
8080 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8081 this should not be necessary.
8082 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8083 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8084 deprecation warning and check for errornous use. Set block_asyncs
8085 instead of scm_mask_ints.
8086 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8087 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8088 scm_c_call_with_unblocked_asyncs): New.
8089
8090 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8091 Asyncs are enabled by default.
8092
34010f56
NJ
80932002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8094
8095 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8096 6th element: an input waiting thunk.
8097 (sf_input_waiting): New.
8098
9310d6f2
MV
80992002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8100
8101 * root.c (root_mark): Mark active_asyncs slot.
8102
8103 * async.c (scm_async_click): Set the cdr of a executed handler
8104 cell to SCM_BOOL_F, not SCM_EOL.
8105 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8106 and only if the handler procedure is not already present.
8107 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8108 with SCM_BOOL_F.
8109 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8110
ac48c719
RB
81112002-10-04 Rob Browning <rlb@defaultvalue.org>
8112
1360a142
RB
8113 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8114
8115 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8116 scm_lt_dlopenext, and scm_lt_dlerror.
8117 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8118 and scm_lt_dlerror.
8119 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8120 and scm_lt_dlerror.
8121 (sysdep_dynl_init): switch to scm_lt_dlinit();
8122
8123 * Makefile.am (libguile_la_LIBADD): switch to use
8124 libguile-ltdl.la.
8125
504d99c5 8126 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8127
497092c9
MV
81282002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8129
8130 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8131 * scmsigs.c (got_signal): Removed.
8132 (signal_handler_cells, signal_handler_threads): New.
8133 (take_signal): Queue the cell of the signal for the specified
8134 thread. Reset the signal handler on systems that don't have
8135 sigaction.
8136 (sys_deliver_signals): Removed.
8137 (close_1): New.
8138 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8139 extended to also set the thread of a signal and allocate a cell
8140 for it. Keep the Scheme name "sigaction". Check that signum is
8141 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8142 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8143 (scm_init_scmsigs): Allocate signal_handler_cells and
8144 signal_handler_threads vectors.
8145
8146 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8147 that system asnycs and user asyncs are separated. Reimplemented
8148 system asyncs to work per-thread.
8149
8150 * gc.c (scm_init_gc): Do not use scm_system_async.
8151
8152 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8153 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8154 Removed prototypes.
8155 (scm_i_queue_async_cell): New.
8156
8157 * __scm.h (scm_asyncs_pending_p): Removed.
8158 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8159 scm_asyncs_pending_p.
8160
8161 * async.h (scm_system_async_mark_for_thread): New prototype.
8162
8163 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8164
8165 * root.h (scm_root_state): Added new "active_asyncs" slot.
8166 * root.c (scm_make_root): Initialize it to SCM_EOL.
8167
8168 * coop-defs.h (coop_t): Added new "handle" slot.
8169 * coop-threads.c (all_threads, scm_current_thread,
8170 scm_all_threads, scm_i_thread_root): New.
8171 (scm_threads_init): Add main thread to all_threads.
8172 (scheme_launch_thread): Remove thread from all_threads when it
8173 terminates.
8174 (scm_call_with_new_thread): Initialize handle slot of coop_t
8175 structure and add new thread to all_threads.
8176 (scm_spawn_thread): Likewise.
8177
8178 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8179 * threads.c (scm_current_thread, scm_all_threads): Register as
8180 primitives.
8181
8182 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8183
480fa28d
NJ
81842002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8185
8186 * script.c (scm_compile_shell_switches): Fix bad spelling of
8187 `explicitly' in comment.
8188
81892002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8190
8191 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8192 Refer to provided? in doc string rather than deprecated feature?.
8193
3553e1d1
GH
81942002-09-24 Gary Houston <ghouston@arglist.com>
8195
8196 * inline.h (scm_double_cell): prevent reordering of statements
8197 with any following code (for GCC 3 strict-aliasing).
8198 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8199 the earlier version of the reordering prevention.
8200
4ad0814a
HWN
82012002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8202
8203 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8204
e88e4f2e
HWN
82052002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8206
8207 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8208 protection.
8209
1e71eafb
HWN
82102002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8211
8212 * inline.h: include stdio.h
8213
8214 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8215
61ef9c1f
HWN
82162002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8217
dac04e9f
HWN
8218 * gc-segment.c (scm_i_make_initial_segment): check user settings
8219 for sanity.
8220
8221 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8222 sanity.
dac04e9f
HWN
8223
8224 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8225
ffd72400
HWN
8226 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8227
8228 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8229 these won't ever wrap around with high memory usage. Thanks to
8230 Sven Hartrumpf for finding this.
ffd72400 8231
5bd4a949
HWN
8232 * gc-freelist.c: include <stdio.h>
8233
61ef9c1f
HWN
8234 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8235
ffd0ef3b
MV
82362002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8237
a27e3d14
MV
8238 * vectors.h (SCM_VECTOR_REF): New.
8239
ffd0ef3b
MV
8240 * snarf.h (SCM_DEFINE_PUBLIC): New.
8241
f8a1712b
MV
82422002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8243
8244 * socket.c (scm_addr_vector): Added size of address to arguments.
8245 Use it to avoid accessing a non-existent path in a sockaddr_un.
8246 Changed all callers.
8247
7200a36b
HWN
82482002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8249
1383773b
HWN
8250 * gc.h: remove DOUBLECELL card flags.
8251
8252 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8253 scm_realloc().
8254
8255 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8256 init loop; handle this from scm_init_card_freelist()
8257
8258 * gc-card.c (scm_init_card_freelist): init bit vector here.
8259
7200a36b 8260 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8261 num2float.i.c (FLOAT2NUM): idem
7200a36b 8262
9981de3a
HWN
82632002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8264
8265 * eval.h: prepend libguile/ to include path
8266
19647556
MV
82672002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8268
8269 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8270 years. Thanks to Martin Grabmüller!
19647556 8271
38d1262a
HWN
82722002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8273
8274 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8275 unsigned numbers for computing minimum heap increment. This
8276 prevents weird results when a a negative minimum increment is
8277 computed.
8278
f800ebfb
MV
82792002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8280
8281 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8282 instead of the old tricks.
f800ebfb
MV
8283
8284 * guile-snarf.in: Do not expect the input file to be the first
8285 argument after the optional "-o" option, just pass everything to
8286 the pre-processor without extracting the input file name.
8287
4a5309c9
HWN
82882002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8289
8290 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8291 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8292
f2893a25
HWN
82932002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8294
8295 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8296 Bill Schottstaedt for the bug report
8297
483f518b
MV
82982002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8299
8300 * print.c (scm_iprin1): Print primitives generics always as
8301 "primitive-generic" even when they have no primitive methods yet.
8302
917adc55
GH
83032002-08-17 Gary Houston <ghouston@arglist.com>
8304
8305 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8306 call.
8307
67329a9e
HWN
83082002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8309
85835e59 8310 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8311
8312 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8313 malloc.
8314
8315 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8316 only use SCM_MIN_HEAP_SEG_SIZE.
8317
8318 * ports.c (scm_add_to_port_table): add backwards compatibility
8319 function
8320
8321 * ports.h: use scm_i_ prefix for port table and port table size.
8322
f07c886a
MD
83232002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8324
8325 * vports.c (scm_make_soft_port): Initialize pt variable.
8326
dc61cbc6
MV
83272002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8328
8329 * strports.h (scm_c_eval_string_in_module,
8330 scm_eval_string_in_module): New prototypes.
8331 * strports.c (scm_eval_string_in_module): New, but use
8332 "eval-string" as the Scheme name and make second parameter
8333 optional.
8334 (scm_eval_string): Implement using scm_eval_string_in_module.
8335 (scm_c_eval_string_in_module): New.
8336 Thanks to Ralf Mattes for the suggestion!
8337
da220f27
HWN
83382002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8339
be3ff021
HWN
8340 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8341 message and abort.
8342
8343 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8344
da220f27
HWN
8345 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8346 stead of scm_t_port*. The function now takes a tag argument.
8347
eab1b259
HWN
83482002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8349
8350 * gc.h: add scm_debug_cells_gc_interval to public interface
8351
8352 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8353
8354 * gc.c (scm_i_expensive_validation_check): separate expensive
8355 validation checks from cheap ones.
8356
ba1b2226
HWN
83572002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8358
8359 * read.c (scm_input_error): new function: give meaningful error
8360 messages, and throw read-error
8361
8362 * gc-malloc.c (scm_calloc): add scm_calloc.
8363
39e8f371
HWN
83642002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8365
33138b05
HWN
8366 * tags.h: remove GC bits documentation from the tags table.
8367
39e8f371
HWN
8368 * read.c (INPUT_ERROR): Prepare for file:line:column error
8369 messages for errors in scm_lreadr() and friends.
8370
83712002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8372
8373 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8374 implementation).
8375 (scm_gc_calloc): new function
8376
26e68795 83772002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8378
5f16b897
HWN
8379 * ports.c (scm_new_port_table_entry): init port entry to 0
8380 completely.
402788a9
HWN
8381
8382 * ports.c (scm_new_port_table_entry): change function from
8383 scm_add_to_port_table. This prevents cells with null-pointers from
8384 being exposed to GC.
8385
504d99c5 8386 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8387 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8388
504d99c5 8389 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8390 to gc-stats.
8391
c8a1bdc4
HWN
8392 * numbers.c (big2str): return "0" for 0 iso. ""
8393
c2cbcc57
HWN
8394 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8395 private-gc.h: new file
c8a1bdc4
HWN
8396
8397 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8398 sweeping. More documentation in workbook/newgc.text
8399
aea06b34
MV
84002002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8401
8402 * random.c (rstate_free): Return zero.
8403
35060ae9
DH
84042002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8405
8406 * environments.c (remove_key_from_alist): Removed.
8407
8408 (obarray_remove): Simplified.
8409
6a535440
SJ
84102002-07-24 Stefan Jahn <stefan@lkcc.org>
8411
8412 * continuations.h: ia64: Include <signal.h> before
8413 <sys/ucontext.h>.
8414
bcbd25b7
DH
84152002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8416
8417 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8418
26e68795 84192002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8420
8421 * goops.c (scm_compute_applicable_methods): use
8422 scm_remember_upto_here_1 iso scm_remember_upto_here
8423
8424 * macros.c: include deprecation.h
8425
504d99c5 8426 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8427 macro arg.
504d99c5 8428 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8429
8430 * net_db.c, posix.c, socket.c: variable naming: change ans to
8431 result.
8432
8433 * sort.c (scm_merge_vector_x): accept vector as argument
8434 iso. SCM*. This is needed for full GC correctness.
8435
8436 * gc.h: undo previous undocumented changes related to #ifdef
8437 GENGC.
8438
26e68795 84392002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8440
8441 * *.c: add space after commas everywhere.
8442
8443 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8444 Document cases where SCM_WRITABLE_VELTS() is used.
8445
8446 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8447 SCM_VELTS() return a const pointer
8448 (SCM_VECTOR_SET): add macro.
8449
3063e30a
DH
84502002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8451
8452 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8453 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8454 Deprecated the special kind of built-in dynamic syntax transformer
8455 that was inaccurately named "macro". Note: The built-in syntax
8456 transformers that are named "mmacro" or "memoizing-macro" still
8457 exist, and it is these which come much closer to what one would
8458 call a macro.
8459
4c5f8e8f
NJ
84602002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8461
8462 * eval.c (unmemocopy): Fix for
8463 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8464 with internal definitions and local-eval).
8465
4f6f9ae3
GH
84662002-07-12 Gary Houston <ghouston@arglist.com>
8467
8468 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8469 defined. They don't do anything useful, especially since the
8470 only case where DYNAMIC_LINKING is undefined seems to be
8471 when --with-modules=no is given to configure, which is basically
8472 requesting that the "dynamic linking module" be omitted.
8473
8474 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8475 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8476
8477 * extensions.c (load_extension): check DYNAMIC_LINKING for
8478 scm_dynamic_call.
8479 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8480 scm_init_dynamic_linking.
8481
c21935e6
MV
84822002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8483
8484 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8485 check for Cygwin when including <winsock2.h>, this is already
8486 check for by configure. Thus, revert change from 2002-07-07.
8487
ee95d597
GH
84882002-07-10 Gary Houston <ghouston@arglist.com>
8489
9540b68f 8490 * eq.c: include <string.h>
ee95d597
GH
8491 * dynl.c: docstring editing.
8492
46732b54
GH
84932002-07-09 Gary Houston <ghouston@arglist.com>
8494
8495 * dynl.c (scm_dynamic_call): docstring editing.
8496
c09d12e0
RB
84972002-07-08 Rob Browning <rlb@defaultvalue.org>
8498
8499 * gc_os_dep.c: HURD fixes.
8500
3f6571eb
MV
85012002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8502
8503 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8504
8505 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8506 this should be compiled for BUILD host.
8507 Override default rule for
8508 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8509 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8510 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8511
8512 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8513 <winsock2.h> on Cygwin even when we have it.
8514
bd987b8e
DH
85152002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8516
8517 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8518 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8519 the code. Full number of arguments checking of closures is
8520 mandatory now. However, the option to disable the checking has
8521 most probably not been used anyway.
8522
8505e285
DH
85232002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8524
bd987b8e
DH
8525 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8526 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8527 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8528 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8529 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8530 (scm_source_properties, scm_set_source_properties_x,
8531 scm_source_property): Removed compile time option SCM_RECKLESS to
8532 clean up the code. Full number of arguments checking of closures
8533 is mandatory now. However, the option to disable the checking has
8534 most probably not been used anyway.
8505e285
DH
8535
8536 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8537 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8538
2ee08a28
GH
85392002-06-30 Gary Houston <ghouston@arglist.com>
8540
732b9327
GH
8541 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8542 do anything useful. Added a comment about need for a mutex if
8543 pre-emptive threading is supported.
8544
2ee08a28
GH
8545 * posix.c (scm_convert_exec_args), dynl.c
8546 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8547 allocate_string_pointers. 2) simplified: don't reallocate the
8548 strings, just make an array of pointers 3) avoid memory leaks on
8549 error 4) let the procedure report errors in its own name.
8550 Consequences: 1) the procedures now assume that SCM strings are
8551 nul-terminated, which should always be the case. 2) Since strings
8552 are not reallocated, it's now possible for strings passed to
8553 dynamic-args-call to be mutated.
8554
c136c920
DH
85552002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8556
8557 * __scm.h, eval.c, eval.h: Removed compile time option
8558 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8559 variable positions during memoization is mandatory. However, the
8560 option to disable the caching has most probably not been used
8561 anyway.
8562
e540802f
MV
85632002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8564
8565 * print.c (scm_simple_format): Print missing part of format before
8566 ~% control. Thanks to Daniel Skarda!
8567
4c1ffcdd
MV
85682002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8569
8570 * mkstemp.c: Added exception notice to license statement.
8571
ba1b077b
MV
85722002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8573
8dc434c7
MV
8574 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8575 it is represented as a floating point value so that we can change
8576 its sign.
8577
ba1b077b
MV
8578 From John W. Eaton <jwe@bevo.che.wisc.edu>
8579
8580 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8581
74c58131
TTN
85822002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8583
8584 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8585 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8586
8766d4b5
MV
85872002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8588
8589 * eq.c (real_eqv): New.
8590 (scm_eqv_p): Use it when comparing reals and complexes.
8591
8592 * numbers.c: Include <string.h>, for strncmp.
8593 (mem2complex): Do not create negative NaNs.
8594 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8595 NaN.
8596 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8597
1d8c3cad
MV
85982002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8599
8600 * posix.c (scm_putenv): Handle removing variables explicitely by
8601 calling unsetenv.
8602
8603 From John W. Eaton.
74c58131 8604
1d8c3cad
MV
8605 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8606 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8607 and scm_nan.
8608 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8609 [SCO && ! HAVE_ISINF] (isinf): New function.
8610 (xisinf, xisnan): New functions.
8611 (IS_INF): Delete.
8612 (isfinite): Define in terms of xisinf.
8613 (scm_inf_p, scm_nan_p): New functions.
8614 (guile_Inf, guile_NaN): New file-scope vars.
8615 (guile_ieee_init): New function.
8616 (scm_inf, scm_nan): New functions.
8617 (idbl2str): Handle Inf and NaN. Remove funny label and
8618 corresponding gotos.
8619 (ALLOW_DIVIDE_BY_ZERO): New macro.
8620 (scm_divide): Allow division by zero to occur if
8621 ALLOW_DIVIDE_BY_ZERO is defined.
8622 Handle bignums and ints as special cases.
8623
8624 Additional stuff by me:
8625
8626 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8627 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8628 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8629 NaN. They will provide their own sign.
8630 (scm_divide): Only allow divides by inexact zeros. Dividing by
8631 exact zeros still signals an errors.
74c58131 8632
7a0c65eb
TTN
86332002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8634
87b72063 8635 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8636 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8637 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8638 Thanks to Andreas Rottmann.
8639
5e423a39
GH
86402002-04-20 Gary Houston <ghouston@arglist.com>
8641
8642 * removal of unused fields in root state (thanks to Christopher
8643 Cramer for pointing out the disuse.)
8644 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8645 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8646
5e423a39
GH
8647 * root.c (root_mark): don't mark them.
8648 (scm_make_root): don't set them to #f.
8649 * init.c (scm_init_standard_ports): don't initialise with the
8650 default ports.
8651
9d2cce76
MV
86522002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8653
8654 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8655 cpp_sig_symbols.c.
8656
86572002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8658
8659 * guile-snarf.in: Do not clean input file. This would write to
8660 the $(srcdir) during a VPATH build, which is not allowed. It also
8661 isn't needed since it only works when an output filename has been
8662 specified and in that case we don't need to clean the input file
8663 because the output file will already exist.
8664
6f79b6cc
MV
86652002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8666
8667 * guile-snarf: Install the trap for removing $cleanfile only when
8668 the value of $cleanfile is actually known.
8669
21550b10
RB
86702002-04-10 Rob Browning <rlb@defaultvalue.org>
8671
8672 * .cvsignore: add versiondat.h and *.c.clean.c.
8673
bc76d628
DH
86742002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8675
8676 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8677 function, replaces macro SRCBRKP.
8678
8679 (SRCBRKP): Deprecated.
8680
8681 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8682 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8683 temporary variable.
8684
5132eef0
DH
86852002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8686
8687 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8688 CHECK_EXIT and removed all references to them.
8689
680516ba
DH
86902002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8691
8692 * debug.h (scm_ready_p, debug_print): Removed declarations.
8693
8694 * eval.c (EVALCELLCAR): Removed.
8695
8696 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8697 operation from condition.
8698
e2bd68e0
MV
86992002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8700
8701 * guile-snarf.in: When the output filename is "-", write to
8702 stdout. When no "-o" option is given, use "-" as the output
8703 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8704 output file on error when the output file name is not "-". Define
8705 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8706
8707 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8708
ab1f1094
DH
87092002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8710
8711 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8712 and the corresponding goto statements. Removed redundant code.
8713
42030fb2
DH
87142002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8715
8716 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8717 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8718 Re-enabled handing of rpsubrs and asubrs.
8719
e050d4f8
DH
87202002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8721
8722 * eval.c (SIDEVAL): Removed.
8723
8724 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8725 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8726 argument checking order for set! to locals, variables and symbols.
8727 Improvements to control structure. Removed some uses of arg1 and
8728 arg2 as temporary variables.
8729
a6d344d3
TTN
87302002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8731
8732 * guile-snarf.in: Remove "--compat=1.4" support.
8733 Add "-d" and "-D" support.
8734
8735 (deprecated_list): New var.
8736 (compat_mode_clean_xxx): Delete.
8737 (grep_deprecated): New func.
8738 ("main"): If "-d" or "-D", call `grep_deprecated'.
8739
3939e9df
NJ
87402002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8741
387d418c
NJ
8742 * hooks.h: Change scm_t_c_hookype_t everywhere to
8743 scm_t_c_hook_type.
8744
bb2c02f2 8745 Docstring fixes:
a6d344d3 8746
bb2c02f2
NJ
8747 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8748
8749 * ports.c (scm_sys_make_void_port): Use `@file'.
8750
8751 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8752 than `else'.
8753
8754 * macros.c (scm_makmacro): Don't say that the form replaces its
8755 source, because it doesn't.
8756 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8757
8758 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8759 scm_select, scm_basename), goops.c (scm_method_generic_function),
8760 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8761 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8762 spelling mistakes.
8763
3939e9df
NJ
8764 * debug.c (scm_debug_options), eval.c
8765 (scm_eval_options_interface), read.c (scm_read_options): Change
8766 incorrect @var in docstring to @code.
8767
3b3cc781
MV
87682002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8769
500b0d5b
MV
8770 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8771
3b3cc781
MV
8772 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8773 guile-snarf can remove trailing non-init code.
8774
8775 * guile-snarf.in (modern_snarf): Remove everything following and
8776 including "^:^" from the output.
8777
dff98306
DH
87782002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8779
8780 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8781
8782 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8783
2287fb53
TTN
87842002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8785
8786 * guile-snarf.in: Update copyright.
8787 Rewrite to internalize error handling.
8788 Add "--compat=1.4" handling.
8789 Add commentary.
8790
8791 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8792 (snarfcppopts): New var.
8793 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8794 (.c.doc): Use $(snarfcppopts).
8795
822250a4
TTN
8796 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8797 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8798 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8799 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8800 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8801 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8802 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8803 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8804 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8805 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8806 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8807 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8808 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8809 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8810
b7798e10
DH
88112002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8812
8813 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8814 The next step will be to remove the union 't' and simplify the
8815 code of SCM_CEVAL that way.
8816
04a98cff
NJ
88172002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8818
8819 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8820 rreadfds, rwritefds, rexceptfds): Made static.
8821
8822 * gc.c (terminating), fports.c (terminating): Renamed
8823 scm_i_terminating.
8824
16d98032
MV
88252002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8826
5046250e
MV
8827 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8828 potential overflow problems. Thanks to John W Eaton!
8829
8794207d
MV
8830 * strop.c (string_capitalize_x): Treat characters as unsigned so
8831 that 8-bit chars work. Thanks to David Pirotte!
16d98032 8832
1d15ecd3
DH
88332002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8834
8835 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8836 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8837 proc as temporary variables. Introduced temporary variables with
8838 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8839 by a more explicit predicate in some places.
8840
88412002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
8842
8843 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8844 Added lots of comments regarding the implementation of #@dispatch.
8845 Changed intra-procedure communication to use t.arg1 instead of
8846 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8847 variables. Introduced temporary variables with hopefully
8848 descriptive names for clarification. Replaced SCM_N?IMP by a more
8849 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8850 of computing the expression explicitly. Eliminate now unused
8851 label nontoplevel_cdrxbegin.
8852
8853 * goops.h (SCM_INSTANCE_HASH): New macro.
8854
8855 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8856
1ebf1566
TTN
88572002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8858
8859 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8860 "guile-snarf" moved back from `noinst_SCRIPTS'.
8861
020c890c
NJ
88622002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8863
58d233cc
NJ
8864 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8865 exists when adding a source property other than those that are
8866 handled explicitly, add the new property to the SRCPROPS obj's
8867 plist.
8868
020c890c
NJ
8869 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8870 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
8871
8872 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
8873 debug.status. It isn't needed, and it can overflow the bits
8874 reserved for it (which may lead to a segv or a GC abort).
8875
3f04400d
DH
88762002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8877
8878 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
8879 side-effecting operations from conditions and macro calls.
8880 Replaced SCM_N?IMP by a more explicit predicate in some places.
8881 Minimized the scope of some variables.
8882
97820583
SJ
88832002-03-02 Stefan Jahn <stefan@lkcc.org>
8884
8885 * convert.i.c: Fixed int <-> long conversions which would have
8886 failed if their sizes were different.
8887
38ace99e
DH
88882002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8889
8890 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
8891 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
8892 as temporary variables. Removed side-effecting operations from
8893 conditions and macro calls. Introduced temporary variables with
8894 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8895 by a more explicit predicate in some places. Removed code that
8896 was conditionally compiled if SICP was defined - which it never
8897 is.
8898
e5cb71a0
DH
88992002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8900
8901 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
8902 Removed some uses of t.arg1 and proc as temporary variables.
8903 Removed side-effecting operations from conditions and macro calls.
8904 Introduced temporary variables with hopefully descriptive names
8905 for clarification. Replaced SCM_N?IMP by a more explicit
8906 predicate in some places.
8907
6a0f6ff3
DH
89082002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8909
8910 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
8911 explicit predicate in some places.
8912
8913 (CHECK_EQVISH): Removed.
8914
8915 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
8916 variables. Removed side-effecting operations from conditions and
8917 macro calls. Introduced temporary variables for clarification.
8918 Sorted if-else-if check for the type of the last form in a list by
8919 frequency. Avoided some unnecessary tail-recursion calls.
8920
228a24ef
DH
89212002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8922
8923 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
8924 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
8925 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
8926 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
8927 scm_cell and all its uses to scm_t_cell in accordance to Guile's
8928 naming scheme for types.
8929
8930 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
8931 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
8932 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
8933 (scm_make_environment), eval.c (scm_closure), fports.c
8934 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
8935 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
8936 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
8937 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
8938 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
8939 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
8940 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
8941 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
8942 scm_alloc_cell to scm_cell.
8943
8944 * environments.c (core_environments_observe), gc.c
8945 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
8946 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
8947 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
8948 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
8949 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
8950 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
8951 (allocate_weak_vector): Renamed scm_alloc_double_cell to
8952 scm_double_cell.
8953
edb810bb
SJ
89542002-02-27 Stefan Jahn <stefan@lkcc.org>
8955
8956 * convert.i.c, convert.c: Better range checking.
8957
8958 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
8959
1ebf1566 8960 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
8961 Windows (MinGW).
8962
327d4dd3
TTN
89632002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
8964
8965 * Makefile.am: Update path to pre-inst-guile automake frag.
8966
89d7a92c 89672002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
8968
8969 * gc.c (scm_gc_sweep): Make it compile even when deprecated
8970 features are excluded.
8971
89d7a92c 89722002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
8973
8974 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
8975
4f2716b6
GH
89762002-02-25 Gary Houston <ghouston@arglist.com>
8977
8978 * convert.c: include <string.h> for convert_i.c.
8979
46151112
RB
89802002-02-24 Rob Browning <rlb@defaultvalue.org>
8981
8982 * .cvsignore: add stamp-h1.
8983
cd328b4f
NJ
89842002-02-21 Neil Jerram <neil@ossau.uklinux.net>
8985
8986 * unif.c (scm_array_to_list): Correct name, which had been
8987 accidentally changed to scm_t_arrayo_list!
8988
c709de7f
MD
89892002-02-20 Mikael Djurfeldt <mdj@linnaeus>
8990
8991 * gc.c (scm_gc_sweep): Print an error message when aborting due to
8992 underflowing scm_mallocated.
8993
c1965d31
MV
89942002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8995
8996 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
8997 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
8998 Reimplemented using the new scm_gc_malloc, etc., functions and
8999 deprecated.
9000
b606945b
TTN
90012002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9002
9003 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9004 to `noinst_PROGRAMS'.
9005 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9006 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9007
7c686ba8
MV
90082002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9009
9010 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9011 non-zero is returned from a port or smob free function.
9012 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9013 scm_gc_register_collectable_memory,
9014 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9015 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9016
9017 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9018 debug-malloc.c, dynl.c, environments.c, environments.h,
9019 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9020 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9021 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9022 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9023 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9024 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9025 appropriate. Return zero from smob and port free functions.
9026
9027 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9028
9029 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9030 messages while the GC is running.
9031 (scm_c_issue_deprecation_warning_fmt): New.
9032
9033 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9034 it is pointing to the putback buffer.
9035
66adc0a6
TTN
90362002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9037
9038 * gsubr.c (create_gsubr): On "too many args" error,
9039 also display arg count and name. Thanks to Bill Schottstaedt.
9040
0187b4f4
TTN
90412002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9042
9043 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9044
9045 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9046 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9047 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9048
9049 * guile-snarf-docs-texi.in: Bye bye.
9050
402e687c
MV
90512002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9052
9053 * symbols.c (scm_make_symbol): Fix typo in docstring.
9054
9055 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9056 scm_make_symbol): New prototypes.
9057
319b98ed
MV
90582002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9059
9060 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9061 (SCM_SYMBOL_INTERNED_P): New.
9062 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9063 SCM_MAKINUM since hash values can well be bignums.
9064 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9065 This signals a interned symbol.
9066 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9067 scm_make_symbol): New.
0187b4f4 9068
319b98ed
MV
9069 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9070
34472dfe
TTN
90712002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9072
9073 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9074 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9075 Thanks to Dave Love.
34472dfe 9076
1b39c2e3
MV
90772002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9078
9079 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9080 This might help to make unintended clashes less likely.
1b39c2e3
MV
9081 (scm_string_to_symbol): Protect the string until the symbols is
9082 created.
9083
1fa86ca5
SJ
90842002-01-31 Stefan Jahn <stefan@lkcc.org>
9085
9086 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9087 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9088 functions for the deprecated gh interface.
9089
9090 * Makefile.am: Setup rules for new `convert.*' files.
9091
af68e5e5
SJ
90922002-01-28 Stefan Jahn <stefan@lkcc.org>
9093
9094 * symbols.c (scm_c_symbol2str): New function, replacement for
9095 `gh_scm2newsymbol()'.
9096
34472dfe 9097 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9098 replacement for `gh_get_substr()'.
9099
9100 * socket.c: Include `stdint.h' if available for the `uint32_t'
9101 declaration.
9102
504d99c5 9103 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9104 compiler warning).
9105
9106 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9107
c96d76b8 91082002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9109
c96d76b8 9110 Other changes unrelated to Elisp...
34472dfe 9111
c96d76b8
NJ
9112 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9113 "if".
9114 (comments): Fix a few typos.
9115 (scm_for_each): Add parentheses around oddly unparenthesized
9116 if/while conditions.
9117
9118 * read.c (scm_read_opts): Add full stop at end of doc for
9119 `keywords' option.
9120
9121 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9122 instead of gh_symbol2scm.
9123
9124 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9125 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9126
9127 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9128 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9129
9130 First batch of changes for Elisp support...
9131
9132 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9133 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9134 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9135
9136 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9137 conditionalize compilation and initialization of Elisp support
9138 function.
34472dfe 9139
c96d76b8
NJ
9140 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9141 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9142 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9143 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9144 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9145 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9146 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9147 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9148 options.c (change_option_setting, scm_options), posix.c
9149 (environ_list_to_c), print.c (scm_iprlist), throw.c
9150 (scm_exit_status), vectors.c (scm_vector), weaks.c
9151 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9152
9153 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9154 just SCM_FALSEP.
34472dfe 9155
c96d76b8
NJ
9156 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9157 of just SCM_BOOLP.
9158
9159 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9160 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9161 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9162 (scm_m_atfop): Support function aliasing. Support both function
9163 args, which need transformation, and macro args, which do not.
9164 Add explanatory comments.
9165 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9166 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9167 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9168 SCM_NULLP || SCM_NILP instead of checks against (removed)
9169 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9170 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9171
9172 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9173 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9174 these, but I don't want to remove them yet, just in case.
9175 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9176 Elisp nil value.
9177
9178 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9179 against (removed) scm_lisp_nil.
9180 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9181 (SCM_NULL_OR_NIL_P): New.
9182
9183 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9184 SCM_VALIDATE_NULL.
9185
9186 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9187 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9188 value).
9189
9190 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9191 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9192 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9193 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9194
9195 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9196 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9197 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9198 Numbering shifted down accordingly.
9199 (SCM_ELISP_NIL): New IFLAG.
9200
9201 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9202
a392ee15
DH
92032002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9204
9205 * eval.c: Removed outdated references to "everr". Improved some
9206 comments.
9207
9208 (scm_deval_args, deval_args): Renamed scm_deval_args to
9209 deval_args, since it is not part of the interface.
9210
9211 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9212 use references to debug.vect[0] before it exists. Add parentheses
9213 to switch statement.
9214
9215 * goops.h: Added local emacs variables.
9216
24933780
DH
92172002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9218
9219 * eval.[ch] (scm_deval_args): Made static.
9220
9221 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9222 test.
9223
9224 * strings.c (scm_c_string2str): Clarified comment. Replaced
9225 THINKME by FIXME for uniformness. Removed question about whether
9226 arguments need to be protected from garbage collection: Arguments
9227 must be protected as any other variable.
9228
f9450cdb
DH
92292002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9230
9231 * procs.h (SCM_CLOSURE_BODY): New Macro.
9232
9233 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9234 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9235 get_slot_value, set_slot_value), procs.c
9236 (scm_procedure_documentation), sort.c (closureless), stacks.c
9237 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9238 SCM_CLOSURE_BODY.
9239
9240 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9241
5dc64f64
MV
92422001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9243
9244 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9245 use "cp" instead.
9246
197ee3d3
MV
92472001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9248
9249 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9250 everywhere.
9251
9252 * continuations.c (scm_make_continuation): Do not retain the
9253 throw_value when the continuation is invoked.
9254
4d4528e7
SJ
92552001-12-08 Stefan Jahn <stefan@lkcc.org>
9256
9257 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9258 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9259 THINKME's regarding the malloc policy for the missing converter
9260 routines.
9261
98347362
NJ
92622001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9263
9264 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9265 gh_symbol2scm.
9266
1fc8902f
DH
92672001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9268
9269 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9270 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9271
9272 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9273 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9274 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9275 macros.
9276
9277 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9278
9279 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9280 SCM_GC_CELL_* macros when accessing free cells.
9281
4878beec
MV
92822001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9283
9284 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9285 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9286 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9287 * strings.h (SCM_MAKE_STRING_TAG): New.
9288 * procs.h (SCM_MAKE_CCLO_TAG): New.
9289 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9290
9291 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9292 !SCM_ENABLE_DEPRECATED.
9293
9294 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9295 New.
9296
9297 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9298 signal handlers are allowed to divert the flow of control. Call
9299 scm_system_async_mark_from_signal_handler instead of
9300 scm_system_async_mark.
9301
9302
9303 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9304 scm_alloc_double_cell in their place.
34472dfe 9305
4878beec
MV
9306 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9307 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9308 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9309 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9310 scm_deprecated_newcell and scm_deprecated_newcell2.
9311
9312 gc.c (scm_tc16_allocated): Only define when including deprecated
9313 features.
9314 (scm_debug_newcell, scm_debug_newcell2): Removed.
9315 (scm_init_storage): Do not initialize scm_tc16_allocated.
9316 (scm_init_gc): Do it here.
9317 (allocated_mark): New, from old code.
9318 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9319
4878beec 9320 * inline.c, inline.h: New files.
34472dfe 9321 * Makefile.am: Added them in all the right places.
4878beec 9322
34472dfe 9323 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9324
9325 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9326 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9327 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9328 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9329 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9330 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9331 scm_alloc_double_cell, respectively.
9332
d2bc7fae
MV
93332001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9334
9335 * modules.c (scm_c_use_module): Adapt to changes to
9336 `process-use-modules'.
9337
5eec27e9
DH
93382001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9339
9340 * numbers.c (scm_divide): Fix more division by zero errors.
9341
8978878f
GH
93422001-11-21 Gary Houston <ghouston@arglist.com>
9343
9344 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9345 obsolete. autogen.sh says:
9346 invalid unused variable name: `OMIT_DEPENDENCIES'
9347
164826d3
DH
93482001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9349
9350 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9351 reporting the bug.
9352
84aff7a7
MV
93532001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9354
9355 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9356 Thanks to Eric Gillespie, Jr!
34472dfe 9357
6063dc1d
SJ
93582001-11-21 Stefan Jahn <stefan@lkcc.org>
9359
34472dfe
TTN
9360 * win32-socket.c (getservent, setservent, endservent,
9361 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9362 Appropriate replacements for M$-Windows.
9363
9364 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9365 these definitions for GUILE_DEBUG.
9366
9367 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9368 M$-Windows compiler. Include some pieces of code (protoent and
9369 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9370 native M$-Windows compiler.
9371
351982f6
MV
93722001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9373
9374 * modules.c (scm_c_export): Do nothing when the first argument is
9375 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9376
849038b5
TTN
93772001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9378
9379 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9380 also include `buildstamp'.
9381
5c790b44
RB
93822001-11-18 Rob Browning <rlb@defaultvalue.org>
9383
9384 * version.c
9385 (s_scm_major_version): use SCM_MAJOR_VERSION.
9386 (s_scm_minor_version): use SCM_MINOR_VERSION.
9387 (s_scm_micro_version): use SCM_MICRO_VERSION.
9388 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9389 SCM_MICRO_VERSION.
9390
9391 * version.h.in
9392 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9393 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9394 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9395
694a9bb3
NJ
93962001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9397
9398 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9399 Rewrite docstrings without reference to substring-move-left/right,
9400 since the latter no longer exist.
9401
302c12b4
DH
94022001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9403
9404 * eval.c: Removed bogus comment about acros.
9405
9406 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9407 Minimize scope of local variable. Eliminate dependency on
9408 macro DEBUG_EXTENSIONS.
9409
9410 (s_splicing): New error message string.
9411
9412 (scm_m_body): Issue 'bad body' message rather than 'missing
9413 expression' message.
9414
9415 (scm_m_quote): Eliminate unnecessary copying.
9416
9417 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9418 checking of the body to scm_m_body.
9419
9420 (scm_m_do): Move comment to function header. Rename arg1 to
9421 binding. Made the code a bit easier to read.
9422
9423 (evalcar): Removed.
9424
9425 (iqq): Added a comment. Changed the depth parameter to
9426 unsigned. Use size_t for vector lengths. Make sure vector object
9427 is gc protected as long as its contents are read. Add some syntax
9428 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9429 control structure a bit.
9430
9431 (scm_m_delay): Added comment about the implementation of
9432 scm_m_delay.
9433
9434 (scm_m_define): Add comment about guile's currying define
9435 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9436 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9437
9438 (scm_m_letrec1): Removed. Part of the functionality is taken
9439 over by the new function 'transform_bindings'.
9440
9441 (transform_bindings): New function. Takes over some of the
9442 functionality of removed function 'scm_m_letrec1', namely to split
9443 a list of bindings into a reversed list of variables and a list of
9444 initializers.
9445
9446 (scm_m_letrec): Call 'transform_bindings'.
9447
9448 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9449 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9450 test. Use 'transform_bindings'. Fixed scoping error with named
9451 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9452 Jerram for suggesting the fix). Cleaned up the control structure
9453 a bit.
9454
9455 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9456 unnecessary consing. Eliminated unnecessary
9457 SCM_DEFER/ALLOW_INTS.
9458
9459 (SCM_CEVAL): Un-obfuscated some loops.
9460
cecb4a5e
NJ
94612001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9462
8f85c0c6
NJ
9463 * gc.h (scm_unhash_name): Old declaration removed.
9464
9465 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9466 @code{primitive-eval}.
9467
9468 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9469 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9470 Change @deffnx lines in docstrings to say {Scheme Procedure}
9471 rather than primitive or procedure.
9472
9473 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9474 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9475 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9476 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9477 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9478 (scm_string_split, scm_string_ci_to_symbol), strings.c
9479 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9480 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9481 Docstring fixes and improvements reflecting edits that have been
9482 made in the reference manual source.
9483
9484 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9485 scm_object_property, scm_set_object_property_x): Remove invalid
9486 @deffnx lines for corresponding procedure property primitives.
9487
cecb4a5e
NJ
9488 These changes add a @deffnx C function declaration and function
9489 index entries for each Guile primitive to the copy of the doc
9490 snarf output that is used for reference manual synchronization.
9491 Online help is unchanged.
849038b5 9492
cecb4a5e
NJ
9493 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9494 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9495 name to SCM_SNARF_DOCS.
849038b5 9496
cecb4a5e
NJ
9497 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9498 snarf-check-and-output-texi.
9499
9500 * Makefile.am (guile-procedures.texi): New rule.
9501 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9502 Changed so that the last stage of doc snarfing is now performed
9503 twice, once to produce guile-procedures.txt for online help, and
9504 once to produce guile.texi for reference manual synchronization.
9505
ddea3325
DH
95062001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9507
9508 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9509 safely usable as a single statement followed by a ';', for example
9510 in an if statement.
9511
9512 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9513
72dd0a03
NJ
95142001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9515
9516 * random.c (scm_random_solid_sphere_x,
9517 scm_random_hollow_sphere_x): Correct "shere" typos.
9518
9519 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9520
9521 * version.c (scm_version): Update docstring to include
9522 `micro-version'.
9523
6558eda6
MV
95242001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9525
409b8588
MV
9526 * modules.c (scm_c_export): Call va_end after collecting the
9527 symbols.
9528
adb8c0f2
MV
9529 * strop.h, strop.c (scm_substring_move_left_x,
9530 scm_substring_move_right_x): Removed.
9531
6558eda6
MV
9532 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9533 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9534 configure does.
9535
5d8fc640
MV
95362001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9537
9538 * numbers.c: Document macros to define when including
9539 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9540 now rely on SIZEOF_ macros that have been figured out at
9541 configure time.
9542
9543 * num2integral.i.c: Adapt to new interface.
9544 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9545 target type by casting it and checking whether it is still the
9546 same. Do not try to handle bignums for integral types that are
9547 smaller than fixnums. When handling bignums, collect the
9548 magnituse first into a unsigned type, and correctly check for
9549 overflow.
9550 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9551 only -MIN_VALUE can still be negative of all negative numbers (in
9552 twos-complement).
9553
849038b5 9554 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9555
9556 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9557 HAVE_LONG_LONG depending on whether their size is non-zero.
9558
d6b8cf11
TTN
95592001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9560
9561 * strop.c (scm_string_null_p): Docfix; nfc.
9562 Thanks to Scott Lenser.
9563
9401323e
NJ
95642001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9565
9566 * extensions.c (scm_load_extension): Canonicalize docstring
9567 whitespace.
9568
9569 * unif.c (scm_uniform_array_write), ports.c
9570 (scm_current_output_port, scm_force_output), dynwind.c
9571 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9572 filesys.c (scm_open, scm_lstat), struct.c
9573 (scm_make_struct_layout), random.c (scm_random,
9574 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9575 (scm_i_index): Remove superfluous whitespace from end of docstring
9576 lines.
9577
9578 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9579 strings.c (scm_make_string), variable.c (scm_make_variable,
9580 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9581 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9582 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9583 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9584 newline at end of docstrings.
9585
9586 * modules.c (scm_set_current_module): Add missing newline to
9587 docstring.
9588
b4e15479
SJ
95892001-11-07 Stefan Jahn <stefan@lkcc.org>
9590
9591 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9592 and makes them available through Guile. That is because the
9593 Winsock-API does not store its errors in `errno' and thus cannot
9594 return error messages via `strerror (errno)'.
9595
9596 * socket.c (scm_init_socket): Initialize `win32-socket' part
9597 here under M$-Windows.
9598
d6b8cf11 9599 * numbers.h: Added missing declaration of
b4e15479
SJ
9600 `scm_sys_check_number_conversions()'.
9601
9602 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9603 and use in `(strerror)' and `(system-error)'.
9604
d6b8cf11 9605 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9606 `win32-socket.[ch]' to extra source and header files.
9607
7ab89df1
MV
96082001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9609
9610 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9611 a call to turn-on-debugging when --debug has been given instead of
9612 turning it on directly. Also, handle new `--no-debug' option,
9613 which might suppress the call to turn-on-debugging.
9614
0233bfc1
SJ
96152001-11-05 Stefan Jahn <stefan@lkcc.org>
9616
9617 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9618
8f99e3f3
SJ
96192001-11-04 Stefan Jahn <stefan@lkcc.org>
9620
9621 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9622 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9623 correctly and allows a clean build on Win32.
9624
d6b8cf11 9625 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9626 into FOO.
9627
9628 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9629 import macros for external libraries (libcrypt, libqthreads,
9630 libreadline and libregex).
9631
9632 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9633
9634 * posix.c (flock): Added support for flock() in M$-Windows.
9635
9636 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9637 of __SCM_IMPORT__.
9638
9639 * fports.c (getflags): Differentiate reading and writing pipes
9640 descriptors.
9641
9642 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9643 M$-Windows.
9644
9645 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9646 conditionalized error code if `ETIMEDOUT' is not available.
9647 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9648 timeout'.
9649
9650 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9651 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9652 each inclusion of `num2integral.i.c'.
9653 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9654
4e21fa60
MV
96552001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9656
9657 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9658 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9659
08112c95
MD
96602001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9661
7663c008
MD
9662 * print.c (scm_iprin1): Mark print state as revealed when
9663 dispatching to generic write or display.
9664
08112c95
MD
9665 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9666
f712d833
MV
96672001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9668
9669 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9670
f712d833
MV
9671 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9672 and win32-dirent.h to extra source and header files. These
9673 include the uname() and the POSIX dirent interface implementation
9674 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9675 linkers which do not allow unresolved symbols inside shared
9676 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9677 dependency.
9678
d6b8cf11
TTN
9679 * __scm.h: Defined SCM_API. This macro gets prepended to all
9680 function and data definitions which should be exported or imported
f712d833
MV
9681 in the resulting dynamic link library in the Win32 port.
9682
9683 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9684 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9685 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9686 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9687 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9688 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9689 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 9690 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
9691 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9692 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9693 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9694 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9695 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9696 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9697 vports.h, weaks.h:
9698 Prefixed each each exported symbol with SCM_API.
9699
d6b8cf11 9700 * continuations.c: Added comment about the use of the extern
f712d833
MV
9701 declarations of {get,set}context() functions used in the ia64 port.
9702
9703 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9704 is meant to be a `unsigned long *'.
9705
9706 * filesys.c: Include `direct.h' if possible. Use local
9707 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9708 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9709 able to differentiate between sockets and other file descriptors.
9710 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9711 `scm_dirname()'.
9712
9713 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9714 statement block in `scm_fport_buffer_add()'.
9715 Some corrections in `getflags()'.
d6b8cf11 9716
f712d833
MV
9717 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9718
9719 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9720 build on Win32. Disable preloaded symbols on Win2 platforms.
9721
9722 * ioext.c, ports.c: Include `io.h' is possible.
9723
9724 * mkstemp.c: Include `process.h' is possible.
9725
9726 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9727 too.
9728 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9729
9730 * posix.c: Remove unnecessary dirent includes and defines. Include
9731 local `win32-uname.h' for MinGW. Extern declaration of
9732 `mkstemp()' for systems where it does not exists. Make
9733 `getlogin()' available on M$-Windows.
9734
9735 * scmsigs.c: Made `usleep()' avalable on MinGW.
9736
9737 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9738
9739 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9740
9741 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9742
d245ce23
MD
97432001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9744
9745 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9746 Don't apply scm_uniform_vector_length on arrays.
9747
8ea46249
DH
97482001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9749
9750 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9751 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9752 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9753 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9754 scm_list_<n> over scm_cons[2]?.
9755
9756 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9757 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9758 SCM_C[AD][AD]R instead of explicit form.
9759
9760 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9761 comparison parameters.
9762
9763 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9764 !SCM_NULLP instead of SCM_NIMP.
9765
9766 (scm_m_case): Don't copy the form. Renamed proc to clause and
9767 minimized its scope. Renamed x to clauses. Removed side
9768 effecting operation from macro call.
9769
9770 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9771 minimized its scope. Renamed x to clauses. Minimized the scope
9772 of variable 'len'. Make sure the else clause is treated specially
9773 even in case of '=>' occurences. Don't change the else to #t in
9774 order to be able to distinguish this case in the evaluator. Leave
9775 type checking of the recipient to the evaluator.
9776
9777 (scm_c_improper_memq): Made the comment somewhat clearer.
9778
9779 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9780 test for SCM_IM_LET at the place of the formal parameters.
9781 Simplified the formal parameter checking.
9782
9783 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9784 Renamed arg1 to binding and minimized its scope. Eliminated
9785 unnecessary consing.
9786
9787 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9788 variable 'len'.
9789
9790 (build_binding_list): New static function.
9791
9792 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9793 Further, split up the 'letrec' unmemoizing code to the
9794 corresponding parts for 'do', 'let' and 'letrec', adding comments
9795 to each form. Cleanup the handling of the do form (This removes
9796 some *real* code :-).
9797
9798 (SCM_CEVAL): Removed side effecting operation from macro call.
9799 Handle the 'else clause of the 'cond form specially - the symbol
9800 'else is not replaced with #t any more.
9801
8186c4f5
GH
98022001-10-14 Gary Houston <ghouston@arglist.com>
9803
9804 * version.c (scm_version): use sprintf instead of snprintf,
9805 for portability. thanks to Bill Schottstaedt.
9806
89759084
MD
98072001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9808
9809 * read.c (scm_lreadr): When user-defined hash procedure returns
9810 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9811 an exception. (This prevents parsing of uniform vectors from
9812 interfering with parsing of numbers.)
9813
9c7ce563
MV
98142001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9815
9816 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9817 PTRDIFF_MIN. Thanks to Ken Raeburn.
9818
98192001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9820
9821 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9822
9823 * eval.c (scm_m_atbind): First try to find the variable without
9824 defining it locally; when it has not been found, define it
9825 locally.
9826
9827 * modules.c (module_variable): Pass over variables that exist but
9828 are unbound.
9829
98302001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9831
9832 * backtrace.c (display_backtrace_file_and_line): Only use
9833 scm_basename when POSIX support is compiled in. Thanks to Chris
9834 Cramer.
9835
1fe5e088
DH
98362001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9837
9838 * numbers.c (mem2uinteger): Return number read so far when coming
9839 across a hexdigit after having read a # or if not reading a hex
9840 value. This will enable the calling code to correctly handle
9841 forms like 1e2. (The background is, that the exponent markers d,
9842 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9843 providing this patch.
9844
9845 (mem2complex): Fix erroneous double-negation. Now, numbers like
9846 1-i will be read correctly.
9847
68665a97
MD
98482001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9849
9850 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9851
9852 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9853
d5cf5324
DH
98542001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9855
9856 * print.c (scm_print_state_vtable, print_state_pool):
9857 Initialize. These variables are now registered as gc roots.
9858
9859 (scm_current_pstate): Update documentation.
9860
9861 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9862 scm_prin1, scm_init_print): print_state_pool is registered as a
9863 gc root and thus does not need to be protected by a surrounding
9864 pair any more.
9865
9866 (make_print_state): The car of print_state_pool no longer holds
9867 the scm_print_state_vtable.
9868
9869 (scm_current_pstate, scm_make_print_state, print_circref,
9870 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
9871 SCM_N<foo>.
9872
9873 (scm_prin1): When building lists, prefer scm_list_<n> over
9874 scm_cons[2]?.
9875
9876 (scm_iprlist): Removed a redundant SCM_IMP test.
9877
9878 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
9879
37c56aec
DH
98802001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9881
9882 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
9883
9884 (scm_memcons, scm_mem_to_proc): When building lists, prefer
9885 scm_list_<n> over scm_cons[2]?.
9886
9887 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
9888
9889 (scm_procedure_name): Use SCM_CADR instead of explicit form.
9890
9891 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
9892 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
9893 for some reason his patch didn't make it into the cvs.
9894
79d34f68
DH
98952001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
9896
9897 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
9898 little bit - should even be somewhat more accurate now.
9899
5e137c65
RB
99002001-10-08 Rob Browning <rlb@defaultvalue.org>
9901
9902 * gc.c: support ia64 register backing store.
9903 (SCM_MARK_BACKING_STORE): new macro.
9904
9905 * continuations.h: support ia64 register backing store.
9906 (struct scm_t_contregs): add ia64 register backing store.
9907
9908 * continuations.c: support ia64 register backing store.
9909 (continuation_mark): mark ia64 register backing store.
9910 (continuation_free): free ia64 register backing store.
9911 (scm_make_continuation): capture ia64 register backing store.
9912 (copy_stack_and_call): copy ia64 register backing store.
9913
ee083ac2
DH
99142001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9915
9916 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
9917 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
9918 instead of SCM_NIMP to test for that case.
9919
9920 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
9921 scm_t_bits instead of long.
9922
71dcdbf9
MV
99232001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9924
9925 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
9926 SCM_T_SIGNED_BITS_MIN): New.
9927 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
9928 Use them to make these macros computable by the preprocessor.
9929
9930 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
9931 whether the integral type fits in a fixnum, not the compiler.
9932 This removes a spurious compiler warning. Also, honor the
9933 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
9934 needed for `long long's.
9935
9936 * numbers.c: Define NO_PREPRO_MAGOC when including
9937 num2integral.c.i for `long long' and `signed long long'.
9938
152812c0
MD
99392001-10-06 Mikael Djurfeldt <mdj@linnaeus>
9940
9941 These changes fixes a race condition in the Guile coop - pthread
9942 compatibility code.
d6b8cf11 9943
152812c0
MD
9944 * coop.c (mother_awake_p): New variable.
9945 (coop_create): Set mother_awake_p before creating or signalling
9946 mother; wait until mother is going to sleep before returning.
9947 (mother): Reset mother_awake_p before going to sleep.
9948
11d49f54
DH
99492001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9950
9951 * options.c (protected_objects, scm_init_options): The content of
9952 protected_objects is now protected from garbage collection using
9953 scm_gc_register_root instead of scm_permanent_object.
9954
9955 (get_option_setting): New static function that computes an option
9956 setting as it was formerly done in the function scm_options.
9957
9958 (get_documented_option_setting): New static function that
9959 returns option documentation as it was formerly done in the
9960 function scm_options. Note that documentation C strings are no
9961 longer precomputed into SCM objects. Instead, they are converted
9962 into SCM strings every time get_documented_option_setting is
9963 called.
9964
9965 (change_option_setting): New static functions that modifies the
9966 option setting as it was formerly done in the function
9967 scm_options. The function is now exception safe, i. e. won't
9968 cause a memory leak when interrupted. Further, only non-immediate
9969 option values are added to the protection list.
9970
9971 (scm_options): This function now has only the purpose to dispatch
9972 to to get_option_setting, get_documented_option_setting or
9973 change_option_setting, depending on the arguments given to
9974 scm_options.
9975
9976 (scm_init_opts): Don't convert documentation C strings into SCM
9977 strings. Further, don't protect any object values: They _must_
9978 be immediate values, otherwise there is no guarantee that they
9979 have not been collected before anyway.
9980
9981 * options.[ch] (scm_t_option): Made type unsigned, name into a
9982 constant char* and val into a scm_t_bits type.
9983
9984 (scm_options, scm_init_opts): The number of options is guaranteed
9985 to be larger or equal to zero. Thus, the type is changed to
9986 unsigned.
9987
3dbacabc
DH
99882001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9989
9990 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
9991 testing an unsigned value for being >= 0.
9992
14282d0f
DH
99932001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9994
9995 * numbers.h: Removed old comment about using SCM_CAR to access
9996 non-pair cells.
9997
9998 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
9999 the return value is signed. Thanks to Brian Crowder for the bug
10000 report.
10001
10002 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10003 values. With this patch, SCM_SRS can be safely used for other
10004 types than scm_t_signed_bits. However, it should still better be
10005 an internal macro and thus be renamed to SCM_I_SRS.
10006
10007 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10008
2dbec7b5
GH
100092001-10-03 Gary Houston <ghouston@arglist.com>
10010
10011 * continuations.h, unif.h: in the descriptions of the bit patterns
10012 of the heap cells, make bit 0 the least significant.
10013
cf4ee841
TTN
100142001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10015
10016 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10017 Thanks to Golubev I. N.
10018
4a151b3d
GH
100192001-09-25 Gary Houston <ghouston@arglist.com>
10020
10021 * ports.c (scm_drain_input): extended the docstring. thanks to
10022 Alex Schroeder and Thien-Thi Nguyen.
10023
581ded70
MD
100242001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10025
10026 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10027 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10028 macros. (The NUM names might soon change.)
10029
10030 * numbers.h: Added missing declarations.
10031
5437598b
MD
100322001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10033
10034 * Makefile.am: Distribute num2float.i.c.
10035
10036 * num2float.i.c: New file, multiply included by numbers.c, used
10037 to "templatize" the float <-> num conversion routines.
10038
10039 * numbers.c: New functions: scm_num2float, scm_float2num,
10040 scm_num2double, scm_double2num.
10041
0b073f0f
RB
100422001-09-21 Rob Browning <rlb@defaultvalue.org>
10043
10044 * .cvsignore: really add version.h
10045
10046 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10047 Otherwise it fails on the alpha. However, we might rather choose
10048 this size conditionally.
10049
10050 * numbers.c (scm_gcd): change "k" to a long from an int.
10051 Otherwise it fails on the alpha. However, we might rather choose
10052 this size conditionally.
10053
10054 * error.c (scm_wta): coerce char* to intptr_t before int
10055 assignment.
10056
10057 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10058 int.
10059
10060 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10061
2830fd91
MD
100622001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10063
10064 * numbers.c (scm_integer_expt): Accept inexact integer in second
10065 argument. (Thanks to Bill Schottstaedt.)
10066
c13f0a90
RB
100672001-09-20 Rob Browning <rlb@defaultvalue.org>
10068
10069 * .cvsignore: add version.h
10070
10071 * versiondat.h.in: removed (obsolete).
10072
10073 * version.h.in: renamed from version.h.
10074 (SCM_GUILE_MAJOR_VERSION): new public macro.
10075 (SCM_GUILE_MINOR_VERSION): new public macro.
10076 (SCM_GUILE_MICRO_VERSION): new public macro.
10077
10078 * version.h: renamed to version.h.in.
10079
10080 * version.c
10081 (scm_major_version): support integer *_VERSION macros.
10082 (scm_minor_version): support integer *_VERSION macros.
10083 (scm_micro_version): support integer *_VERSION macros.
10084 (scm_version): support integer *_VERSION macros.
10085
147c18a0
MD
100862001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10087
10088 * error.c, error.h: Made error keys globally accessible.
10089 Applications might want to test for these or use them in a direct
10090 call to scm_error.
10091
10092 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10093 routines are passed an inexact. This change in behavior is
10094 motivated by concordance with R5RS: It is more common that a
10095 primitive doesn't want to accept an inexact for an exact.
10096
662c5539
DH
100972001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10098
10099 The following patch partially undoes my patch from 2001-06-30,
10100 where I added the function scm_gc_mark_cell_conservatively. The
10101 function is buggy, since it breaks guile during conservative
10102 marking if a pointer on the stack points directly into the list of
10103 free cells on the heap: With conservative cell marking this will
10104 cause the whole free list to be scanned and marked - boom!
10105
10106 * gc.c (allocated_mark, MARK, heap_segment,
10107 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10108 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10109 scm_gc_mark_cell_conservatively and update the corresponding
10110 comments and uses accordingly. Thanks to Christopher Cramer for
10111 the patch. (Minor corrections by me.)
10112
6c1b7628
GH
101132001-09-15 Gary Houston <ghouston@arglist.com>
10114
10115 * root.h (scm_root_state): removed the continuation_stack and
10116 continuation_stack_ptr members, which have no apparent purpose.
10117 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10118 removed.
662c5539 10119
6c1b7628
GH
10120 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10121 (scm_igc): remove all references to contination_stack and
10122 continuation_stack_ptr, avoiding allocation of a vector and
10123 useless processing during gc.
10124
455c0ac8
DH
101252001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10126
10127 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10128
10129 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10130
10131 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10132
10133 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10134
10135 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10136 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10137
22ba637b
DH
101382001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10139
10140 * guardians.c (mark_dependencies_in_tconc,
10141 whine_about_self_centered_zombies, scm_init_guardians): Register
10142 the static global variable `self_centered_zombies' via
10143 scm_gc_register_root, to make some cdr-ing unnecessary.
10144
c3c4d801
DH
101452001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10146
10147 * backtrace.c (display_backtrace_file,
10148 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10149 values, use SCM_FALSEP when comparing SCM values against #f.
10150 Thanks to Rob Browning for the bug report.
10151
b00418df
DH
101522001-09-12 Martin Baulig <martin@home-of-linux.org>
10153
10154 * strings.[ch] (scm_str2string): New function.
10155
a0d34a0b
MV
101562001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10157
10158 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10159 when computing nm, even if it's negative.
10160 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10161 (scm_must_realloc): Likewise.
10162
b10586f0
ML
101632001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10164
10165 * numbers.c (scm_sys_check_number_conversions): new function,
10166 defined if Guile is compiled in debugging mode. currently checks
10167 `scm_num2ulong', should check much much more.
10168
10169 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10170 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10171
8c494e99
DH
101722001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10173
10174 * __scm.h: Added new section about compile time selectable
10175 features.
10176
10177 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10178 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10179 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10180 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10181 Removed.
10182
10183 * deprecation.c (scm_include_deprecated_features): Simplified.
10184
10185 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10186 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10187
10188 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10189 Extract side-effecting operations from macros.
10190
10191 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10192 scm_top_level_lookup_closure_var and scm_system_transformer.
10193
10194 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10195
10196 (heap_segment): Use CELL_P instead of SCM_CELLP.
10197
10198 * init.c (start_stack): Don't initialize
10199 scm_top_level_lookup_closure_var and scm_system_transformer.
10200
10201 * modules.c (scm_set_current_module): Don't access
10202 scm_top_level_lookup_closure_var and scm_system_transformer.
10203
10204 (scm_sym2var): Don't call scm_variable_set_name_hint.
10205
10206 (scm_post_boot_init_modules): Removed deprecated initializations.
10207
10208 * print.c (scm_ipruk): Don't access cell contents of non cells.
10209
10210 * strings.c (scm_string_set_x): All strings are writable.
10211
10212 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10213 type. There is only one string type now.
10214
10215 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10216
10217 * tags.h: Remove comments about two different string types.
10218
10219 (SCM_CELLP, SCM_NCELLP): Deprecated.
10220
10221 * variable.c (make_variable): Remove code variant for vcells.
10222
10223 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10224 SCM_VARIABLE_LOC): Remove code variant for vcells.
10225
10226 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10227 SCM_ENABLE_DEPRECATED with the logic reversed.
10228
10229 * dynl.c (moddata, registered_mods), dynl.[ch]
10230 (scm_register_module_xxx, scm_registered_modules,
10231 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10232 (*top-level-lookup-closure*), eval.[ch]
10233 (scm_top_level_lookup_closure_var, scm_system_transformer,
10234 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10235 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10236 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10237 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10238 scm_unprotect_object), modules.c (root_module_lookup_closure,
10239 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10240 beautify_user_module_x_var, try_module_autoload_var,
10241 scm_module_full_name), modules.[ch] (scm_the_root_module,
10242 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10243 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10244 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10245 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10246 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10247 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10248 scm_make_shared_substring), tags.h (scm_tc7_substring,
10249 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10250 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10251 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10252 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10253 Removed.
10254
10255 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10256 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10257 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10258 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10259 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10260 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10261 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10262 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10263 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10264 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10265 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10266 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10267 (setzone, scm_strftime, scm_strptime), vports.c
10268 (scm_make_soft_port): Remove calls to
10269 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10270 gone, all strings are 0-terminated anyway.
10271
10272 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10273 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10274 double inclusion of the same headers to the SCM_<filename>_H
10275 format.
10276
10277 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10278 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10279 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10280 any more.
10281
10282 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10283 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10284 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10285 !SCM_<foo> over SCM_N<foo>.
10286
dee01b01
DH
102872001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10288
10289 * Makefile.am: Remove references to symbols-deprecated.c.
10290
10291 * symbols.c (scm_init_symbols): Don't initialize deprecated
10292 symbol functions.
10293
10294 * symbols-deprecated.c: Removed.
10295
10296 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10297 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10298 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10299 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10300 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10301 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10302 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10303 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10304 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10305 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10306 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10307 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10308 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10309 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10310 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10311 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10312 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10313 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10314 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10315 scm_intern0, scm_sysintern, scm_sysintern0,
10316 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10317 scm_string_to_obarray_symbol, scm_intern_symbol,
10318 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10319 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10320 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10321 vectors.[ch] (scm_vector_set_length_x): Removed.
10322
10323 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10324 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10325 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10326 Renamed the macros that are defined to inhibit double inclusion of
10327 the same headers to the SCM_<filename>_H format.
10328
10329 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10330 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10331 SCM_N<foo>.
10332
b29058ff
DH
103332001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10334
10335 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10336 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10337 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10338 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10339 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10340 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10341 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10342 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10343 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10344 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10345 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10346 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10347
10348 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10349 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10350 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10351 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10352 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10353 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10354 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10355 double inclusion of the same headers to the SCM_<filename>_H
10356 format.
10357
10358 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10359 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10360 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10361 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10362 !SCM_<foo> over SCM_N<foo>.
10363
0527e687
DH
103642001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10365
10366 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10367 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10368 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10369 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10370 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10371 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10372 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10373 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10374 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10375 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10376 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10377 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10378 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10379 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10380 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10381 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10382 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10383 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10384 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10385 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10386 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10387 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10388 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10389 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10390 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10391 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10392 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10393 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10394 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10395 the macros that are defined to inhibit double inclusion of the
10396 same headers to the SCM_<filename>_H format.
10397
fada26b2
MV
103982001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10399
10400 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10401 "scm_t_portable" with "scm_port_table" which was an artifact from
10402 the great "scm_*_t -> scm_t_" renaming.
10403
e4d1c1ea
TTN
104042001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10405
10406 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10407 used; nfc. Thanks to Bill Schottstaedt.
10408
10409 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10410 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10411 Thanks to Chris Cramer.
10412
b573e744
MV
104132001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10414
10415 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10416
10417 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10418 dynamic scope.
10419 * dynwind.h (scm_swap_bindings): Declare.
10420 * dynwind.c (scm_swap_bindings): Make non-static.
10421
8a3e715b
ML
104222001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10423
10424 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10425 doing exactly nothing about them). thanks Neil!
10426
cf504ee0
NJ
104272001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10428
10429 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10430
43b83b54
TTN
104312001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10432
10433 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10434 (proto) in the case when either `GUILE_DEBUG' or
10435 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10436
10437 (map_free_list): Fix typo: Ref `f' correctly.
10438
10439 Thanks to Chris Cramer.
10440
ab4cd34b
RB
104412001-08-15 Rob Browning <rlb@defaultvalue.org>
10442
10443 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10444 variables.
10445 (libpath.h): change libguileversion to libguileinterface.
10446
b754e3d1
MV
104472001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10448
10449 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10450 ChangeLog-2000. Thanks to Daniel Skarda!
10451
8b1d12c7
ML
104522001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10453
10454 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10455 do it from the Makefile.
10456
10457 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10458 are of a reasonable size.
10459
baffb19f
NJ
104602001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10461
10462 * stacks.c (scm_make_stack): Improve docstring by explaining use
10463 of cutting args.
10464
c1151355
MV
104652001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10466
10467 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10468 scm_char_whitespace_p, scm_char_upper_case_p,
10469 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10470 characters to fulfill isascii in addition to the primary
10471 predicate.
10472
3c9a524f
DH
104732001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10474
10475 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10476 scm_istr2flo, scm_istring2number): Removed.
10477
10478 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10479 SCM_SLOPPY_<foo>.
10480
10481 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10482 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10483 Added.
10484
10485 (scm_string_to_number): Use new number parser.
10486
10487 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10488 handles complex numbers.
10489
10490 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10491 SCM_<foo>_H.
10492
10493 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10494 SCM_N<pred>.
10495
10496 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10497
10498 (scm_i_mem2number): Added.
10499
10500 (scm_exact_to_inexact): Changed signature.
10501
10502 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10503 here instead of within scm_i_mem2number. Call scm_i_mem2number
10504 instead of scm_istr2int and scm_istring2number.
10505
01f11e02
DH
105062001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10507
10508 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10509 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10510 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10511 !SCM_<pred> over SCM_N<pred>.
10512
10513 (scm_eval_body): Remove side effecting code from macro call.
10514
10515 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10516 SCM_NIMP test.
10517
6cf69537
DH
105182001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10519
10520 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10521
54866b6c
MV
105222001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10523
10524 Removed vcell slot from structs.
43b83b54 10525
54866b6c
MV
10526 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10527 subsequent indices.
10528
10529 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10530 zero. Use scm_vtable_index_layout instead of "0" when accessing
10531 said slot.
10532 (scm_init_struct): Remove vcell slot layout code from
10533 required_vtable_fields.
10534
10535 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10536
10537 * goops.c (build_class_class_slots): Removed vcell slot
10538 definition.
10539
10540 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10541 Removed vcell slot layout code.
10542 (scm_si_vcell): Removed.
10543
5b54c4da
MV
105442001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10545
a0f5718e 10546 "Glocs" have been removed.
43b83b54 10547
a0f5718e
MV
10548 * tags.h: Update tag system docs.
10549 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10550 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10551 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10552 or SCM_NCONSP, respectively.
10553
10554 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10555 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10556 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10557
10558 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10559 tell glocs from structs.
43b83b54 10560
a0f5718e
MV
10561 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10562
10563 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10564 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10565 instead of with glocs.
10566 (EVALCAR): Do not test for glocs.
10567 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10568 condition.
10569 (scm_unmemocar): Do not handle glocs.
10570 (scm_m_atfop): Memoize as a variable, not as a gloc.
10571 (scm_eval_args, scm_deval_args): Do not handle glocs.
10572 (scm_ceval, scm_deval): Likewise.
43b83b54 10573
a0f5718e
MV
10574 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10575 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10576 Removed.
10577
10578 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10579
10580 * dynwind.c (scm_swap_bindings): Likewise.
10581 (scm_dowinds): Updated to recognize lists of variables instead of
10582 lists of glocs.
10583
10584 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10585
43b83b54 10586
5b54c4da
MV
10587 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10588 where it is needed.
43b83b54 10589
3c3db128
GH
105902001-07-25 Gary Houston <ghouston@arglist.com>
10591
10592 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10593 docstrings to reflect the n-ary implementation.
10594
dd29a169
MV
105952001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10596
10597 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10598 value of a variable, not the plain "return" statement.
10599
f5fe6c2f
MV
106002001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10601
10602 * eval.c: Allow variables in memoized code (in addition to glocs).
10603 (scm_lookupcar): Handle variables in lost races. Replace symbol
10604 with variable directly, do not make a gloc.
10605 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10606 like glocs.
10607 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10608 the main switch.
10609
ee0c7345
MV
106102001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10611
6d9ad98a
MV
10612 * variable.c (scm_i_variable_print): Use "value" instead of
10613 "binding" since a binding is the mapping between symbols and
10614 variables, not between variables and their values.
10615
ee0c7345
MV
10616 * tags.h (scm_tc7_variable): New.
10617 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10618 * print.c (scm_iprin1): Likewise.
10619
10620 * variable.h (scm_tc16_variable): Removed.
10621 (SCM_VARIABLEP): Test for new tc7 code.
10622 (scm_i_variable_print): New.
10623 * variable.c (scm_tc16_variable): Removed.
10624 (variable_print): Renamed to scm_i_variable_print and made
10625 non-static.
10626 (variable_equal_p): Removed.
10627 (make_variable): Construct a tc7 object instead of a smob.
10628 (scm_init_variable): Do not register smob.
43b83b54 10629
f3805ebb
MV
106302001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10631
10632 * tags.h: Include inttypes.h when we have it.
10633
106342001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10635
10636 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10637 is taken by the new SCM_IM_CALL_WITH_VALUES.
10638 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10639
6a1677a3
GH
106402001-07-22 Gary Houston <ghouston@arglist.com>
10641
10642 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10643 SCM_MAKINUM to convert regoff_t value to SCM.
10644
1bed8c28
GH
106452001-07-21 Gary Houston <ghouston@arglist.com>
10646
10647 * scmsigs.c: include sys/time.h for itimer stuff.
10648
e658215a
RB
106492001-07-19 Rob Browning <rlb@defaultvalue.org>
10650
10651 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10652
10653 * c-tokenize.lex: add option %nounput to quiet warning.
10654 Add prototype for yylex to quiet warning.
10655
10656 * scmconfig.h.in: add flags for setitimer and getitimer.
10657
10658 * scmsigs.h (scm_init_scmsigs): new prototype.
10659 (scm_init_scmsigs): new prototype.
10660
10661 * scmsigs.c (s_scm_setitimer): new function.
10662 (s_scm_setitimer): new function.
10663
58ade102
MG
106642001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10665
10666 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10667 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10668 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10669 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10670 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10671 guile-func-name-check.in, guile-snarf-docs-texi.in,
10672 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10673 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10674 objprop.c, objprop.h, options.c, options.h, random.h,
10675 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10676 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10677 version.c, version.h: Updated copyright notice.
10678
6b80d352
DH
106792001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10680
10681 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10682 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10683 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10684 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10685 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10686 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10687 sym_environment, scm_sym_change_class): New static variables to
10688 hold predefined symbols.
10689
10690 (build_class_class_slots): Build the list using scm_list_n
10691 instead of cons. Also, slots are already created as lists, thus
10692 making a call to maplist unnecessary.
10693
10694 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10695 scm_class_direct_subclasses, scm_class_direct_methods,
10696 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10697 scm_method_procedure, create_standard_classes, purgatory): Use
10698 predefined symbols.
10699
10700 (build_slots_list, compute_getters_n_setters,
10701 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10702 get_slot_value_using_name, set_slot_value_using_name,
10703 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10704 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10705 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10706
10707 (scm_sys_prep_layout_x): Minimize variable scopes.
10708
10709 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10710 scm_sys_fast_slot_set_x): Fix signedness.
10711
10712 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10713 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10714 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10715 when converting to and from SCM values.
10716
10717 (scm_enable_primitive_generic_x): Add rest argument checking.
10718
10719 (map, filter_cpl, maplist, scm_sys_initialize_object,
10720 scm_sys_prep_layout_x, slot_definition_using_name,
10721 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10722 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10723 predicates over SCM_N?IMP tests.
10724
10725 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10726 checking.
10727
10728 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10729 alias.
10730
63bcad19
DH
107312001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10732
10733 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10734
10735 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10736
10737 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10738
10739 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10740
4d6aae71
ML
107412001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10742
10743 * strings.c (s_scm_string): fix arg position in assert.
10744
4b8ec619
GH
107452001-07-11 Gary Houston <ghouston@arglist.com>
10746
10747 * strports.c (st_write): use memcpy, not strncpy. thanks to
10748 Dale P. Smith.
10749
dbb640bd
TTN
107502001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10751
10752 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10753 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10754 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10755 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10756 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10757 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10758 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10759 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10760 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10761 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10762 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10763 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10764 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10765 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10766 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10767 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10768 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10769 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10770 weaks.c, weaks.h: Remove "face-lift" comment.
10771
fd6c6321
RB
107722001-07-08 Rob Browning <rlb@defaultvalue.org>
10773
10774 * .cvsignore: add stamp-h.in.
10775
f91e4547
MG
107762001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10777
10778 * hooks.c (scm_make_hook, scm_add_hook_x),
10779 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10780 value info to the docstrings.
10781
7beabedb
MG
107822001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10783
10784 Some more compatibility patches for Windows.
dbb640bd 10785
7beabedb
MG
10786 * posix.c (getlogin): getlogin() implementation for Windows.
10787
10788 * backtrace.c, ioext.c: Include <stdio.h>.
10789
10790 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10791 exist.
10792
10793 * cpp_sig_symbols.in: Added SIGBREAK.
10794
0d0560d0
MV
107952001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10796
10797 * strports.c (scm_read_0str, scm_eval_0str): Call
10798 scm_c_read_string and scm_c_eval_string respectively, not
10799 themselves. Thanks to Dale P. Smith!
10800
9a97e362
DH
108012001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10802
10803 * unif.c (scm_array_set_x): The variable args does not
10804 necessarily have to be a list. Further, got rid of a redundant
10805 SCM_NIMP test.
10806
592996c9
DH
108072001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10808
10809 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10810 last.
10811
10812 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 10813 init_heap_seg): Fixed signedness.
592996c9
DH
10814
10815 (init_heap_seg): Replaced strange for-loop with a while loop.
10816
10817 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10818
10819 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10820
10821 The following patch adds conservative marking for the elements of
10822 free or allocated cells.
10823
10824 * gc.c (allocated_mark, heap_segment): New static functions.
10825
10826 (which_seg): Deleted, since the functionality is now provided by
10827 function heap_segment.
10828
10829 (map_free_list): Use heap_segment instead of which_seg.
10830
10831 (MARK): If cell debugging is disabled, mark free cells
10832 conservatively.
10833
10834 (scm_mark_locations, scm_cellp): Extracted the search for the
10835 heap segment of a SCM value into function heap_segment.
10836
10837 (scm_init_storage): Allocated cells must be marked
10838 conservatively.
10839
10840 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10841
10842 The following patch changes the representation of weak vectors to
10843 double cells instead of using an extension of the vector's
10844 allocated memory.
10845
10846 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10847 the result of SCM_WVECT_GC_CHAIN.
10848
10849 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10850
10851 * weaks.c (allocate_weak_vector): New static function. It does
10852 not patch any previously created vector object during the
10853 construction of a weak vector, and thus doesn't need to switch
10854 off interrupts during vector creation.
10855
10856 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10857 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10858 Use allocate_weak_vector to provide the new weak vector object.
10859
10860 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10861 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10862 now stored in the double cell.
10863
10864 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10865 Use SCM_WVECT_TYPE.
10866
10867 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10868 using an entry of the double cell.
10869
4dadf664
TTN
108702001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
10871
10872 * stamp-h.in: bye bye
10873
02202352
MV
108742001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
10875
10876 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
10877 scm_eval_0str.
10878
10879 * load.c, load.h (scm_c_primitive_load,
10880 scm_c_primitive_load_path): New.
10881
10882 * strports.c, strports.h (scm_c_read_string): Renamed from
10883 scm_read_0str. Also, added "const" qualifier to argument.
10884 (scm_c_eval_string): Renamed from scm_eval_0str.
10885 (scm_read_0str, scm_eval_0str): Deprecated.
10886
df1ad0d1
MG
108872001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10888
10889 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
10890 SCM_LIST1.
10891
1afff620
KN
108922001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
10893
10894 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
10895 scm_list_n): New functions.
10896 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
10897 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
10898 (lots of files): Use the new functions.
4dadf664 10899
1afff620
KN
10900 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
10901
10902 * strings.c: #include "libguile/deprecation.h".
10903
b858464a
MG
109042001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10905
10906 * read.c (scm_lreadr): When reading a hash token, check for a
10907 user-defined hash procedure first, so that overriding the builtin
10908 hash characters is possible (this was needed for implementing
10909 SRFI-4's read synax `f32(...)').
4dadf664 10910
b858464a
MG
10911 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
10912 because the latter is unsigned now and breaks comparisons like
10913 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 10914
d95c0b76
NJ
109152001-06-26 Neil Jerram <neil@ossau.uklinux.net>
10916
10917 * eval.h, eval.c (scm_call_4): New function.
10918
10919 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
10920 directly rather than dispatching to them via scm_ithrow and a lazy
10921 catch.
4dadf664 10922
d95c0b76
NJ
10923 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
10924 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
10925 for trap handler procedures.
10926
10927 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
10928 procedures not being #f.
10929
30e3be5a
ML
109302001-06-27 Michael Livshin <mlivshin@bigfoot.com>
10931
10932 * Makefile.am (c-tokenize.c): add rule to generate it.
10933 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
10934
10935 filter-doc-snarfage.c: remove.
10936
82893676
MG
109372001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10938
10939 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
10940
10941 The following set of changes makes compiling Guile under various
10942 Windows compilers easier. Compilation under GNU systems should
10943 not be affected at all.
10944
10945 Thanks to Stefan Jahn for all necessary information, patches and
10946 testing.
4dadf664 10947
82893676
MG
10948 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
10949 getpgrp, ttyname, primitive-fork and some header inclusion for
10950 Windows.
10951
10952 * random.c: Define M_PI, if not predefined and use __int64 for
10953 LONG64 under Windows.
10954
10955 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
10956 Windows and conditionalize some signal names.
10957
4dadf664 10958 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
10959 Include socket library header under Windows.
10960
10961 * stime.c (CLKTCK): Add cast to int, to make it compile under
10962 Windows.
10963
10964 * ports.c (truncate): New function, compiled only under Windows.
10965
10966 * net_db.c: Do not declare errno under Windows.
10967
10968 * iselect.h, inet_aton.c: Include socket library headers under
10969 Windows.
10970
10971 * guile.c (inner_main): Under Windows, initialize socket library
10972 and initialize gdb_interface data structures.
10973
10974 * gdb_interface.h: Under Windows, gdb_interface cannot be
10975 initialized statically. Initialize at runtime instead.
10976
10977 * fports.c (write_all): ssize_t -> size_t.
10978 (fport_print): Conditionalize call to ttyname().
10979 (getflags): New function, compiled only under Windows.
10980
10981 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
10982 primitives chown, link, fcntl.
10983 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
10984 as path seperator.
10985
10986 * backtrace.c: Include <io.h> under Windows.
10987
10988 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
10989
10990 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
10991 declaration.
10992
fdc28395
KN
109932001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
10994
10995 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10996 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
10997 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10998 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
10999 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11000 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11001 (scm_dynamic_wind, scm_dowinds), environments.c
11002 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11003 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11004 goops.c (GETVAR, purgatory, make_class_from_template,
11005 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11006 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11007 (scm_primitive_load), modules.c (scm_resolve_module,
11008 scm_c_define_module, scm_c_use_module, scm_c_export,
11009 module_variable, scm_eval_closure_lookup, scm_sym2var,
11010 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11011 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11012 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11013 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11014 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11015 (scm_object_to_string, scm_call_with_output_string,
11016 scm_call_with_input_string), throw.c (scm_body_thunk,
11017 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11018 scm_make_shared_array), vports.c (sf_flush, sf_write,
11019 sf_fill_input, sf_close): Use one of the above functions.
11020 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11021
36284627
DH
110222001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11023
11024 * filesys.c (scm_close), ports.c (scm_close_port,
11025 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11026 instead of SCM_NEGATE_BOOL.
11027
11028 * filesys.c (scm_stat): Clean up type dispatch.
11029
11030 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11031 scm_output_port_p): Get rid of redundant IM type check.
11032
11033 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11034 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11035 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11036 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11037 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11038 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11039 scm_addr_vector), stime.c (scm_strftime), strings.c
11040 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11041 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11042 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11043 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11044 instead of scm_makfromstr.
11045
11046 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11047 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11048 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11049 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11050 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11051 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11052 !SCM_<pred> over SCM_N<pred>.
11053
11054 * strings.[ch] (scm_makfromstr): Deprecated.
11055
11056 (scm_mem2string): New function, replaces scm_makfromstr.
11057
11058 * strings.c (scm_substring), strop.c (string_copy,
11059 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11060 (scm_symbol_to_string): Fix gc problem.
11061
11062 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11063 SCM_<foo>_H.
11064
11065 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11066 warning about comparing signed and unsigned values. This fix is
11067 not optimal, since it won't work reliably if sizeof (c_start) >
11068 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11069 solution is to define this macro as an inline function, thus
11070 allowing to specifiy the types of c_start and c_end.
11071
13dcb666
DH
110722001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11073
11074 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11075 scm_t_debug_frame*.
11076
11077 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11078 Rename <foo>H to SCM_<foo>_H.
11079
11080 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11081 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11082
11083 (narrow_stack): Make i unsigned. Don't use side-effecting
11084 operations in conditions.
11085
11086 (narrow_stack, scm_make_stack, scm_stack_id,
11087 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11088
11089 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11090 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11091 more.
11092
11093 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11094 signedness.
11095
ea2c3968 11096 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11097
11098 * stacks.h (SCM_FRAMEP): Fix type check.
11099
ac13d9d2
ML
111002001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11101
ee0c0e03
ML
11102 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11103 c-tokenize.c when doing maintainer-clean.
11104
ac13d9d2
ML
11105 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11106
11107 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11108 simplify.
11109
11110 * eval.c: all hash signs are in column 0.
11111
11112 * Makefile.am (guile_filter_doc_snarfage): build using
11113 c-tokenize.c, not filter-doc-snarfage.c.
11114 rearrange snarfing dependencies a bit.
11115
11116 * c-tokenize.lex: new file.
11117
16be44e5
MV
111182001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11119
11120 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11121 scm_t_srcpropso_plist. See the big type renaming.
11122 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11123 Thanks to Seth Alves!
4dadf664 11124
16be44e5
MV
11125 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11126 they aren't defined already.
11127
5843e5c9
DH
111282001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11129
11130 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11131 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11132 problem.
11133
11134 * backtrace.c (display_expression, scm_set_print_params_x,
11135 display_application, display_frame, scm_backtrace), numbers.c
11136 (scm_istring2number), objects.c (scm_class_of,
11137 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11138 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11139
11140 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11141 always positive.
11142
11143 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11144 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11145
11146 * objects.c (scm_class_of): Type fix.
11147
11148 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11149 eliminated goto.
11150
11151 * pairs.h (scm_error_pair_access): The function can return if
11152 called recursively.
11153
6b41a313
MG
111542001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11155
11156 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11157
11158 * gdbint.c, init.c: Removed inclusion of tag.h.
11159
11160 * tag.h, tag.c: Removed files.
11161
11162 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11163
fbbdb121
GH
111642001-06-20 Gary Houston <ghouston@arglist.com>
11165
11166 * deprecation.c, extensions.c, rw.c: include string.h.
11167
72c17ed0
GH
111682001-06-19 Gary Houston <ghouston@arglist.com>
11169
11170 * filter-doc-snarfage.c (process): added ungetc in
11171 MULTILINE_COOKIE case since otherwise it fails when there's no
11172 space between the '(' and the quote of the following string
11173 (gcc 3.0).
11174
4ff9f825
MV
111752001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11176
4927dd28
MV
11177 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11178
b629af45
MV
111792001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11180
11181 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11182 extension takes place.
11183 * strings.h (SCM_STRING_LENGTH): Likewise.
11184 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11185
4ff9f825
MV
11186 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11187 it.
11188
11189 * tags.h: Include <stdint.h> when we have it.
11190 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11191 available. Else use "unsigned long".
11192 (scm_signed_bits_t): New.
11193
11194 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11195 (SCM_INUM): Cast result to scm_signed_bits_t.
11196
58bee6a8
TTN
111972001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11198
11199 * mkstemp.c: Update path to #include file scmconfig.h.
11200 Thanks to Golubev I. N.
11201
00d8d838
DH
112022001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11203
11204 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11205
ea2c3968 11206 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11207 the macro definition.
11208
11209 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11210 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11211 instead of SCM_INST_TYPE.
11212
11213 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11214 the object is a struct before accessing its struct flags.
11215
11216 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11217
495c67e5
GH
112182001-06-10 Gary Houston <ghouston@arglist.com>
11219
11220 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11221 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11222 work reliably anymore. try it from boot-9.scm instead.
11223
6a9003d3
MV
112242001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11225
11226 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11227 Thanks to Matthias Köppe!
58bee6a8 11228
47bcd646
ML
112292001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11230
a88ff5b6
ML
11231 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11232 space-happy C preprocessors.
11233
47bcd646 11234 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11235 inside cookies. thanks to Matthias Köppe!
47bcd646 11236
bab246f3
DH
112372001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11238
11239 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11240 keywords. Fix gc protection.
11241
11242 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11243 operations in macro calls.
11244
11245 * pairs.c (scm_error_pair_access): Avoid recursion.
11246
11247 Thanks to Matthias Koeppe for reporting the bugs that correspond
11248 to the following set of patches.
11249
11250 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11251 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11252 bitvector base address using SCM_BITVECTOR_BASE.
11253
11254 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11255 unsigned long*.
11256
dcb410ec
DH
112572001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11258
11259 * goops.c (SCM_CLASS_REDEF): Removed.
11260
11261 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11262 SCM_<foo>_H.
11263
11264 Thanks to Matthias Koeppe for reporting the bugs that correspond
11265 to the following set of patches.
11266
11267 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11268 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11269 scm_sys_allocate_instance, clear_method_cache,
11270 scm_sys_invalidate_method_cache_x, scm_make,
11271 create_standard_classes, scm_make_port_classes, scm_make_class,
11272 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11273
11274 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11275
11276 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11277
11278 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11279 UNARY_ELTS_CODE): Remove bogus break statement.
11280
11281 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11282 Don't access bit vectors elements as SCM objects.
11283
11284 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11285 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11286 Don't assign to an unpacked value.
11287
e81d98ec
DH
112882001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11289
11290 * __scm.h (SCM_NORETURN): Moved here from error.h.
11291
11292 (SCM_UNUSED): New macro.
11293
11294 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11295
11296 * backtrace.c (display_error_handler), continuations.c
11297 (continuation_print), debug.c (debugobj_print), dynwind.c
11298 (guards_print), environments.c (observer_print,
11299 core_environments_finalize, leaf_environment_cell,
11300 leaf_environment_print, eval_environment_print,
11301 eval_environment_observer, import_environment_define,
11302 import_environment_undefine, import_environment_print,
11303 import_environment_observer, export_environment_define,
11304 export_environment_undefine, export_environment_print,
11305 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11306 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11307 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11308 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11309 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11310 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11311 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11312 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11313 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11314 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11315 set_slot_value, test_slot_existence, scm_change_object_class,
11316 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11317 default_setter), guardians.c (guardian_print, guardian_gc_init,
11318 guardian_zombify, whine_about_self_centered_zombies), guile.c
11319 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11320 mallocs.c (malloc_print), numbers.c (scm_print_real,
11321 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11322 end_input_default, scm_port_print, fill_input_void_port,
11323 write_void_port), root.c (root_print), smob.c (scm_mark0,
11324 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11325 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11326 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11327 (scm_struct_free_0, scm_struct_free_standard,
11328 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11329 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11330 scm_handle_by_throw, scm_ithrow), weaks.c
11331 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11332 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11333 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11334
11335 * error.h (SCM_NORETURN): Moved to __scm.h.
11336
11337 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11338 Renamed <foo>H to SCM_<foo>_H.
11339
11340 * gc.c (debug_cells_gc_interval): New static variable.
11341
11342 (scm_assert_cell_valid): If selected by the user, perform
11343 additional garbage collections.
11344
11345 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11346 if additional garbage collections are desired.
11347
11348 (mark_gc_async): If additional garbage collections are selected
11349 by the user, don't call the after-gc-hook. Instead require the
11350 user to run the hook manually.
11351
11352 * pairs.c (scm_error_pair_access): New function. Only compiled
11353 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11354
11355 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11356
11357 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11358 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11359 is a real pair object. (Glocs are also accepted, but that may
11360 change.) If not, abort with an error message.
11361
17fa3fcf
DH
113622001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11363
11364 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11365
11366 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11367 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11368
feeedafb
MV
113692001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11370
11371 * extensions.c (scm_c_register_extension): Allow NULL as library
11372 name.
11373 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11374
feeedafb
MV
11375 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11376 non-pointers are being compared. Thanks to Alexander Klimov!
11377
4bcdfe46
GH
113782001-06-04 Gary Houston <ghouston@arglist.com>
11379
11380 * rw.c (scm_write_string_partial): new procedure implementing
11381 write-string/partial in (ice-9 rw).
11382 * rw.h: declare scm_write_string_partial.
58bee6a8 11383
f480396b
MV
113842001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11385
feeedafb
MV
11386 * keywords.c (keyword_print): Substract 1 from length of symbol
11387 name, accounting for the silly dash.
11388
11389 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11390 Do not emit deprecation warning.
11391
f480396b
MV
11392 Added exception notice to all files.
11393
11394 * dynl.c: Include "deprecation.h".
11395
c794483c
MV
113962001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11397
11398 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11399 scm_clear_registered_modules): Deprecated.
11400
9454d8d5
RB
114012001-06-02 Rob Browning <rlb@cs.utexas.edu>
11402
11403 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11404 guile-snarf-docs-texi.
11405
11406 * fports.c: HAVE_ST_BLKSIZE changed to
11407 HAVE_STRUCT_STAT_ST_BLKSIZE.
11408 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11409 HAVE_STRUCT_STAT_ST_BLKSIZE.
11410
11411 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11412 HAVE_STRUCT_STAT_ST_RDEV.
11413 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11414 HAVE_STRUCT_STAT_ST_BLKSIZE.
11415 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11416 HAVE_STRUCT_STAT_ST_BLOCKS.
11417
114f9bab
MV
114182001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11419
b0c16cd9
MV
11420 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11421 of scm_eval_x to allow module changes between the forms in the
11422 string. Set/restore module using scm_c_call_with_current_module.
11423
114f9bab
MV
11424 * mkstemp.c: New file, slightly modified from libiberties
11425 mkstemps.c.
11426
c99f9605
ML
114272001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11428
11429 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11430 filter-doc-snarfage.c: new files.
11431
11432 * Makefile.am: add stuff to [build,] use and distribute
11433 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11434
11435 * guile-snarf.in: grok the new snarf output.
11436
11437 * snarf.h: make the output both texttools- and `read'-friendly.
11438
47bcd646
ML
11439 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11440 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11441
7eb5d7b2
MV
114422001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11443
11444 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11445 error for unsupported format controls and for superflous
ec2667f0 11446 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11447
11448 * print.h, print.c (scm_print_symbol_name): Factored out of
11449 scm_iprin1.
11450 (scm_iprin1): Call it.
58bee6a8 11451
7eb5d7b2
MV
11452 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11453 weird names are printed correctly.
11454
11455 * print.c (scm_print_symbol_name): Symbols whose name starts with
11456 `#' or `:' or ends with `:' are considered weird.
11457
609c3d30
MG
114582001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11459
11460 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11461 and /.
11462
114632001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11464
11465 * debug.h: Removed prototype for scm_eval_string.
11466
8d09eb04
MG
114672001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11468
11469 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11470 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11471
11472 Change strncpy to memcpy to allow embedded NUL characters in
11473 symbol prefix.
11474
dd85ce47
ML
114752001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11476
fde50407
ML
11477 * hooks.c (scm_create_hook): deprecated.
11478 (make_hook): deleted.
11479 (scm_make_hook): all the hook creation code is now here.
11480
11481 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11482 a hook, make it permanent, and do a `scm_c_define' on it.
11483
dd85ce47
ML
11484 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11485
11486 * socket.c (s_scm_inet_pton): fix docstring quoting.
11487 (s_scm_inet_ntop): ditto.
11488
11489 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11490
11491 * hashtab.c (scm_internal_hash_fold): fix argument position in
11492 SCM_ASSERT.
11493
11494 * environments.c (s_scm_import_environment_set_imports_x): fix
11495 argument position in SCM_ASSERT.
11496
11497 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11498 (s_scm_make_iloc): ditto.
11499
729dbac3
DH
115002001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11501
11502 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11503
11504 * eval.c (promise_print): Read the promise's value as an object.
11505
11506 (SCM_CEVAL): Don't perform side-effecting operations in macro
11507 parameters.
11508
11509 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11510 conditional expression.
11511
11512 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11513 initializer.
11514
11515 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11516 text, removed redundant computation of effective_length and fixed
11517 the overflow check.
11518
11519 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11520 values.
11521
11522 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11523
11524 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11525
11526 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11527 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11528
11529 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11530
11531 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11532 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11533 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11534 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11535
11536 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11537
11538 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11539
ea2c3968 11540 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11541
11542 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11543 problem.
11544
11545 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11546 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11547 Read SCM objects rather than scm_bits_t values.
11548
11549 * tags.h (SCM_VOIDP_TEST): Removed.
11550
11551 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11552 value of 2 now corresponds to the former 1, the current 1
11553 corresponds to the former situation that SCM_VOIDP_TEST was
11554 defined.
11555
58bee6a8
TTN
11556 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11557 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11558 typedef struct scm_unused_struct { } * SCM;
11559 Thanks to Han-Wen Nienhuys for the suggestion.
11560
11561 * unif.c (scm_array_set_x): Fix typing problem, and use
11562 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11563 dealing with uniform vectors.
11564
6b1b030e
ML
115652001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11566
11567 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11568 (scm_igc): mark from them, too (precisely, not conservatively!).
11569
11570 * root.h (scm_gc_registered_roots): new object in
11571 scm_sys_protects.
11572
11573 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11574 `scm_protect_object'. shouldn't call it at all, though, it seems.
11575
11576 * gc.c (scm_[un]protect_object): deprecated.
11577 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11578 (scm_gc_[un]register_root[s]): new.
11579
11580 * gc.h: add prototypes for scm_gc_[un]protect_object,
11581 scm_gc_[un]register_root[s].
11582
c014a02e
ML
115832001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11584
11585 revert the controversial part of the 2001-05-24 changes.
11586
0120801d
MV
115872001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11588
f4e0611e
MV
11589 * modules.c (scm_env_module): Exported to Scheme.
11590
0120801d 11591 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11592
0120801d 11593 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11594
0120801d
MV
11595 * backtrace.c: Include "libguile/filesys.h".
11596 (sym_base, display_backtrace_get_file_line,
11597 display_backtrace_file, display_backtrace_file_and_line): New.
11598 (display_frame): Call display_backtrace_file_and_line if that is
11599 requested.
11600 (display_backtrace_body): Call scm_display_backtrace_file if
11601 requested.
11602
11603 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11604 Prototypes removed since there's no definition for these
11605 functions.
11606
880a7d13
MG
116072001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11608
11609 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11610 Changed use of scm_array->scm_array_t and
11611 scm_array_dim->scm_array_dim_t to enable build with
11612 --disable-deprecated.
11613
1be6b49c
ML
116142001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11615
11616 The purpose of this set of changes is to regularize Guile's usage
11617 of ANSI C integral types, with the following ideas in mind:
11618
d69c867a
ML
11619 - SCM does not nesessarily have to be long.
11620 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11621 - long is not nesessarily the same size as int.
11622
11623 The changes are incomplete and possibly buggy. Please test on
11624 something exotic.
11625
11626 * validate.h
11627 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11628 new macros.
11629
11630 * unif.h: type renaming:
11631 scm_array -> scm_array_t
11632 scm_array_dim -> scm_array_dim_t
11633 the old names are deprecated, all in-Guile uses changed.
11634
11635 * tags.h (scm_ubits_t): new typedef, representing unsigned
11636 scm_bits_t.
11637
11638 * stacks.h: type renaming:
11639 scm_info_frame -> scm_info_frame_t
11640 scm_stack -> scm_stack_t
11641 the old names are deprecated, all in-Guile uses changed.
11642
11643 * srcprop.h: type renaming:
11644 scm_srcprops -> scm_srcprops_t
11645 scm_srcprops_chunk -> scm_srcprops_chunk_t
11646 the old names are deprecated, all in-Guile uses changed.
11647
11648 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11649 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11650 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11651 vectors.c, vports.c, weaks.c:
11652 various int/size_t -> size_t/scm_bits_t changes.
11653
11654 * random.h: type renaming:
11655 scm_rstate -> scm_rstate_t
11656 scm_rng -> scm_rng_t
11657 scm_i_rstate -> scm_i_rstate_t
11658 the old names are deprecated, all in-Guile uses changed.
11659
11660 * procs.h: type renaming:
11661 scm_subr_entry -> scm_subr_entry_t
11662 the old name is deprecated, all in-Guile uses changed.
11663
11664 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11665 type renaming:
11666 scm_option -> scm_option_t
11667 the old name is deprecated, all in-Guile uses changed.
11668
11669 * objects.c: various long -> scm_bits_t changes.
11670 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11671
11672 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11673 SCM_I_FIXNUM_BIT.
11674
11675 * num2integral.i.c: new file, multiply included by numbers.c, used
11676 to "templatize" the various integral <-> num conversion routines.
11677
11678 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11679 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11680 deprecated.
11681 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11682 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11683 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11684 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11685 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11686 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11687 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11688 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11689 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11690 scm_num2size): new functions.
11691
d69c867a 11692 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
11693
11694 * load.c: change int -> size_t in various places (where the
11695 variable is used to store a string length).
11696 (search-path): call scm_done_free, not scm_done_malloc.
11697
11698 * list.c (scm_ilength): return a scm_bits_t, not long.
11699 some other {int,long} -> scm_bits_t changes.
11700
11701 * hashtab.c: various [u]int -> scm_bits_t changes.
11702 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11703 (scm_ihashx): n: uint -> scm_bits_t
11704 use scm_bits2num instead of scm_ulong2num.
11705
11706 * gsubr.c: various int -> scm_bits_t changes.
11707
11708 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11709
d69c867a 11710 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
11711
11712 * gh.h (gh_str2scm): len: int -> size_t
11713 (gh_{get,set}_substr): start: int -> scm_bits_t,
11714 len: int -> size_t
11715 (gh_<num>2scm): n: int -> scm_bits_t
11716 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11717 (gh_length): return scm_bits_t, not unsigned long.
11718
11719 * gc.[hc]: various small changes relating to many things stopping
11720 being long and starting being scm_[u]bits_t instead.
11721 scm_mallocated should no longer wrap around.
11722
11723 * fports.h: type renaming:
11724 scm_fport -> scm_fport_t
11725 the old name is deprecated, all in-Guile uses changed.
11726
11727 * fports.c (fport_fill_input): count: int -> scm_bits_t
11728 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11729
11730 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11731 those prototypes, as the functions they prototype don't exist.
11732
11733 * fports.c (default_buffer_size): int -> size_t
11734 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11735 default_size: int -> size_t
11736 (scm_setvbuf): csize: int -> scm_bits_t
11737
11738 * fluids.c (n_fluids): int -> scm_bits_t
11739 (grow_fluids): old_length, i: int -> scm_bits_t
11740 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11741 scm_bits_t
11742 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11743
11744 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11745 the new and shiny SCM_NUM2INT.
11746
11747 * extensions.c: extension -> extension_t (and made a typedef).
11748
11749 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11750 there are no nasty surprises if/when the various deeply magic tag
11751 bits move somewhere else.
11752
11753 * eval.c: changed the locals used to store results of SCM_IFRAME,
11754 scm_ilength and such to be of type scm_bits_t (and not int/long).
11755 (iqq): depth, edepth: int -> scm_bits_t
11756 (scm_eval_stack): int -> scm_bits_t
11757 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11758 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11759 i: int -> scm_bits_t
11760
11761 * environments.c: changed the many calls to scm_ulong2num to
11762 scm_ubits2num.
11763 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11764
11765 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11766
11767 * debug.h: type renaming:
11768 scm_debug_info -> scm_debug_info_t
11769 scm_debug_frame -> scm_debug_frame_t
11770 the old names are deprecated, all in-Guile uses changed.
11771 (scm_debug_eframe_size): int -> scm_bits_t
11772
11773 * debug.c (scm_init_debug): use scm_c_define instead of the
11774 deprecated scm_define.
11775
11776 * continuations.h: type renaming:
11777 scm_contregs -> scm_contregs_t
11778 the old name is deprecated, all in-Guile uses changed.
11779 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11780 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11781
11782 * continuations.c (scm_make_continuation): change the type of
d69c867a 11783 stack_size from long to scm_bits_t.
1be6b49c
ML
11784
11785 * ports.h: type renaming:
11786 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11787 scm_port -> scm_port_t
11788 scm_ptob_descriptor -> scm_ptob_descriptor_t
11789 the old names are deprecated, all in-Guile uses changed.
11790 (scm_port_t.entry): int -> scm_bits_t.
11791 (scm_port_t.line_number): int -> long.
11792 (scm_port_t.putback_buf_size): int -> size_t.
11793
11794 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 11795 global namespace and have little value beside that).
1be6b49c
ML
11796 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11797 SCM handle).
11798 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 11799 exist (for size_t & ptrdiff_t).
1be6b49c
ML
11800 (scm_sizet): deprecated.
11801
11802 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11803
a6219f22
MV
118042001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11805
11806 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11807 SCM_VARIABLE_INIT since that it what it used to be.
11808
11809 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 11810 ANSIsh. Thanks to Matthias Köppe!
a6219f22 11811
311b6a3c
MV
118122001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11813
9dfc4faa
MV
11814 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11815 needed for weak-key hashtables.
11816
11817 * procs.c (scm_make_subr_with_generic): Add missing last argument
11818 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11819
11820 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11821 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
11822
11823 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11824
2fc933fe
MV
118252001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11826
57ae112d
MV
11827 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11828 `duplicate_string'. Do not use an indirect cell, store symbol
11829 directly in collision list of hash table.
11830 (duplicate_string): Removed.
58bee6a8 11831
57ae112d
MV
11832 * init.c (scm_init_guile_1): Call scm_init_extensions.
11833
11834 * Makefile.am: Add "extensions.c" and related files in all the
11835 right places.
11836
11837 * extensions.h, extension.c: New files.
11838
11839 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11840
2fc933fe
MV
11841 * modules.h (scm_system_module_env_p): Move out of deprecated
11842 section.
11843
11844 * rw.h (scm_init_rw): Added prototype.
11845
11846 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11847 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11848 New functions. They replace scm_make_gsubr and
11849 scm_make_gsubr_with_generic. The `make' variants only create the
11850 gsubr object, while the `define' variants also put it into the
11851 current module. Changed all callers.
11852 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11853
11854 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11855 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11856 functions. They replace scm_make_subr, scm_make_subr_opt and
11857 scm_make_subr_with_generic. The `make' variants only create the
11858 subr object, while the `define' variants also put it into the
11859 current module. Changed all callers.
11860 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11861 Deprecated.
11862
11863 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11864 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11865 the comments above.
58bee6a8 11866
18928596
NJ
118672001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11868
11869 * throw.c (scm_lazy_catch): Slight docstring clarification.
11870
21a13beb
MV
118712001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
11872
e2b6ddc6
MV
11873 * throw.c: Lazy-catch handlers are no longer allowed to return.
11874 Fixed comments throughout.
11875 (scm_ithrow): Signal an error when a lazy-catch handler returns.
11876 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
11877 recognized as such.
11878
21a13beb
MV
11879 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
11880 refered to s_scm_minor_version previously.
11881
11882 * modules.h, modules.c: Moved around a lot of code so that
11883 deprecated features appear at the bottom.
11884 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
11885 module_prefix, make_modules_in_var, beautify_user_module_x_var,
11886 scm_the_root_module, scm_make_module, scm_ensure_user_module,
11887 scm_load_scheme_module): Deprecated.
11888 (scm_system_module_env_p): Return SCM_BOOL_T directly for
11889 environments corresponding to the root module.
11890 (convert_module_name, scm_c_resolve_module,
11891 scm_c_call_with_current_module, scm_c_define_module,
11892 scm_c_use_module, scm_c_export): New.
11893 (the_root_module): New static variant of scm_the_root_module. Use
11894 it everywhere instead of scm_the_root_module.
58bee6a8 11895
21a13beb
MV
11896 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
11897 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
11898 (scm_c_with_fluid): New.
11899 (scm_with_fluids): Use scm_c_with_fluids instead of
11900 scm_internal_with_fluids.
58bee6a8 11901
21a13beb
MV
11902 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
11903 `scm_init_goops'. Do not explicitly create/switch modules.
11904 Return SCM_UNSPECIFIED.
11905 (scm_init_goops): Only register `%init-goops-builtins' procedure.
11906 (scm_load_goops): Use scm_c_resolve_module instead of
11907 scm_resolve_module.
58bee6a8 11908
21a13beb
MV
11909 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
11910 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
11911 `scm_init_rw' prior to loading the startup files.
11912
11913 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
11914 scm_init_rdelim. Do not explicitly create/switch modules.
11915 Return SCM_UNSPECIFIED.
11916 (scm_init_rdelim): Only register `%init-rdelim-builtins'
11917 procedure.
58bee6a8 11918
21a13beb
MV
11919 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
11920 explicitly create/switch modules. Return SCM_UNSPECIFIED.
11921 (scm_init_rw): Only register `%init-rw-builtins' procedure.
11922
11923 * script.c (scm_shell): Evaluate the compiled switches in the
11924 current module, not in the root module.
11925
119262001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
11927
11928 * fluids.c (scm_c_with_fluids): Rename from
11929 scm_internal_with_fluids.
11930 (scm_internal_with_fluids): Deprecated.
11931 (scm_c_with_fluid): New.
11932
09cb9e73
DH
119332001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11934
11935 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
11936
11937 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
11938 accessed with SCM_C[AD]R.
11939
11940 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
11941
c81ea65d
RB
119422001-05-16 Rob Browning <rlb@cs.utexas.edu>
11943
11944 * version.c (s_scm_major_version): doc fixes.
11945 (s_scm_minor_version): doc fixes.
11946 (s_scm_minor_version): new function.
11947
11948 * version.h (scm_init_version): new function.
11949
11950 * versiondat.h.in: add GUILE_MICRO_VERSION.
11951
887dfa7d
DH
119522001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11953
11954 * deprecation.c (scm_init_deprecation): Renamed
11955 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
11956
78930a69
MV
119572001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
11958
11959 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
11960 dependent on cpp_cnvt.awk
11961
39cde5c5
MG
119622001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11963
11964 * script.c (scm_compile_shell_switches): New command line option
11965 `--use-srfi' for loading a list of SRFIs on startup.
11966 (scm_shell_usage): Added `--use-srfi' to help message.
11967
f3f9dcbc
MV
119682001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11969
78930a69 11970 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 11971
f3f9dcbc
MV
11972 The concept of vcells has been removed from Guile. With it,
11973 explicit obarrays and associated operations are gone. Use
11974 hashtables instead of obarrays.
887dfa7d 11975
f3f9dcbc
MV
11976 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
11977 result as variable instead of vcell. Glocs no longer point to a
11978 vcell but to a variable. Use scm_c_define instead of
11979 scm_sysintern and treat the result as a variable (which it is),
11980 not a vcell.
887dfa7d 11981
f3f9dcbc
MV
11982 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
11983 SCM_DEFVARIABLEP): Deprecated.
11984 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
11985 (variable_print): Do not print name of variable.
11986 (variable_equalp): Compare values, not vcells.
11987 (anonymous_variable_sym): Removed.
11988 (make_vcell_variable): Removed.
11989 (make_variable): New, as replacement.
11990 (scm_make_variable, scm_make_undefined_variable): Do not take name
11991 hint parameter.
11992 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
11993 error in that case.
11994 (scm_builtin_variable): Deprecated.
11995
11996 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
11997 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
11998 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
11999 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12000 scm_string_to_obarray_symbol, scm_intern_symbol,
12001 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12002 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12003 Deprecated and moved to "symbols-deprecated.c".
12004 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12005 (scm_init_symbols): Call scm_init_symbols_deprecated.
12006 * symbols-deprecated.c: New file.
12007 * Makefile.am: Added symbols-deprecated.c and related files in all
12008 the right places.
887dfa7d 12009
f3f9dcbc
MV
12010 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12011 SCM_GLOBAL_VCELL_INIT): Deprecated.
12012 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12013 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12014
f3f9dcbc
MV
12015 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12016 SCM_GLOC_SYM.
12017
12018 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12019 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12020 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12021 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12022 Changed according to the `throughout' comments.
12023
12024 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12025 to `int'.
12026 (scm_module_type): Removed.
12027 (the_root_module): Renamed to the_root_module_var. Now points to
12028 a variable instead of a vcell. Updated all uses.
12029 (scm_the_root_module): Return SCM_BOOL_F when module systems
12030 hasn't been booted yet.
12031 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12032 (scm_post_boot_init_modules): Made static.
12033 (scm_set_current_module): Call scm_post_boot_init_modules on first
12034 call.
12035 (make_modules_in, beautify_user_module_x, resolve_module,
12036 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12037 suffix. Now point to variables instead of vcells. Updated all
12038 uses.
12039 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12040 and return SCM_BOOL_F in that case.
12041 (scm_module_transformer): Likewise.
12042 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12043 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12044 (scm_eval_closure_lookup): Do not allow new definitions when
12045 `interface' flag is set.
12046 (scm_standard_interface_eval_closure): New.
12047 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12048 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12049 scm_c_lookup, scm_c_module_define, scm_c_define,
12050 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12051 scm_modules_prehistory): New.
12052 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12053 instead of scm_intern0.
887dfa7d 12054
f3f9dcbc
MV
12055 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12056 symbol.
12057
12058 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12059 hashtable operations to maintain the keywords, not obarray ones.
12060
12061 * init.c (scm_load_startup_files): Do not call
12062 scm_post_boot_init_modules. This is done by
12063 scm_set_current_module now.
12064 (scm_init_guile_1): Call scm_modules_prehistory. Call
12065 scm_init_variable early on.
12066
12067 * goops.c (s_scm_sys_goops_loaded): Get
12068 var_compute_applicable_methods from scm_sym2var, not from a direct
12069 invocation of scm_goops_lookup_closure.
12070
12071 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12072
12073 * gc.c: Added simple debugging hack to mark phase of GC: When
12074 activated, do not tail-call scm_gc_mark. This gives nice
12075 backtraces.
12076 (scm_unhash_name): Removed.
12077
12078 * feature.c (features): Renamed to features_var. Now points to a
12079 variable instead of a vcell. Updated all uses.
12080
12081 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12082 `scm_current_module_lookup_closure' which will do the right thing
12083 when the module system hasn't been booted yet.
12084 (SCM_GLOC_SYM): Removed.
12085 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12086 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12087
f3f9dcbc
MV
12088 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12089 instead of with vcells. Do not overwrite `var' with the result of
12090 the lookup, use the new `real_var' instead. Remove `var2' in
12091 exchange (which was only used with threads).
12092 (sym_three_question_marks): New.
12093 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12094 `SCM_GLOC_SYM'.
12095 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12096 (scm_m_atfop): Expect the function definition to be a variable
12097 instead of a vcell.
12098 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12099 symbol instead.
12100 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12101 (scm_eval_args): Use more explicit code in the gloc branch of the
12102 atrocious struct ambiguity test. The optimizer will sort this
12103 out.
12104 (scm_deval_args): Likewise.
12105 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12106 remember the symbol instead. Added some comments where
12107 scm_tc3_cons_gloc really exclusively refers to structs.
12108 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12109 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12110 of scm_sysintern in general.
12111
12112 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12113 explicit magic.
12114
12115 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12116 pairs. Put the variable directly in the gloc.
12117 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12118 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12119
12120 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12121
12122 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12123 scm_the_last_stack_fluid_var. It now points to a variable instead
12124 of a vcell. Updated all uses.
12125 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12126 instead of a vcell. Updated all uses.
12127
12128 * _scm.h: Include "variables.h" and "modules.h" since almost
12129 everybody needs them now.
12130
12131 * root.h (scm_symhash, scm_symhash_vars): Removed.
12132 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12133
7c33806a
DH
121342001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12135
12136 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12137 scm_listofnull.
7c33806a
DH
12138
12139 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12140 like the SCM_NEWCELL macro counterparts.
12141
12142 (scm_init_storage, scm_init_gc): Moved initialization of
12143 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12144
12145 (scm_init_storage): Moved initialization of scm_undefineds and
12146 scm_listofnull to eval.c, initializion of scm_nullstr to
12147 strings.c, initializion of scm_nullvect to vectors.c.
12148
12149 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12150 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12151
12152 * init.c (scm_init_guile_1): Reordered some initializations and
12153 added dependcy information comments.
12154
12155 * load.c (scm_init_load): Use scm_nullstr.
12156
12157 * strings.c (scm_init_strings): Initialize scm_nullstr.
12158
12159 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12160
11bbab47
MV
121612001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12162
12163 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12164 multiple lines. Thanks to Matthias Köppe!
11bbab47 12165
5cd06d5e
DH
121662001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12167
12168 * deprecation.c: Fixed copyright date.
12169
12170 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12171 DEPRECATION_H to SCM_DEPRECATION_H.
12172
32bac999
TTN
121732001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12174
12175 * guile-doc-snarf.in: Update copyright.
12176 Fix relative path bug. Thanks to Sergey Poznyakoff.
12177
c9dcc5ae
MV
121782001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12179
12180 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12181 accept open ports. Thanks to Quetzalcoatl Bradley!
12182
7c582ec9
MG
121832001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12184
12185 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12186 has 779 primitives on startup.
12187
284ab601
MV
121882001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12189
12190 * eval.c (scm_i_eval): Copy expression before passing it to
12191 SCM_XEVAL. The copy operation was removed unintendedly during my
12192 change on 2001-03-25.
12193
910d1e40
ML
121942001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12195
9a5fa6e9 12196 from Matthias Köppe (thanks!):
910d1e40
ML
12197
12198 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12199 portable.
12200
12201 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12202 docstring.
12203
56e55ac7
DH
122042001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12205
12206 * gc.c (scm_init_gc): Added FIXME comment.
12207
12208 * hooks.c: Since hooks don't have a name any more, it is not
12209 necessary to include objprop.h.
12210
12211 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12212
12213 (symbol_name, scm_make_hook_with_name): Removed.
12214
12215 (scm_create_hook): Don't set the hook's name property.
12216
12217 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12218
12219 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12220
12221 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12222
12223 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12224 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12225 FLOBUFLEN and define it unconditionally.
12226
d204b24c
MV
122272001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12228
438201b4
MV
12229 * gh_data.c (gh_lookup): Call gh_module_lookup with
12230 `scm_current_module ()', not `#f'.
12231 (gh_module_lookup): Expect a module instead of an obarray as first
12232 argument and do lookup in that module.
56e55ac7 12233
d204b24c
MV
12234 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12235 arrays. The length of array is already determined differently and
12236 scm_uniform_vector_length does not work on arrays.
12237
26c1d549
MV
122382001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12239
fe7c2f88
MV
12240 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12241 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12242
26c1d549
MV
12243 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12244 they are not used. Changed `wrong type' error into `wrong num
12245 args' error. Changed all callers.
56e55ac7 12246
26c1d549
MV
12247 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12248 arguments are supplied.
12249
1c938eb8
TTN
122502001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12251
12252 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12253 describe `regexp/notbol' and `regexp/noteol' execution flags.
12254
3a6379f7
TTN
12255 * strop.c (scm_substring_move_x): Doc fix; nfc.
12256
c10ecc4c
MV
122572001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12258
12259 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12260 (scm_set_object_procedure_x): Use it to check argument. Fix
12261 docstring.
12262
12263 * evalext.c (scm_definedp): Fix docstring.
12264
a57a0b1e
GH
122652001-05-05 Gary Houston <ghouston@arglist.com>
12266
12267 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12268 support.
12269
7a095584
NJ
122702001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12271
12272 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12273 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12274 Change R4RS references to R5RS.
12275
12276 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12277 docstring source are correctly reproduced in the output (ii)
12278 we don't anymore get occasional trailing quotes. Also reorganized
12279 and commented the code a little.
12280
12281 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12282 fixes.
12283
dd2a6f3a
MG
122842001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12285
12286 * strop.c (scm_string_split): New procedure.
12287
12288 * strop.h (scm_string_split): Added prototype.
12289
00120130
GH
122902001-05-04 Gary Houston <ghouston@arglist.com>
12291
12292 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12293 Dale P. Smith.
12294
b65e6bfe
MV
122952001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12296
12297 * rw.c: Include "modules.h" and "strports.h".
12298
12299 * net_db.h (scm_gethost): Added prototype.
12300
12301 * deprecation.h, deprecation.c: New.
12302 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12303 (DOT_X_FILES): Added "deprecation.x".
12304 (modinclude_HEADERS): Added "deprecation.h".
12305
12306 * init.c: Include "deprecation.h".
12307 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12308
b65e6bfe
MV
123092001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12310
12311 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12312 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12313 New.
12314
b0e5fd8c
GH
123152001-04-29 Gary Houston <ghouston@arglist.com>
12316
12317 * rw.c: new file, implementing C part of module (ice-9 rw).
12318 (scm_read_string_x_partial): moved from ioext.c
12319 (scm_init_rw): new proc.
12320 * rw.h: new file.
12321 init.c: include rw.h and call scm_init_rw.
12322 Makefile.am: include rw.c and rw.h.
12323
0b2da99c
RB
123242001-04-28 Rob Browning <rlb@cs.utexas.edu>
12325
12326 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12327 know what's supposed to happen to it.
12328
12329 * list.h (scm_list_star): deprecation expired - removed.
12330
12331 * numbers.h (scm_dblproc): deprecation expired - removed.
12332 (SCM_UNEGFIXABLE): deprecation expired - removed.
12333 (SCM_FLOBUFLEN): deprecation expired - removed.
12334 (SCM_INEXP): deprecation expired - removed.
12335 (SCM_CPLXP): deprecation expired - removed.
12336 (SCM_REAL): deprecation expired - removed.
12337 (SCM_IMAG): deprecation expired - removed.
12338 (SCM_REALPART): deprecation expired - removed.
12339 (scm_makdbl): deprecation expired - removed.
12340 (SCM_SINGP): deprecation expired - removed.
12341 (SCM_NUM2DBL): deprecation expired - removed.
12342 (SCM_NO_BIGDIG): deprecation expired - removed.
12343
12344 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12345 (scm_tc_dblr): deprecation expired - removed.
12346 (scm_tc_dblc): deprecation expired - removed.
12347 (scm_tc16_flo): deprecation expired - removed.
12348 (scm_tc_flo): deprecation expired - removed.
12349
12350 * tag.h (scm_tag): deprecation expired - removed.
12351
12352 * tag.c: (scm_tag): deprecation expired - removed.
12353
12354 * ioext.c: (scm_fseek): deprecation expired - removed.
12355
12356 * ioext.h (scm_fseek): deprecation expired - removed.
12357
12358 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12359
12360 * gh.h (gh_int2scmb): deprecation expired - removed.
12361
e3334972
NJ
123622001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12363
12364 * stacks.c (scm_make_stack): Fix typo in docstring.
12365
a0f979ac
RB
123662001-04-27 Rob Browning <rlb@cs.utexas.edu>
12367
12368 * error.c (scm_sysmissing): deprecation expired - removed.
12369
12370 * error.h (scm_sysmissing): deprecation expired - removed.
12371
12372 * gc.c
12373 (scm_init_gc): gc-thunk deprecation expired - removed.
12374 (scm_gc_vcell): deprecation expired - removed.
12375 (gc_async_thunk): scm_gc_vcell related code removed.
12376
12377 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12378
12379 * strings.h
12380 (SCM_NSTRINGP): deprecation expired - removed.
12381 (SCM_NRWSTRINGP): deprecation expired - removed.
12382
12383 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12384
12385 * chars.h
12386 (SCM_ICHRP): deprecation expired - removed.
12387 (SCM_ICHR): deprecation expired - removed.
12388 (SCM_MAKICHR): deprecation expired - removed.
12389
12390 * ports.h
12391 (SCM_INPORTP): deprecation expired - removed.
12392 (SCM_OUTPORTP): deprecation expired - removed.
12393
253081cf
MV
123942001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12395
12396 * modules.c (scm_module_type): New.
12397 (scm_post_boot_init_modules): Initialize from Scheme value.
12398 (the_module, scm_current_module, scm_init_modules): the_module is
12399 now a C only fluid.
12400 (scm_current_module): Export to Scheme.
12401 (scm_set_current_module): Do not call out to Scheme, do all the
12402 work in C. Export procedure to Scheme. Only accept modules, `#f'
12403 is no longer valid as the current module. Only set
12404 scm_top_level_lookup_closure_var and scm_system_transformer when
12405 they are not deprecated.
12406 (scm_module_transformer, scm_current_module_transformer): New.
12407
12408 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12409 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12410
253081cf
MV
12411 * gh_data.c: Removed FIXME comment about gh_lookup returning
12412 SCM_UNDEFINED. That's the right thing to do.
12413
12414 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12415 into the conditionally compiled sections.
12416 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12417 scm_current_module_transformer instead of scm_system_transformer.
12418 * init.c (start_stack): Move initialization of
12419 scm_system_transformer to the deprecated section.
1c938eb8 12420
1f7f9ed4
NJ
124212001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12422
12423 * throw.c (scm_throw): Correct docstring.
12424
66c73b76
GH
124252001-04-22 Gary Houston <ghouston@arglist.com>
12426
eefae538
GH
12427 * socket.c: attempted to improve the docstrings slightly.
12428
66c73b76
GH
12429 * net_db.c: remove bogus "close" declaration.
12430 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12431 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12432 moved to socket.c.
12433 * net_db.h: declarations moved too.
12434
12435 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12436 long.
12437 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12438 (VALIDATE_INET6): new macro.
12439 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12440 inet-pton and inet-ntop.
12441 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12442 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12443
7a7f7c53
DH
124442001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12445
12446 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12447 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12448
12449 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12450 when compiled in debug mode.
12451
12452 (scm_gc_sweep): Only call smob's free function if it is defined.
12453
12454 * print.c (scm_iprin1): No need to check for validity of smob
12455 type or existence of print function.
12456
12457 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12458 Resizing will not work well with preemptive threading.
12459
12460 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12461
12462 (scm_make_smob_type): Extracted initialization of smob
12463 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12464 of the critical section.
12465
12466 (scm_smob_prehistory): Initialize all smob descriptors. By
12467 default, don't assign a smob free function: Most smob types don't
12468 need one.
12469
12470 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12471
e1368a8d
GH
124722001-04-21 Gary Houston <ghouston@arglist.com>
12473
12474 * socket.c (FLIP_NET_HOST_128): new macro.
12475 (scm_fill_sockaddr): use new macro.
12476 (scm_addr_vector): completed IPv6 address support. added const
12477 to the address parameter.
12478
5a525b84
GH
124792001-04-20 Gary Houston <ghouston@arglist.com>
12480
12481 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12482 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12483 is defined.
12484 (scm_addr_vector): use a switch instead of multiple if statements.
12485 Add support for IPv6 (incomplete) .
e1368a8d 12486 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12487
1a551638
DH
124882001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12489
12490 * struct.c (scm_free_structs): Only pairs may be accessed with
12491 SCM_C[AD]R.
12492
c07b3fef
MD
124932001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12494
a9d861e3
MD
12495 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12496
c07b3fef
MD
12497 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12498 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12499 parentheses in order to get the correct associativity.
12500
af7546eb
DH
125012001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12502
12503 * unif.c (scm_array_to_list): Added missing handling of arrays of
12504 bytes. Thanks to Masao Uebayashi for the bug report.
12505
4daecfee
DH
125062001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12507
12508 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12509 consistently.
12510
726d810a
DH
125112001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12512
12513 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12514
12515 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12516 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12517 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12518 SCM_CLOSURE_FORMALS.
12519
12520 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12521 (scm_i_procedure_arity): Prefer stronger predicates like
12522 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12523
12524 * macros.c (macro_print): Extracted macro printing code from
12525 print.c and simplified it.
12526
12527 (scm_macro_type): Use SCM_MACRO_TYPE;
12528
12529 (scm_init_macros): Use macro_print for printing macros.
12530
12531 * print.c (scm_print_opts): Improved option documentation.
12532
12533 (scm_iprin1): Extracted printing of macros to macros.c.
12534 Simplified printing of ordinary closures.
12535
12536 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12537 Martin Grabmueller for the bug report.
12538
e038c042
DH
125392001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12540
12541 This patch eliminates some further applications of SCM_C[AD]R to
12542 non pair cells.
12543
12544 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12545 never been applied to real pairs.
12546
12547 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12548
12549 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12550
12551 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12552 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12553 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12554
12555 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12556 Added.
12557
12558 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12559 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12560
12561 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12562 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12563 SCM_SET{AND,OR}_CAR.
12564
3453619b
GH
125652001-04-17 Gary Houston <ghouston@arglist.com>
12566
12567 * some initial support for IPv6:
1c938eb8 12568
3453619b
GH
12569 * socket.c (scm_fill_sockaddr): improve the argument validation.
12570 don't allocate memory until all args are checked. instead of
12571 unconditional memset of soka, try setting sin_len to 0 if
12572 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12573 (scm_socket, scm_connect): extend docstrings for IPv6.
12574 (scm_init_socket): intern AF_INET6 and PF_INET6.
12575
216eedfc
DH
125762001-04-17 Niibe Yutaka <gniibe@m17n.org>
12577
12578 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12579 matches SCM_DEFER_INTS at the beginning of the function.
12580
12581 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12582
12583 * gc.c (scm_igc): Unconditionally call
12584 SCM_CRITICAL_SECTION_START/END.
12585
12586 * fluids.c (next_fluid_num): Unconditionally call
12587 SCM_CRITICAL_SECTION_START/END.
12588 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12589
12590 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12591 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12592 Removed.
12593
12594 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12595 Defined as nothing for the case of !defined(USE_THREADS).
12596 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12597 Removed.
12598 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12599 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12600 LINE.
12601 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12602 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12603 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12604 SCM_CRITICAL_SECTION_START/END.
12605 (SCM_REALLOW_INTS: Bug fix. Don't call
12606 SCM_THREAD_SWITCHING_CODE.
12607 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12608 SCM_THREAD_SWITCHING_CODE directly.
12609 (SCM_ENTER_A_SECTION): Unconditionally use
12610 SCM_CRITICAL_SECTION_START/END. (was:
12611 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12612
126132001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12614
12615 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12616 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12617 allowed to explicitly set this macro via the CFLAGS variable
12618 during make.
12619
12620 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12621 (SCM_THREAD_CRITICAL_SECTION_START,
12622 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12623 SCM_THREAD_CRITICAL_SECTION_START/END to
12624 SCM_CRITICAL_SECTION_START/END.
12625
f22ed5a0
KN
126262001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12627
12628 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12629 instead of bzero.
1c938eb8 12630
f22ed5a0 12631 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12632 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12633
12634 Thanks to NIIBE Yutaka.
12635
508ded1c
MD
126362001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12637
a087ba81
MD
12638 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12639 goops module should be registered in order to work for an
12640 application which uses libguile statically linked.)
508ded1c 12641
e4b265d8
DH
126422001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12643
12644 * numbers.[ch] (scm_num2long, scm_num2long_long,
12645 scm_num2ulong_long, scm_num2ulong): Argument position is an
12646 unsigned integer.
12647
12648 * environments.c (eval_environment_folder,
12649 import_environment_folder), gh_data.c (gh_scm2longs,
12650 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12651 for integers and pointers, respectively.
12652
12653 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12654 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12655 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12656 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12657
12658 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12659 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12660 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12661 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12662 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12663 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12664
89d04205
NJ
126652001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12666
12667 * strings.c (scm_read_only_string_p): Update docstring to reflect
12668 current (non-)usage of "read only" strings.
40f83c3e
NJ
12669 (scm_make_shared_substring): Clarify docstring by changing
12670 "semantics" to "arguments".
89d04205 12671
4d66be54
MG
126722001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12673
12674 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12675 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12676 improvements.
12677
1e6808ea
MG
126782001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12679
12680 The following changes make the documentation more consistent.
1c938eb8 12681
1e6808ea
MG
12682 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12683 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12684 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12685 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12686 ... @end lisp.
12687
12688 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12689 (scm_array_dimensions, scm_make_shared_array),
12690 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12691 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12692 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12693 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12694 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12695 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12696 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12697 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12698 @example ... @end example to @lisp ... @end lisp.
12699
12700 * weaks.c (scm_weak_vector): Corrected docstring.
12701
12702 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12703 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12704 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12705 (scm_hashx_set_x, scm_hashx_get_handle),
12706 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12707 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12708 vectors.c (scm_vector_fill_x), strings.c
12709 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12710 objprop.c (scm_set_object_properties_x):
12711 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12712 strports.c (scm_call_with_input_string), ports.c
12713 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12714 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12715 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12716 (scm_make_weak_vector,scm_weak_vector_p),
12717 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12718 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12719 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12720 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12721 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12722 Made parameter names match documentation by renaming parameters
12723 and/or fixing docstrings.
1c938eb8 12724
1e6808ea
MG
12725 * numbers.c (scm_ash): Corrected Texinfo markup.
12726
12727 * strop.c (scm_string_index, scm_string_rindex),
12728 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12729
12730 * vports.c (scm_make_soft_port), unif.c
12731 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12732 (scm_dimensions_to_uniform_array, scm_transpose_array),
12733 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12734 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12735 (scm_array_to_list, scm_list_to_uniform_array),
12736 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12737 (scm_open_input_string, scm_open_output_string),
12738 (scm_get_output_string), strop.c (scm_string_copy),
12739 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12740 (scm_get_internal_real_time, scm_times),
12741 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12742 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12743 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12744 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12745 simpos.c (scm_system), random.c (scm_random_uniform),
12746 (scm_random_normal, scm_random_exp), ramap.c
12747 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12748 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12749 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12750 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12751 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12752 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12753 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12754 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12755 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12756 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12757 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12758 (scm_integer_expt, scm_bit_extract, scm_logcount),
12759 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12760 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12761 (scm_interaction_environment), macros.c (scm_makacro),
12762 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12763 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12764 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12765 (scm_fluid_ref), filesys.c (scm_open_fdes),
12766 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12767 Docstring correction: `Returns' -> `Return'
12768
1c938eb8
TTN
12769 * gc.c (scm_set_debug_cell_accesses_x):
12770 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
12771 * fluids.c (scm_fluid_p): Added texinfo markup.
12772
12773 * error.c (scm_strerror): Made docstring more precise.
12774
12775 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12776 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12777 (scm_symbol_p, scm_symbol_to_string), strorder.c
12778 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12779 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12780 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12781 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12782 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12783
9a6976cd
DH
127842001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12785
12786 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12787 mode, as suggested by Michael Livshin.
12788
463b2219
ML
127892001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12790
12791 * backtrace.c (display_backtrace_body): since the `print_state'
12792 variable is not used (instead its data field is used directly as
12793 `pstate'), protect it from the hungry compiler optimizations.
12794 thanks to Bill Schottstaedt for the report.
12795
61045190
DH
127962001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12797
12798 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12799 It is only defined and used if guile is compiled with
12800 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12801 let cells with a free_cell type tag be visible outside of the
12802 garbage collector when in debug mode.
12803
12804 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12805
12806 (scm_assert_cell_valid): Use a local static variable to avoid
12807 recursion.
12808
12809 (MARK): Only check for rogue cell pointers in debug mode. Use
12810 scm_cellp for this purpose and place all checks for rogue pointers
12811 into that function. Further, since due to conservative scanning
12812 we may encounter free cells during marking, don't use the standard
12813 cell type accessor macro to determine the cell type.
12814
12815 (scm_cellp): Check if the cell pointer actually points into a
12816 card header.
12817
12818 (scm_init_gc): Initalize scm_tc16_allocated.
12819
12820 * gc.h (GCH): Renamed to SCM_GC_H.
12821
12822 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12823 might be unnecessary, but I feel better this way :-)
12824
12825 (SCM_GC_CELL_TYPE): New macro.
12826
12827 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12828 in guile, and it is unlikely that they will be applied to real
12829 pairs anyway.
12830
12831 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12832
12833 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12834 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12835
12836 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12837 make sure that in debug mode no free cell will ever be visible
12838 outside of the garbage collector.
12839
85d6df6a
DH
128402001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12841
12842 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12843 values.
12844
12845 * async.c (scm_system_async), variable.c (scm_make_variable,
12846 scm_make_undefined_variable): Use scm_cons to create a pair.
12847
12848 * debug.c (scm_reverse_lookup): Perform proper type checking.
12849 Remove suspicious use of SCM_SLOPPY_CONSP.
12850
12851 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12852 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12853 the corresponding optimization.
12854
12855 * eval.c (iqq): Use proper type check.
12856
12857 (scm_m_expand_body): Remove redundant type checks.
12858
12859 (promise_print): Don't access promise cells as pairs.
12860
12861 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12862 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12863 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12864 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12865 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12866
12867 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12868 (scm_iprin1): Use new macro predicate and accessors.
12869
12870 * eval.h (scm_tc16_macro): Removed declaration. It is declared
12871 in macros.h.
12872
12873 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
12874 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
12875 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
12876 SCM_VARIABLE_H. Even the macros that are used to inhibit
12877 including a header file twice should be in the SCM_ namespace.
12878
12879 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
12880 properties.c (scm_primitive_property_ref,
12881 scm_primitive_property_del_x): Prefer stronger predicates like
12882 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12883
12884 * gc.c (MARK): Use proper macros to access procedure-with-setter
12885 cell elements and closure cell elements.
12886
12887 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
12888 access free cells as pairs.
12889
12890 (scm_unprotect_object): scm_hashq_get_handle returns #f if
12891 no hashtab entry is found.
12892
12893 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
12894 SCM_CLR_PORT_OPEN_FLAG.
12895
12896 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
12897 use SCM_SET_C[AD]R for uninitialized cells.
12898
12899 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
12900 If the hashtable has no slots, return #f instead of '(). This
12901 unifies the return value with most assoc-functions.
12902
12903 (scm_hash_fn_ref): Use proper type check.
12904
12905 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
12906 Removed references to non-existing functions from documentation.
12907
12908 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
12909 access keyword cell elements.
12910
12911 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
12912 macros.
12913
12914 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
12915
12916 * print.c (scm_iprlist): Added comment. Improved loop
12917 conditions.
12918
12919 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
12920 pairs.
12921
12922 * smob.c (scm_markcdr): Don't access smob cells as pairs.
12923
12924 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
12925
12926 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
12927 cells as pairs.
12928
12929 * variable.c (variable_print, variable_equalp, scm_variable_ref,
12930 scm_variable_set_x): Use proper macros to access variable cell
12931 elements.
12932
12933 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
12934
12935 * variable.h (SCM_VARVCELL): Don't access variable cells as
12936 pairs.
12937
12938 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
12939 added FIXME comment, removed register specifier.
12940
1b27e91a
KN
129412001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
12942
12943 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
12944 * init.c (scm_init_guile_1): Don't init goopscore module.
12945
16c634ec
MV
129462001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12947
12948 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
12949
91344ceb
MG
129502001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12951
12952 * strop.c (scm_string_to_list): Fixed docstring markup.
12953 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
12954 (scm_string_downcase, scm_string_capitalize_x),
12955 (scm_string_capitalize): Rewrote and corrected docstrings.
12956 (scm_string_ci_to_symbol): Made docstring more explicit.
12957
07576812
MV
129582001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12959
12960 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
12961 eval.c can use it.
12962 (scm_call_with_values): Removed.
12963 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
12964 so that it can be exported.
12965 (scm_call_with_values): Removed.
1c938eb8 12966
07576812
MV
12967 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
12968 * eval.c: Include "libguile/values.h"
12969 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
12970 New.
12971 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
12972 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
12973 New delcarations to support above change.
12974
12975 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
12976 errors with last change.
1c938eb8 12977
07576812
MV
129782001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
12979
12980 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
12981 scm_i_eval): Moved the application of the system transformer from
12982 scm_i_eval to scm_primitive_eval.
12983
a17bb5fd
NJ
129842001-03-23 Neil Jerram <neil@ossau.uklinux.net>
12985
a6be01a4
NJ
12986 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
12987
a17bb5fd
NJ
12988 * strop.c (scm_string_index): Fix docstring line break
12989 regression.
12990
12991 * list.c (scm_cons_star): Fix docstring typo.
12992
be54b15d
DH
129932001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12994
12995 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
12996 (big2str), ports.c (scm_drain_input), read.c (scm_read,
12997 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
12998 scm_make_string, scm_string_append), strports.c (st_resize_port,
12999 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13000 scm_makstr with calls to scm_allocate_string.
13001
13002 * strings.[ch] (scm_allocate_string): New function.
13003
13004 * strings.[ch] (scm_makstr): Deprecated.
13005
789ecc05
GH
130062001-03-18 Gary Houston <ghouston@arglist.com>
13007
6d163216
GH
13008 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13009 NULL. rewrote the docstring.
13010 (scm_mkstemp): new procedure implementing "mkstemp!".
13011 * posix.h: declare scm_mkstemp.
13012
789ecc05
GH
13013 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13014 normally it would be found in netdb.h.
13015
c6c79933
GH
130162001-03-17 Gary Houston <ghouston@arglist.com>
13017
e9e225e5
GH
13018 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13019 warning when HAVE_ARRAYS is not defined. move len too.
13020
13021 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13022 (EXTRA_DOT_X_FILES): let configure set the value.
13023 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13024
c6c79933
GH
13025 * gc.c (scm_must_malloc): changed the comment explaining when
13026 scm_must variants of malloc/free etc., should be used, based on
13027 explanation from Dirk Herrmann.
13028 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13029 string with procedure name. use scm_must_malloc instead of malloc.
13030 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13031 of malloc/free.
13032 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13033 scm_ungetc): use scm_must variants of malloc/realloc/free.
13034 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13035
b3fcac34
DH
130362001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13037
13038 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13039 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13040 scm_wrong_type_arg instead.
13041
13042 (SCM_WNA): Deprecated.
13043
13044 * error.[ch] (scm_wta): Deprecated.
13045
13046 * numbers.c (s_i_log): Minor comment fix.
13047
13048 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13049 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13050 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13051 wrong-num-args or misc errors.
13052
13053 * unif.c (scm_make_shared_array, scm_transpose_array,
13054 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13055 Validate the rest argument (note: this is only done when guile is
13056 built with SCM_DEBUG_REST_ARGUMENT=1)
13057
13058 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13059 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13060
13061 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13062 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13063
68baa7e7
DH
130642001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13065
13066 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13067 instead of scm_wrong_num_args.
13068
13069 * coop-threads.c: Don't include libguile/strings.h. (Was only
13070 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13071
13072 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13073 wrong-num-args errors.
13074
9f40cd87
DH
130752001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13076
13077 * error.[ch] (scm_error_num_args_subr): New function.
13078
5352393c
MG
130792001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13080
13081 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13082 (scm_length, scm_append, scm_reverse, scm_list_ref),
13083 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13084 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13085 (scm_delete1_x), gc.c (scm_map_free_list),
13086 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13087 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13088 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13089 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13090 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13091 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13092 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13093
13094 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13095 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13096 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13097 symbols.c (scm_symbol_interned_p), numbers.c
13098 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13099 markup.
13100
a9205f07
KN
131012001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13102
13103 * snarf.h (SCM_CONST_LONG): Deprecated.
13104 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13105
6d583887
MV
131062001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13107
13108 * numbers.c (scm_num2ulong): Check that a bignum is positive
13109 before looking at the magnitude. Correctly check for overflow
13110 during conversion.
13111 (scm_num2long_long): Likewise.
13112 (scm_num2ulong_long): New.
13113 (ULONG_LONG_MAX): Define if not already defined.
13114 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13115
e87a03fc
MG
131162001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13117
13118 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13119
13120 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13121 (SCM_OPOUTSTRPORTP): New predicate macros.
13122 (scm_open_input_string, scm_open_output_string),
13123 (scm_get_output_string): New prototypes.
1c938eb8 13124
e87a03fc
MG
13125 * strports.c (scm_open_input_string, scm_open_output_string),
13126 (scm_get_output_string): New procedures (SRFI-6 compliant).
13127 Made scm_tc16_strport non-static.
13128
160bb34a
DH
131292001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13130
13131 * macros.h (SCM_ASSYNT): Removed unused object argument from
13132 signature.
13133
13134 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13135 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13136 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13137 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13138 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13139 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13140 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13141 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13142 scm_m_atdispatch): Removed unused object argument from call to
13143 SCM_ASSYNT.
13144
80dee77b
DH
131452001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13146
13147 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13148 const int* to reflect that the input array of integers remains
13149 unchanged. Thanks to Brett Viren for the hint.
13150
d3dd80ab
MG
131512001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13152
13153 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13154 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13155 in various places.
13156 (gh_scm2newstr, gh_symbol2newstr): Change call to
13157 scm_must_malloc() to malloc(), because user-free()able memory is
13158 allocated.
13159
13160 * gc.c: Added declaration of `scm_debug_check_freelist'.
13161
26a3038d
MG
131622001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13163
13164 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13165
1f3908c4
KN
131662001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13167
13168 * strports.c (scm_object_to_string): New procedure.
13169 (scm_strprint_obj): Deprecated.
13170 * strports.h: Reflect the changes.
13171
e11208ca
DH
131722001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13173
13174 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13175
13176 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13177 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13178 SCM_ASSYNT to check for correct argument types. Either use some
13179 SCM_VALIDATE_* macro or an explicit test.
13180
13181 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13182 misc-errors.
13183
13184 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13185 instead of calling scm_wta.
13186
67e8151b
MG
131872001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13188
13189 * load.c (scm_primitive_load, scm_primitive_load_path),
13190 (scm_sys_search_load_path): Corrected docstrings (file ->
13191 filename).
13192
13193 * eval.c (scm_force): Added texinfo markup to docstring.
13194 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13195
13196 * debug-malloc.c: Reinserted #include <stdio.h>.
13197
e0c08f17
KN
131982001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13199
e39c3de4
KN
13200 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13201
e0c08f17
KN
13202 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13203 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13204 Use SCM_LISTn instead of scm_listify.
13205
e6e2e95a
MD
132062001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13207
13208 * _scm.h: Removed #include <errno.h>.
13209
13210 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13211 errno variable (can be a macro on some systems, for example when
13212 using linux libc with threads).
13213
13214 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13215 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13216 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13217 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13218
97d0e20b
GH
132192001-03-10 Gary Houston <ghouston@arglist.com>
13220
13221 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13222 not already defined.
13223
e75341b3
MD
132242001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13225
13226 * coop.c: Inserted #include <stdio.h>.
13227
13228 * iselect.c: Reinserted #include <stdio.h>.
13229
74355186
MV
132302001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13231
13232 * posix.c: Replaced `#define' of __USE_XOPEN right before
13233 including unistd.h with a define of _GNU_SOURCE at the very top of
13234 the file.
13235
783e7774
KN
132362001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13237
13238 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13239 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13240 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13241 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13242 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13243 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13244 print.c, procprop.c, procs.c, properties.c, ramap.c,
13245 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13246 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13247 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13248 Remove #include <stdio.h>
783e7774
KN
13249 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13250
13251 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13252
9a677c37
MG
132532001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13254
13255 * posix.c (scm_gethostname): Set initial name length to 256 for
13256 Solaris.
13257
94e6d793
MG
132582001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13259
13260 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13261 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13262 (scm_sethostname, scm_gethostname): New prototypes.
13263
13264 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13265 <sys/file.h>, if present.
13266 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13267 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13268 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13269 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13270 (scm_sethostname, scm_gethostname): New procedures.
13271
650a1cf9
NJ
132722001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13273
13274 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13275 not optional (ii) "recommend" spelling correction.
13276
9636b49c
MD
132772001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13278
5e4a4d09
MD
13279 * ramap.c (racp): Removed optimization which caused array copying
13280 to fail if the two arrays shared storage. Re-inserted the IVDEP
13281 macros removed in the change of 2000-03-09. (Don't really have a
13282 complete grasp of what they are for, but they seem to be necessary
13283 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13284
9636b49c
MD
13285 * hash.c (scm_string_hash): Don't downcase characters.
13286
04a4d666
MD
132872001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13288
9636b49c 13289 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13290 size from 277 --> 1009.
13291
13292 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13293 function.
13294
13295 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13296
04a4d666
MD
13297 * validate.h: Code formatting.
13298
66418d34
KN
132992001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13300
13301 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13302 (*.doc): Add dependency on guile-snarf.awk.in.
13303
13304 * guile-snarf.awk.in: Neglect spaces at the end of
13305 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13306 middle of docstrings. (To avoid the problem with gcc-2.96.)
13307
2ade72d7
DH
133082001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13309
13310 * coop-threads.c (scm_call_with_new_thread), load.c
13311 (scm_primitive_load, scm_sys_search_load_path), random.c
13312 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13313 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13314 (potentially) issue a scm-misc-error or wrong-num-args error
13315 message.
13316
13317 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13318 about the expected type with the wrong-type-arg error message.
13319
13320 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13321 a C level bug that can't be fixed from scheme anyway.
13322
586d7da2
MD
133232001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13324
13325 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13326 Duplicate bindings are OK in a let* since a let* is semantically
13327 equivalent to a nested set of let:s.
13328
1dd05fd8
MG
133292001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13330
13331 * print.c (scm_print_options): Fixed texinfo in docstring.
13332
13333 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13334 the underlying functions getservent, getprotoent or getnetent
13335 return NULL instead of signalling an error.
13336
439006bf
GH
133372001-03-04 Gary Houston <ghouston@arglist.com>
13338
13339 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13340 taking an unexpectedly large filename for an AF_UNIX socket from
13341 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13342
439006bf
GH
13343 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13344 former and adjusted the latter.
13345 (scm_socket, scm_socketpair): cosmetic changes.
13346 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13347 size_t as socklen_t substitute. don't restrict args/return values
13348 to INUM: allow full range of int or size_t.
13349 (scm_fill_sockaddr): check arguments before allocating memory, to
13350 avoid leakage. use malloc, not scm_must_malloc.
13351 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13352 substitute. free the sockaddr structure before throwing an error.
13353 (scm_init_add_buffer): procedure removed, together with its static
13354 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13355 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13356 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13357 scm_sendto): use a local buffer instead of scm_addr_buffer.
13358 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13359 not size_t.
13360 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13361 call to detect whether recvfrom could be bothered to set the address.
13362 (scm_init_socket): don't call scm_init_addr_buffer.
13363
276dd677
DH
133642001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13365
13366 * debug.c (scm_procedure_source, scm_procedure_environment),
13367 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13368 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13369 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13370 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13371 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13372 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13373 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13374 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13375 scm_array_to_list, scm_array_prototype), validate.h
13376 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13377 scm_misc_error or scm_wrong_type_arg instead.
13378
13379 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13380
5e03762c
MD
133812001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13382
13383 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13384 (scm_sys_tag_body): Added.
13385
db4b4ca6
DH
133862001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13387
13388 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13389 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13390 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13391 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13392 options.c (scm_options), ports.c (scm_remove_from_port_table),
13393 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13394 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13395 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13396 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13397 instead.
13398
87e7741d
MD
133992001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13400
13401 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13402
d19b0aac
MV
134032001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13404
13405 * eval.c (scm_s_duplicate_bindings): New error message.
13406 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13407
2fd945df
MV
134082001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13409
13410 * eval.h (SCM_EVALIM2): New macro. Use it when a
13411 immediate, literal constant should be evaluated.
13412 * eval.c (scm_s_duplicate_formals): New error message string.
13413 (scm_c_improper_memq): New function.
13414 (scm_m_lambda): Check for duplicate arguments.
13415 (scm_ceval, scm_deval): When executing a body: only cons a new
13416 toplevel environment frame when it is different from the
13417 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13418 check for empty combinations; use SCM_EVALIM2 for the same reason
13419 in the non-toplevel loop.
13420 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13421 New labels with the meaning of their non-"nontoplevel" partners,
13422 but they are used when it is known that the body is not evaluated at
13423 top-level.
13424 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13425 reporting for empty combinations.
13426
9e6fc585
KN
134272001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13428
13429 * Remove dump facilities.
13430 * dump.c, dump.h: Removed.
13431 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13432 * init.c: Remove #include "libguile/dump.h".
13433 (scm_init_guile_1): Remove scm_init_dump.
13434 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13435 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13436 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13437 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13438
13439 * keywords.c: Remove #include "libguile/dump.h".
13440 (keyword_dump, keyword_undump): Removed.
13441 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13442
eae54bf0
MG
134432001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13444
13445 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13446 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13447 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13448 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13449 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13450 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13451 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13452 to @code{} as the texinfo manual recommends, converted the
13453 examples to use a @lisp{}-environment.
13454
13455 * strports.c (scm_eval_string): Cleaned up the docstring.
13456
13457 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13458 markup.
13459
13460 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13461 (scm_number_to_string, scm_string_to_number, scm_number_p)
13462 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13463 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13464 (scm_ash): Added texinfo markup and removed obsolete @refill.
13465 (scm_gr_p): Corrected comment.
13466 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13467 docstring) comments.
13468 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13469 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13470 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13471 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13472 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13473 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13474 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13475 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13476
23deee81
DH
134772001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13478
13479 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13480 (Obviously nobody compiles with SCM_RECKLESS defined...)
13481
13482 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13483
6fe692e9
MD
134842001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13485
13486 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13487
13488 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13489
27c37006
NJ
134902001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13491
13492 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13493 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13494 since use of `z' suggests that the arguments may be complex.
13495
13496 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13497 typos.
13498
2069af38
NJ
134992001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13500
13501 * dump.c (scm_binary_write, scm_binary_read), eval.c
13502 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13503 scm_guardian_greedy_p, scm_make_guardian), fports.c
13504 (scm_file_port_p): Minor docstring fixes.
13505
b42ff180
MV
135062001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13507
2069af38 13508 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13509
13510 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13511 scm_i_eval.
13512 (make_class_from_template): Do not bother to set the current
13513 module around the call to DEFVAR, scm_eval takes care of that.
13514 (scm_init_goops): Make scm_module_goops and
13515 scm_goops_lookup_closure permanent objects.
1c938eb8 13516
97ea55f8
MV
13517 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13518 top level, create a fresh top-level environment for each
13519 expression instead of mutating the exisint frame. This is
13520 important when that frame is closed over.
13521
b42ff180
MV
13522 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13523 SCM_DIGSPERLONG instead of DIGSPERLONG.
13524
09f2ab1e
MV
135252001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13526
13527 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13528 before applying arrow procedure in `cond' and before applying
13529 receiver procedure in call-with-current-continuation.
13530 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13531 macro. The argument is expanded more than one time.
13532
13533 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13534 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13535
135362001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13537
13538 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13539 notice and license.
13540
7090240c
MG
135412001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13542
13543 * variable.c (scm_make_variable, scm_make_undefined_variable)
13544 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13545 (scm_variable_bound_p), values.c (scm_values)
13546 (scm_call_with_values), unif.c (scm_bit_count)
13547 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13548 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13549 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13550 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13551 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13552 (scm_copy_random_state, scm_random), print.c (scm_newline)
13553 (scm_write_char, scm_simple_format), debug-malloc.c
13554 (scm_malloc_stats), environments.c (scm_environment_p)
13555 (scm_environment_bound_p, scm_environment_ref)
13556 (scm_environment_fold, scm_environment_define)
13557 (scm_environment_undefine, scm_environment_set_x)
13558 (scm_environment_cell, scm_environment_observe)
13559 (scm_environment_observe_weak, scm_environment_unobserve)
13560 (scm_make_eval_environment, scm_eval_environment_p)
13561 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13562 (scm_eval_environment_imported)
13563 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13564 (scm_import_environment_p, scm_import_environment_imports)
13565 (scm_import_environment_set_imports_x, scm_make_export_environment)
13566 (scm_export_environment_p, scm_export_environment_private)
13567 (scm_export_environment_set_private_x)
13568 (scm_export_environment_signature)
13569 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13570 Added texinfo markup.
13571
13572 * ports.c (scm_drain_input): Lowercased argument to @var.
13573 (scm_current_input_port, scm_current_output_port): Filled in
13574 missing explanation.
13575 (scm_current_load_port, scm_set_current_output_port)
13576 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13577 Added texinfo markup.
13578
13579 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13580 (scm_release_arbiter): Added texinfo markup to docstrings.
13581 Changed `Returns' to `Return'.
13582 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13583
25703850
NJ
135842001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13585
13586 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13587 by doubling them to `@@'.
13588
73c0fdce
MG
135892001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13590
13591 * numbers.c (scm_lognot), random.c (scm_random,
13592 scm_random_normal, scm_random_solid_sphere_x,
13593 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13594 scm_random_exp), dynwind.c
13595 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13596
73c0fdce
MG
13597 * goops.c (scm_sys_initialize_object, scm_instance_p,
13598 scm_class_name, scm_class_precedence_list, scm_class_slots,
13599 scm_class_environment, scm_generic_function_name,
13600 scm_generic_function_methods, scm_method_generic_function,
13601 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13602 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13603 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13604 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13605 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13606 scm_class_direct_supers, scm_class_direct_slots,
13607 scm_class_direct_subclasses, scm_class_direct_methods,
13608 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13609 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13610 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13611 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13612 scm_memoized_environment, scm_procedure_name,
13613 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13614 objects.c
13615 (scm_class_of, scm_entity_p, scm_operator_p,
13616 scm_set_object_procedure_x, scm_object_procedure,
13617 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13618 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13619 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13620 scm_hook_to_list), lang.c
13621 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13622 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13623 (scm_print_options, scm_port_with_print_state,
13624 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13625 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13626 scm_make_procedure_with_setter, scm_procedure), throw.c
13627 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13628 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13629 scm_stack_ref, scm_stack_length, scm_frame_p,
13630 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13631 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13632 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13633 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13634 (scm_dirname, scm_basename), dynwind.c
13635 (scm_wind_chain), read.c (scm_read_options, scm_read,
13636 scm_read_hash_extend), gc.c
13637 (scm_unhash_name), eval.c (scm_eval_options_interface,
13638 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13639 (scm_display_error, scm_set_print_params_x,
13640 scm_display_application, scm_display_backtrace, scm_backtrace),
13641 async.c (scm_async, scm_system_async, scm_async_mark,
13642 scm_system_async_mark, scm_run_asyncs, scm_noop,
13643 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13644 scm_mask_signals): Added docstrings.
13645
e228a203
KN
136462001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13647
13648 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13649 address of car/cdr. (Thanks to Dirk Herrmann)
13650 Use scm_sizet to obtain the length of strings.
13651 (Thanks to Matthias Koeppe)
13652
1552a59d
MV
136532001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13654
13655 * symbols.c (scm_mem2symbol): Put a empty statement after the
13656 next_symbol label. This is mandated by ANSI, appearantly.
13657
3178f751
MV
136582001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13659
13660 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13661 sense to compile for a specific kernel version. Do not include
13662 <asm/signal.h> while defining __KERNEL__. This hack should no
13663 longer be needed and caused problems.
13664
7af4defe
MV
136652001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13666
13667 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13668 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13669 can not deal with immediates.
13670
5d6bb349
KN
136712001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13672
13673 * list.c (scm_list_copy): Validate the first argument.
13674
ec9709f0
MV
136752001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13676
13677 Fix evaluator so that top-level expressions are correctly
13678 evaluated with respect to the module system.
1c938eb8 13679
ec9709f0
MV
13680 * modules.h. modules.c (scm_current_module_lookup_closure): New
13681 function.
13682
13683 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13684 prototypes.
13685 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13686 names to better reflect their meaning.
13687
13688 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13689 evaluated at top-level and synronize lookup closure before
13690 executing every subform.
13691 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13692 (scm_eval_x, scm_eval): Reimplement in terms of
13693 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 13694
ec9709f0
MV
136952001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13696
13697 * macros.c (scm_macro_name, scm_macro_transformer): Use
13698 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13699 Thanks!
13700
42417394
KN
137012001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13702
13703 * dump.c (scm_store_bytes): Store data size before data.
13704 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13705 * dump.h (scm_restore_bytes): Updated.
13706
bf942687
KN
137072001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13708
13709 * dump.c: Use double cells for update schedule.
13710
1be4270a
KN
137112001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13712
13713 * ports.c (scm_unread_char): Take an optional argument.
13714
548728ea
MV
137152001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13716
13717 * modules.h (scm_selected_module, scm_current_module): Renamed
13718 scm_selected_module to scm_current_module to synchronize Scheme
13719 and C names.
13720 (scm_select_module, scm_set_current_module): Likewise. Changed
13721 all uses.
1c938eb8 13722
548728ea
MV
13723 * ports.c (scm_port_for_each): Make a snapshot of the port table
13724 before iterating over it. The table might change while the user
13725 code is running. With the snapshot, the user can depend on the
c5408bc3 13726 fact that each port that existed at the start of the iteration is
548728ea
MV
13727 encountered exactly once. (ice-9 popen) depends on this.
13728
cb0d8be2
DH
137292001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13730
13731 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13732
13733 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13734 range checking for the size parameter. Thanks to Martin
13735 Grabmueller for the hint.
13736
13737 (scm_makstr): Reordered string initialization to make interrupt
13738 deferring unnecessary.
13739
13740 * vectors.c (scm_make_vector): Fixed range checking.
13741
e382fdbe
DH
137422001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13743
13744 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13745
13746 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13747 checking of the size parameter for type correctness and valid
13748 range. Thanks to Rob Browning for reporting the problem. Instead
13749 of deferring interrupts, scm_remember_upto_here_1 is used.
13750
bf8f0922
KN
137512001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13752
13753 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13754 (scm_dump_cell_update): Removed.
13755 (scm_dump_update): Renamed from scm_dump_object_update.
13756 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13757 a pointer instead of returning a value.
13758 * keywords.c (keyword_undump): Updated.
13759
914cceec
KN
137602001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13761
13762 * dump.c, dump.h: Modified a lot.
5f17c66f 13763 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
13764 (scm_dump_mark): Removed.
13765 (scm_restore_cell_object, scm_store_cell_object): New functions.
13766
13767 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13768 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13769 New slots: dump, undump.
13770 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13771 Updated.
13772
13773 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13774 (keyword_undump): Renamed from keyword_alloc.
13775 (scm_init_keywords): Set keyword_dump and keyword_undump.
13776
ecf470a2
ML
137772001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13778
13779 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13780 the deprecated SCM_DOUBLE_CELLP.
13781
13782 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13783
03416a99
KN
137842001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13785
13786 * dump.c, dump.h: New files.
13787 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13788 * init.c: #include "libguile/dump.h".
13789 (scm_init_guile_1): Call scm_init_dump.
13790 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13791 dump_dealloc, dump_store, undump_alloc, undump_restore,
13792 undump_init.
13793 * smob.c (scm_make_smob_type): Init the new slots.
13794 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13795 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13796
13797 * keywords.c: #include "libguile/dump.h".
13798 (keyword_dealloc, keyword_alloc): New functions.
13799 (scm_init_keywords): Set smob_dump and smob_undump.
13800
00ffa0e7
KN
138012001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13802
13803 * vectors.c (scm_c_make_vector): New function.
13804 * vectors.h (scm_c_make_vector): Declared.
13805 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13806 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13807 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13808 (scm_make_method_cache, scm_i_vector2list,
13809 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13810 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13811 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13812 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13813 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13814 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13815 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13816 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13817
13818 * hashtab.c (scm_c_make_hash_table): New function.
13819 * hashtab.h (scm_c_make_hash_table): Declared.
13820 * environments.c (scm_make_leaf_environment,
13821 scm_make_eval_environment), gc.c (scm_init_storage),
13822 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13823 Use scm_c_make_hash_table.
13824
b8446ce8
MD
138252001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13826
13827 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13828
e3239868
DH
138292001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13830
13831 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13832 end of docstring.
13833
13834 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13835 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13836 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13837 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13838 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13839 scm_source_property, scm_set_source_property_x), sort.c
13840 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13841 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13842 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13843 docstrings.
13844
41ee56dd
MD
138452001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13846
13847 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13848 really get that arg.
13849
b6311c08
KN
138502001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13851
13852 * goops.c (s_scm_get_keyword): Bug fix.
13853
a49af0c0
DH
138542001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13855
13856 The following patch was sent by Martin Grabmueller. It makes sure
13857 that in case of parameter errors the correct function name is
13858 shown, and that parameter types are only checked once.
13859
13860 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13861 string_capitalize_x): New functions. Each one performs the core
13862 functionality of the corresponding scm_* function.
13863
13864 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13865 scm_string_downcase_x, scm_string_downcase,
13866 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13867 parameter checking wrappers of the above functions.
13868
13070bd3
DH
138692001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13870
13871 * continuations.c, dynl.c, keywords.c, load.c: Include
13872 strings.h. Thanks to Bill Schottstaedt for the bug report.
13873
2f2b390c
DH
138742001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13875
13876 * backtrace.c (display_header): Make sure that line and column
13877 information is shown independent of whether the port the code was
13878 read from had an associated filename. Thanks to Martin
13879 Grabmueller for providing this patch.
13880
efa40607
DH
138812001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13882
13883 * fports.[ch] (scm_file_port_p): New primitive.
13884
a98bddfd
DH
138852001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13886
13887 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
13888 These are now defined in fports.c, strports.c and vports.c.
13889
13890 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
13891 vports.c (scm_tc16_sfport): Made variables (were macros defined in
13892 tags.h).
13893
13894 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
13895 (scm_make_sfptob): Made static. These return a type code now.
13896
13897 fports.c (scm_init_fports), strports.c (scm_init_strports),
13898 vports.c (scm_init_vports): Create the corresponding port types.
13899
13900 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
13901 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
13902
13903 * init.c (scm_init_guile_1): Make sure strports are initialized
13904 before gdbint.
13905
13906 * ports.[ch] (scm_make_port_type): Changed the return type to
13907 scm_bits_t.
13908
13909 * ports.c (scm_ports_prehistory): Don't create any port types
13910 here.
13911
13912 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
13913 against scm_tc16_fport directly.
13914
0419a528
DH
139152001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13916
13917 * srcprop.c (scm_set_source_property_x): Fix to handle
13918 (set-source-property! <obj> 'copy <datum>) correctly.
13919
6d36532c
GH
139202001-01-24 Gary Houston <ghouston@arglist.com>
13921
13922 * filesys.c (scm_link): docstring fix.
13923 * fports.h (scm_setfileno): obsolete declaration removed.
13924 * posix.c: bogus popen declaration removed.
13925
13926 * rdelim.c: new file, split from ioext.c.
13927 * rdelim.h: new file, split from ioext.h
13928 * Makefile.am: add rdelim.c and related files.
13929 * init.c: call scm_init_rdelim. include rdelim.h.
13930
3ba5a6c2
DH
139312001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13932
13933 This patch was sent by Martin Grabmueller and makes sure that
13934 parameter errors are reported correctly by the lexicographic
13935 ordering predicates.
13936
13937 * strorder.c (string_less_p, string_ci_less_p): New functions.
13938
13939 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
13940 functionality into string_less_p, string_ci_less_p respectively.
13941 The remaining code is just a wrapper to do the parameter
13942 checking.
13943
13944 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
13945 parameters and call string_less_p instead of scm_string_less_p.
13946
13947 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
13948 Check the parameters and call string_less_ci_p instead of
13949 scm_string_ci_less_p.
13950
e40a4095
DH
139512001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13952
ed6a2db9
DH
13953 This patch modifies scm_display_error to perform parameter
13954 checking. Thanks to Neil Jerram for the bug report.
13955
e40a4095
DH
13956 * backtrace.[ch] (scm_i_display_error): New function.
13957
13958 * backtrace.c (scm_display_error): Added parameter check and
13959 extracted the core functionality into function
13960 scm_i_display_error.
13961
13962 * throw.c (handler_message): Call scm_i_display_error to display
13963 the error message.
13964
f1e06a96
MD
139652001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13966
13967 * eval.c (SCM_APPLY): Added # args check for application of
13968 procedures with arity 3. (Thanks to Anders Holst.)
13969
30ea841d
DH
139702001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13971
13972 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
13973
13974 (SCM_OPDIRP): Deprecated.
13975
13976 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
13977 SCM_OPN.
13978
13979 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
13980 Instead, give an explicit error message in case the directory is
13981 closed.
13982
13983 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
13984 instead of SCM_OPENP and SCM_CLOSEDP.
13985
13986 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
13987
312ae976
DH
139882001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13989
13990 * eval.c (inner_eval, scm_eval): Move all real functionality into
13991 inner_eval. Avoid to copy the expression twice by inlining some
13992 code from scm_i_eval.
13993
4567ed78
DH
139942001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
13995
13996 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
13997 now has to be the last clause, as required by R5RS. Thanks to
13998 Martin Grabmueller for the patch.
13999
10288a09
GH
140002001-01-18 Gary Houston <ghouston@arglist.com>
14001
14002 * ioext.c: further simplify scm_read_string_x_partial by defining
14003 a macro SCM_EBLOCK.
14004
8f379a8f
DH
140052001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14006
14007 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14008
5c75b29f
DH
140092001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14010
14011 * __scm.h: Added comment about architecture and compiler
14012 properties that are required by guile.
14013
14014 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14015 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14016
14017 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14018
14019 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14020
14021 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14022 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14023
ac0c002c
DH
140242001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14025
14026 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14027 to the names in limits.h.
14028
14029 * numbers.c (abs_most_negative_fixnum): Added.
14030
14031 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14032 fixnum-min) special case.
14033
14034 (scm_big_and): Fix for negative first parameter.
14035
14036 (scm_bit_extract): Fix for fixnum paramters.
14037 Thanks to Rob Browning for the bug report.
14038
14039 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14040
debe0dc2
DH
140412001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14042
14043 * symbols.c (scm_symbol_bound_p): Fixed comment.
14044 Thanks to Chris Cramer.
14045
8a39e3fc
DH
140462001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14047
14048 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14049 Thanks to Bill Schottstaedt.
14050
322ec19d
ML
140512001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14052
9a5fa6e9 14053 from Matthias Köppe:
1c938eb8 14054
322ec19d
ML
14055 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14056 casts its result, so doesn't yield an lvalue per ANSI C.
14057
14058 * goops.c (s_scm_sys_set_object_setter_x): use
14059 SCM_SET_ENTITY_SETTER.
14060 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14061
14062 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14063 its result, so doesn't yield an lvalue per ANSI C.
14064 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14065 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14066 SCM_GC_SET_CARD_FLAGS.
14067 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14068
14069 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14070
60d02d09
GH
140712001-01-08 Gary Houston <ghouston@arglist.com>
14072
14073 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14074 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14075 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14076 changes.
14077 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14078 for fdes. if current input port is used, check that it's a file
14079 port.
14080
c2da2648
GH
140812001-01-06 Gary Houston <ghouston@arglist.com>
14082
14083 * ioext.c (scm_read_string_x_partial): new procedure, implements
14084 read-string!/partial.
14085 * ports.c (scm_take_from_input_buffers): new procedure used by
14086 scm_read_string_x_partial.
14087 (scm_drain_input): use scm_take_from_input_buffers.
14088
4651d663
MV
140892001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14090
14091 * validate.h (SCM_VALIDATE_NUMBER): New.
14092
c0a5d888
ML
140932001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14094
14095 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14096 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14097 SET_DESTROYED): new defines/macros.
14098 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14099 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14100 (guardian_print): print more info.
14101 (guardian_apply): check if the guardian is destroyed, and throw an
14102 error if so. take one more optional argument `throw_p'.
14103 (scm_guard): depending on the value of `throw_p', return a boolean
14104 result.
14105 (scm_get_one_zombie): remove redundant property test.
14106 (guardian_t): represent the various (currently 3, I hope nothing
14107 more gets added) boolean fields as bit flags.
14108 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14109 (scm_destroy_guardian_x): new procedure.
14110
14111 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14112 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14113
0c6d2191
GH
141142001-01-01 Gary Houston <ghouston@arglist.com>
14115
14116 * fports.c (fport_write): bugfix: handle short writes for
14117 unbuffered ports too. optimize the buffered case by minimizing
14118 the number of write/flush calls.
14119 (write_all): new helper procedure.
14120
a51fe247 14121The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14122
14123;; Local Variables:
14124;; coding: utf-8
14125;; End: