*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
2e77f720
LC
12007-10-20 Julian Graham <joolean@gmail.com>
2
3 Add support for thread cancellation and user-defined thread
4 cleanup handlers. Small rework by Ludovic Courtès.
5
6 * null-threads.h (scm_i_pthread_cancel,
7 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
8 * pthread-threads.h (scm_i_pthread_cancel,
9 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
10 * scmsigs.c (scm_i_signal_delivery_thread,
11 signal_delivery_thread_mutex): New.
12 (signal_delivery_thread): Leave when `read_without_guile ()'
13 returns zero.
14 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
15 before spawning the thread. Initialize
16 SCM_I_SIGNAL_DELIVERY_THREAD.
17 (ensure_signal_delivery_thread): Renamed to...
18 (scm_i_ensure_signal_delivery_thread): this.
19 (scm_i_close_signal_pipe): New.
20 * scmsigs.h: Updated.
21 * threads.c (thread_mark): Mark `t->cleanup_handler'.
22 (guilify_self_1): Initialize `t->cleanup_handler' and
23 `t->canceled'.
24 (do_thread_exit): Invoke `t->cleanup_handler'.
25 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
26 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
27 vanishes.
28 (scm_leave_guile_cleanup): New.
29 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
30 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
31 than call `scm_leave_guile ()' after FUNC.
32 (scm_cancel_thread, scm_set_thread_cleanup_x,
33 scm_threads_cleanup): New.
34 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
35 returned list.
36 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
37 fields.
38 Add declarations of new functions.
39
d41668fa
LC
402007-10-17 Ludovic Courtès <ludo@gnu.org>
41
42 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
43 regression compared to 1.8.2. Reported by Puneet
44 <schemer@gmail.com>.
45
66302618
LC
462007-10-10 Ludovic Courtès <ludo@gnu.org>
47
48 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
49 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
50 * gen-scmconfig.h.in
51 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
52 * gen-scmconfig.c (main): Define
53 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
54
1445e449
LC
552007-10-04 Ludovic Courtès <ludo@gnu.org>
56
57 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
58 `leave_locale_section ()' on failure of
59 `enter_locale_section ()' since the mutex is not held and locale
60 settings are unchanged.
61 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
62 `restore_locale_settings ()' instead of `leave_locale_section ()'
63 since the mutex is not held.
64
29776e85
LC
652007-10-02 Ludovic Courtès <ludo@gnu.org>
66
67 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
68 since we're already in non-guile mode. Reported by Greg Toxel
69 for NetBSD.
70
61d3568b
LC
712007-10-01 Ludovic Courtès <ludo@gnu.org>
72
73 * ports.c (flush_output_port): Expect directly a port instead of
74 a pair. Fixes a bug in the new port table (2007-08-26).
75
68eccd8b
KR
762007-09-11 Kevin Ryde <user42@zip.com.au>
77
78 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
79 putenv("NAME") as the fallback everywhere else. In particular this is
80 needed for solaris 9. Reported by Frank Storbeck.
81
454866e0
LC
822007-09-03 Ludovic Courtès <ludo@gnu.org>
83
84 * read.c (flush_ws): Handle SCSH block comments.
85
f43f3620
LC
862007-09-03 Ludovic Courtès <ludo@gnu.org>
87
88 Fix alignment issues which showed up at least on SPARC.
89
90 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
91 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
92 alignment.
93 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
94 correct alignment.
95 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
96 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
97 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
98 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
99 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
100
8d4d5dfc
KR
1012007-09-03 Kevin Ryde <user42@zip.com.au>
102
103 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
104 before using clog(). It's possible for gcc to provide the "complex
105 double" type, but for the system not to have the complex funcs.
106 (scm_exp): Ditto HAVE_CEXP for cexp().
107 (clog, cexp, carg): Remove fallback definitions. These only
108 duplicated the code within scm_log and scm_exp, and the latter have to
109 exist for the case when there's no "complex double". So better just
110 fix up the conditionals selecting between the complex funcs and plain
111 doubles than worry about fallbacks.
112
1ac5fb45
LC
1132007-09-02 Ludovic Courtès <ludo@gnu.org>
114
115 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
116 This fixes a memory leak.
117
b87e6d04
HWN
1182007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
119
5dbc6c06
HWN
120 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
121 gc.c: replace port table with weak hash table. This simplifies
122 memory management, and fixes freed cells appearing in
123 port-for-each output.
124
b87e6d04
HWN
125 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
126 held.
127
2baec6a9
LC
1282007-08-23 Ludovic Courtès <ludo@gnu.org>
129
492faee1 130 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 131 expression when asked to. Reported by Kevin.
492faee1 132
2baec6a9
LC
133 * stime.c: Define `_REENTRANT' only if not already defined.
134
1f11c61a
KR
1352007-08-21 Kevin Ryde <user42@zip.com.au>
136
137 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
138 tc16 values so big, real, complex and fraction can be distinguished.
139
140 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
141 was making numbers come out as "type 23" in gc-live-object-stats.
142 Fix tests of the tc16 number types, they were checked under
143 scm_tc7_number, but the values went down the tag>=255 smob case.
144 Put smob case under scm_tc7_smob instead of using tag>=255, per
145 recommendation in comments with scm_tc7_smob to use symbolic values.
146 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
147 code. Lose some unnecessary "break" statements.
148
149 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
150 element returned, rather than two lookups scm_hashq_ref and
151 scm_hashq_set_x.
152
949ec9f9
KR
1532007-08-17 Kevin Ryde <user42@zip.com.au>
154
155 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
156 solaris 2.6. Reported by anirkko.
157
6caac03c
LC
1582007-07-29 Ludovic Courtès <ludo@gnu.org>
159
160 * Makefile.am (INCLUDES): Added Gnulib includes.
161 (gnulib_library): New.
162 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
163 `$(gnulib_library)'.
164 (libguile_la_LIBADD): Likewise.
165
166 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
167 to define it when available.
168 * srfi-14.c: Likewise.
f7439099
LC
169 * i18n.c: Likewise. Include Gnulib's <alloca.h>
170 * eval.c: Include Gnulib's <alloca.h>.
171 * filesys.c: Likewise.
172 * read.c: Don't include <strings.h> and don't provide an
173 `strncasecmp ()' replacement; use Gnulib's <string.h> and
174 `strncasecmp ()' instead.
6caac03c 175
e08f3f7a
LC
1762007-07-25 Ludovic Courtès <ludo@gnu.org>
177
178 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
179 immediately. This used to produce a circular memoized
180 expression, e.g., for `(set (quote x) #t)'.
181
7337d56d
LC
1822007-07-22 Ludovic Courtès <ludo@gnu.org>
183
184 Overhauled the reader, making it faster.
185
186 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
187 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
188 of `scm_lreadr ()'.
189
190 * read.c: Overhauled. No longer use a token buffer. Use a
191 on-stack C buffer in the common case and use Scheme strings when
192 larger buffers are needed.
193 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
194 scm_lreadr, scm_lreadrecparen): Removed.
195 (scm_i_input_error): Marked as `SCM_NORETURN'.
196
df449722
LC
1972007-07-15 Ludovic Courtès <ludo@gnu.org>
198
199 * script.c (scm_compile_shell_switches): Updated copyright year.
200
b1f57ea4
LC
2012007-07-11 Ludovic Courtès <ludo@gnu.org>
202
203 * goops.c (scm_sys_method_more_specific_p): Added docstring.
204 Make sure LEN is greater than or equal to the minimum length of
205 specializers of M1 and M2. This fixes a segfault later on in
206 `more_specificp ()' if TARGS is too small. Reported by Marco
207 Maggi <marco.maggi-ipsu@poste.it>.
208
d3075c52
LC
2092007-06-26 Ludovic Courtès <ludo@gnu.org>
210
211 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
212 sure to free the previous array after the new one has been
213 installed. This leak is made visible by running
214 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
215 from the REPL within Valgrind.
216
7a5fb796
LC
2172007-06-12 Ludovic Courtès <ludo@chbouib.org>
218
219 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
220 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
221 bus error on SPARC (and possibly others) due to unaligned access.
222
a1ef7406
LC
2232007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
224
225 * posix.c (scm_ttyname): Check whether RESULT is NULL before
226 making a string from it (reported by Dan McMahill). Don't call
227 `scm_from_locale_string ()' before the mutex is released.
228
3dcf3373
LC
2292007-05-26 Ludovic Courtès <ludo@chbouib.org>
230
231 * eval.c (scm_m_define): Updated comment. Changed order for value
232 evaluation and `scm_sym2var ()' call, which is perfectly valid per
233 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
234
608860a5
LC
2352007-05-05 Ludovic Courtès <ludo@chbouib.org>
236
237 Implemented lazy duplicate binding handling.
238
239 * modules.c (scm_export): Renamed to...
240 (scm_module_export): This. Now public.
241 (module_variable): Removed.
242 (default_duplicate_binding_procedures_var): New variable.
243 (default_duplicate_binding_handlers, resolve_duplicate_binding,
244 module_imported_variable, scm_module_local_variable,
245 scm_module_variable): New functions.
246 (scm_module_import_interface): Rewritten.
247 (scm_module_reverse_lookup): Exported as a Scheme function.
248 * modules.h (scm_module_index_duplicate_handlers,
249 scm_module_index_import_obarray): New macros.
250 (scm_module_variable, scm_module_local_variable,
251 scm_module_export): New declarations.
252
1911e3da
LC
2532007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
254
255 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
256 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
257
1d8ce4c0
HWN
2582007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
259
260 * numbers.c (carg): provide carg, cexp, clog in case they are
261 missing.
262
afb49959
LC
2632007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
264
265 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
266 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
267 Steven Wu.
268
b3aa4626
KR
2692007-03-08 Kevin Ryde <user42@zip.com.au>
270
271 * struct.c, struct.h (scm_make_vtable): New function, providing
272 `make-vtable'.
273 * stacks.c (scm_init_stacks): Use it.
274
2752007-03-06 Kevin Ryde <user42@zip.com.au>
276
277 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
278 allocating a tail array. If there's no such then those tail fields
279 are uninitialized and garbage SCMs there can cause a segv if printed
280 (after fetching with struct-ref).
281
2822007-02-22 Kevin Ryde <user42@zip.com.au>
283
284 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
285 (scm_usleep): Update docstring per manual, cross reference sleep.
286
287 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
288 scm_struct_init is not within that section. scm_struct_init can
289 thrown an error, which within a critical section results in an
290 abort().
291
03291373
NJ
2922007-02-19 Neil Jerram <neil@ossau.uklinux.net>
293
294 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
295 is included in the distribution.
652dbce6 296 (noinst_HEADERS): And the same for eval.i.c.
03291373 297
a2f00b9b
LC
2982007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
299
300 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
301 unconditionally. Include <langinfo.h> and <nl_types.h> when
302 available.
303 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
304 SCM_LIST_OR_INTEGER_P): New macros.
305 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
306 as powers of two instead of `(1 << LC_*)'.
307 (scm_i_locale_free): New function/macro.
308 (scm_global_locale): New global variable.
309 (smob_locale_free): Use `scm_i_locale_free ()'.
310 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
311 (get_current_locale_settings): Return `EINVAL' instead of `errno'
312 when `setlocale' fails.
313 (restore_locale_settings): Likewise.
314 (install_locale_categories): Likewise.
315 (install_locale): Likewise. Stop the locale stack traversal when
316 all categories have been handled.
317 (get_current_locale, category_to_category_mask,
318 category_list_to_category_mask): New function.
319 (scm_make_locale): Use them. Accept both lists of `LC_*' values
320 and single `LC_*' values as the first argument. Handle the case
321 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
322 duplicate C_BASE_LOCALE before using it.
323 (scm_nl_langinfo, define_langinfo_items): New functions.
324 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
325 `nl-langinfo' and invoke `define_langinfo_items ()'.
326 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
327 * posix.c: Include <xlocale.h> when available.
328 (scm_i_locale_mutex): Always define it. Statically initialized.
329 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
330 acquiring the locale mutex.
331 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
332
b3aa4626
KR
3332007-01-27 Kevin Ryde <user42@zip.com.au>
334
335 * ports.c (scm_port_line, scm_set_port_line_x), read.c
336 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
337 port line number type, should be "long" not "int", as per line_number
338 field of scm_t_port. (Makes a difference only on 64-bit systems, and
339 only then for a linenum above 2Gig.)
340
2a8d66b0
HWN
3412007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
342
343 * vector.c: remove comment as per kryde's request.
344
b3aa4626
KR
3452007-01-25 Kevin Ryde <user42@zip.com.au>
346
347 * sort.c (scm_stable_sort): Return empty list for input empty list, as
348 done in guile 1.6 and as always done by plain `sort'. Was falling
349 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
350
cb90e2cb
HWN
3512007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
352
8cb7939c
HWN
353 * vectors.c (s_scm_vector_move_right_x): complain about naming.
354
d00a0704
HWN
355 * srcprop.c: regularize comments.
356
3d178652
HWN
357 * eval.c: remove superfluous ifndef DEVAL.
358
243ebb61
HWN
359 * private-options.h: idem.
360
361 * eval.i.c: copyright nitpicking.
362
0ee05b85
HWN
363 * eval.c: distangle. move duplicate code to eval.i.c and include
364 twice.
365
366 * eval.i.c: new file.
367
22fc179a
HWN
368 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
369 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
370 read.h, stacks.c, symbols.c, throw.c: use private-options.h
371
372 * private-options.h: new file: contain hardcoded option
373 definitions.
374
cb90e2cb
HWN
375 * private-gc.h: add FSF header.
376
62560650
HWN
3772007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
378
72f19c26
HWN
379 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
380 memoize-symbol is set.
381
382 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
383
384 * eval.c (CEVAL): add memoize_symbol trap.
385
03347a97
HWN
386 * options.c (scm_options_try): new function. This allows error
387 reporting before changing options in a critical section.
388
b0763985
HWN
389 * srcprop.c: use double cell for storing source-properties. Put
390 filename in the plist, and share between srcprops if possible.
391 Remove specialized storage.
392
393 * srcprop.h: remove macros without SCM_ prefix from
394 interface. Remove specialized storage/type definitions.
395
62560650
HWN
396 * read.c: idem.
397
398 * print.c: idem.
399
400 * eval.c: terminate option lists with 0.
401
402 * options.c: remove n (for length) from scm_option_X
403 functions. Detect option list length by looking for NULL name.
404
42ddb3cb
LC
4052007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
406
407 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
408 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
409 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
410 added by `make-vtable-vtable'. Reported by Marco Maggi.
411
937038e8
HWN
4122007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
413
414 * throw.c (scm_ithrow): more refined error message: print symbols
415 too.
416
23d72566
KR
4172007-01-16 Kevin Ryde <user42@zip.com.au>
418
419 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
420 implementing `set-program-arguments'.
421
422 * filesys.c (scm_init_filesys): Use scm_from_int rather than
423 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
424 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
425 O_LARGEFILE. These are all int not long, per arg to open().
426 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
427 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
428 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
429 an int arg to fcntl.
430
431 * posix.c (scm_putenv): Correction to "len" variable, was defined only
432 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
433 Move it to where it's used. Reported by Hugh Sasse.
434
435 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
436 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
437 meant #\nul in the input (detected by scm_to_locale_string) and a bad
438 flags arg (detected by scm_to_int) would throw from a critical
439 section, causing an abort().
440
441 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
442 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
443 REG_NOTEOL; they're all ints not longs (per args to regcomp and
444 regexec).
445
a2c40dc7
HWN
4462007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
447
448 * throw.c (scm_ithrow): print out key symbol and string arguments
449 when error happens inside a critical section, and document why.
450
391f57e6
HWN
4512007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
452
453 * read.c (s_scm_read_hash_extend): document #f argument to
454 read-hash-extend.
455
23d72566
KR
4562007-01-04 Kevin Ryde <user42@zip.com.au>
457
458 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
459 scm_minor_version, scm_micro_version, scm_effective_version,
460 scm_version, scm_init_version): Use SCM_API instead of just extern,
461 for the benefit of mingw. Reported by Cesar Strauss.
462
93632e3c
HWN
4632007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
464
465 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
466 too.
467 (gc_update_stats): update scm_gc_cells_allocated_acc too.
468
23d72566
KR
4692006-12-27 Kevin Ryde <user42@zip.com.au>
470
471 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
472 the basic scm_get_stack_base. As advised by Nils Durner.
473
474 * threads.c (get_thread_stack_base): Add a version using
475 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
476 As advised by Heikki Lindholm.
477
478 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
479 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
480 Durner.
481
4822006-12-24 Kevin Ryde <user42@zip.com.au>
483
484 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
485 error if pid is not our own process, instead of silently doing nothing.
486
487 * print.c (scm_write, scm_display, scm_write_char): Disable port close
488 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
489 check in configure.in unintentionally enabled it. Believe that
490 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
491 can leave errno in that state. popen.test "no duplicates" output test
492 provoked that.
493
e2bf3b19
HWN
4942006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
495
496 * numbers.c (scm_i_fraction_reduce): move logic into
497 scm_i_make_ratio(), so fractions are only read.
498 scm_i_fraction_reduce() modifies a fraction when reading it. A
499 race condition might lead to fractions being corrupted by reading
500 them concurrently.
501
502 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
503 comparisons between reduced and unreduced fractions go wrong.
504
505 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
506 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
507 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
508 SCM_FRACTION_REDUCED.
509
23d72566
KR
5102006-12-16 Kevin Ryde <user42@zip.com.au>
511
512 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
513 more direct for a procedure called raise.
514 (kill): Remove mingw fake fallback.
515
5162006-12-15 Kevin Ryde <user42@zip.com.au>
517
518 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
519 _pipe on mingw.
520
5212006-12-14 Kevin Ryde <user42@zip.com.au>
522
523 * threads.c (thread_print): Cope with the case where pthread_t is a
524 struct, as found on mingw. Can't just cast to size_t for printing.
525 Reported by Nils Durner.
526
527 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
528 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
529
5302006-12-13 Kevin Ryde <user42@zip.com.au>
531
532 * eval.c (scm_m_define): Set 'name procedure property on any
533 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
534 procedures with setters as used in srfi-17.
535
536 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
537 linux man page says is a possibility.
538
f30e1bdf
LC
5392006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
540
541 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 542 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
543 negative lower bounds.
544 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 545 Szavai Gyula).
f30e1bdf
LC
546
547 (scm_array_in_bounds_p): Iterate over S instead of always
548 comparing indices with the bounds of S[0]. This fixes
549 `array-in-bounds?' for arrays with a rank greater than one and
550 with different lower bounds for each dimension.
551
23d72566
KR
5522006-12-05 Kevin Ryde <user42@zip.com.au>
553
554 * numbers.c (scm_product): For flonum*inum and complex*inum, return
555 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
556 and as per R5RS section "Exactness".
557
5582006-12-03 Kevin Ryde <user42@zip.com.au>
559
560 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
561 allow $AWK from the environment to override. It had syntax gremlins,
562 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
563 Makefile stopped it having any effect. Use just $(AWK), which can be
564 overridden with "make AWK=xxx" in the usual way if desired.
565
22be72d3
LC
5662006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
567
568 * libguile/vectors.c (scm_vector_to_list): Fixed list
569 construction: elements were not copied when INC is zero (see
570 "shared array" example in `vectors.test'). Reported by
571 Szavai Gyula.
572
b89c4943
LC
5732006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
574
575 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
576 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
577 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
578 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
579 (DOT_X_FILES): Added `gettext.x'.
580 (DOT_DOC_FILES): Likewise.
581 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
582 (modinclude_HEADERS): Added `gettext.h'.
583 (EXTRA_DIST): Added `libgettext.h'.
584
585 * gettext.h: Renamed to...
586 * libgettext.h: New file.
587
588 * i18n.c: Renamed to...
589 * gettext.c: New file.
590
591 * i18n.h: Renamed to...
592 * gettext.h: New file.
593
594 * i18n.c, i18n.h, locale-categories.h: New files.
595
596 * init.c: Include "libguile/gettext.h" instead of
597 "libguile/i18n.h".
598 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
599 `scm_init_i18n ()'.
600
601 * posix.c: Include "libguile/gettext.h" instead of
602 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
603 (USE_GNU_LOCALE_API): New macro.
604 (scm_i_locale_mutex): New variable.
605 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
606
607 * posix.h: Include "libguile/threads.h".
608 (scm_i_locale_mutex): New declaration.
609
f3e3f530
NJ
6102006-11-17 Neil Jerram <neil@ossau.uklinux.net>
611
612 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
613
d9f71a07
LC
6142006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
615
616 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
617 "sweep_stats" arguments; use them instead of accessing the global
618 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
619
620 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
621 before each iteration of the loop.
622 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
623 (scm_i_get_new_heap_segment): Take an additional argument
624 SWEEP_STATS. Compute MIN_CELLS as a function of it.
625
626 * libguile/gc.c (scm_gc_cells_collected,
627 scm_gc_cells_collected_1): Removed.
628 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
629 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
630 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
631 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
632 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
633 `scm_gc_cells_(collected|swept)'.
634 (gc_update_stats): New.
635 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
636 `scm_i_gc_sweep_stats_1' instead of the former globals.
637 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
638 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
639 would keep allocating new segments instead of re-using collected
640 cells (because `scm_gc_cells_collected' would remain zero).
641
642 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
643 scm_gc_cell_yield_percentage): Removed.
644
645 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
646 (scm_i_adjust_min_yield): Updated.
647 (scm_i_get_new_heap_segment): Updated.
648
dd18d312
NJ
6492006-11-02 Neil Jerram <neil@ossau.uklinux.net>
650
651 * modules.c: Correct comment saying that low-level environments
652 will be used "in the next release".
653
654 * init.c: Comment out #include of environments.h.
655 (scm_i_init_guile): Comment out scm_environments_prehistory() and
656 scm_init_environments() calls.
657
658 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
659 (DOT_X_FILES): Remove environments.x.
660 (DOT_DOC_FILES): Remove environments.doc.
661 (modinclude_HEADERS): Remove environments.h.
662
9a5fa6e9
NJ
6632006-10-25 Neil Jerram <neil@ossau.uklinux.net>
664
665 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
666
667 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
668 scm_ia64_register_backing_store_base() instead of Linux-specific
669 implementations.
670
671 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
672 New declarations.
673
674 * gc.c (__libc_ia64_register_backing_store_base): Declaration
675 removed.
676 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
677 implementations for Linux and HP-UX.
678
679 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
680 and scm_ia64_register_backing_store_base() instead of
681 Linux-specific implementations.
682
683 * continuations.h (__libc_ia64_register_backing_store_base):
684 Declaration removed.
685 (scm_t_contregs): New "fresh" field.
686
687 * continuations.c (ia64_getcontext): Removed.
688 (scm_make_continuation): Use continuation fresh field instead of
689 interpreting getcontext return values (which isn't portable). Use
690 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
691 instead of Linux-specific implementations.
692 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
693 instead of Linux-specific implementation.
694
695 * _scm.h (__ia64__): Also detect __ia64.
696
8ab3d8a0
KR
6972006-10-03 Kevin Ryde <user42@zip.com.au>
698
699 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
700 arguments or 3 or more arguments. Previously 0 called proc with
701 SCM_UNDEFINED, and 3 or more silently used just the first 2.
702
7032006-09-28 Kevin Ryde <user42@zip.com.au>
704
705 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
706 for chsize fallback, instead of hard-coding mingw. Mingw in fact
707 supplies ftruncate itself these days.
708
709 * ports.c (fcntl.h): Can include this unconditionally, no need for
710 __MINGW32__.
711
712 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
713 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
714 "off_t" for parameters, per usual definition of this function, rather
715 than "char *" and "int". Use ftruncate instead of chsize. Check for
716 error on final close.
717
7182006-09-27 Kevin Ryde <user42@zip.com.au>
719
720 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
721 in mingw.
722
723 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
724 const *" for mingw to suppress warnings from gcc (which are errors
725 under the configure default -Werror). Reported by Nils Durner.
726
7272006-09-26 Kevin Ryde <user42@zip.com.au>
728
729 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
730 * fports.c (scm_open_file): Use open_or_open64.
731 (fport_seek_or_seek64): New function, adapting fport_seek.
732 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
733 functions.
734 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
735 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
736
737 * ports.c (scm_truncate_file): Update docstring per manual.
738
7392006-09-23 Kevin Ryde <user42@zip.com.au>
740
741 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
742 functions.
743
9a5fa6e9 7442006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
745
746 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
747 (make_predset, define_predset, make_strset, define_strset, false,
748 true): Removed.
749 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
750 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
751 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
752 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
753 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
754 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
755 (define_charset, scm_srfi_14_compute_char_sets): New functions.
756 (scm_init_srfi_14): Use `define_charset ()' instead of
757 `define_predset ()' and `define_strset ()'.
758
759 * srfi-14.h (scm_c_init_srfi_14): Removed.
760 (scm_srfi_14_compute_char_sets): New declaration.
761
762 * posix.h: Include "srfi-14.h".
763 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
764 successful `setlocale ()' call.
765
8ab3d8a0
KR
7662006-09-08 Kevin Ryde <user42@zip.com.au>
767
768 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
769 (scm_recvfrom): Update docstring from manual.
770
418122ce
RB
7712006-08-31 Rob Browning <rlb@defaultvalue.org>
772
773 * ports.c (scm_c_port_for_each): Add a
774 scm_remember_upto_here_1(ports) at the end of the function to fix
775 a GC bug.
776
b5944f66
NJ
7772006-08-28 Neil Jerram <neil@ossau.uklinux.net>
778
779 * backtrace.c (scm_display_backtrace_with_highlights): Minor
780 improvements to docstring.
781 (scm_backtrace_with_highlights): Analogous improvements.
782
8ab3d8a0
KR
7832006-08-12 Kevin Ryde <user42@zip.com.au>
784
785 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
786 New, set from configure.
787 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
788 to scmconfig.h.
789 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
790 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
791 Reported by Claes Wallin.
792
b0b0deff
NJ
7932006-08-11 Neil Jerram <neil@ossau.uklinux.net>
794
795 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
796 frame, not a stack).
797
8ab3d8a0
KR
7982006-07-25 Kevin Ryde <user42@zip.com.au>
799
800 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
801 on pthreads version, since pthread_getattr_np not available on solaris
802 and macos. Reported by Claes Wallin.
803
8042006-07-24 Kevin Ryde <user42@zip.com.au>
805
806 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
807 it's a macro on MacOS X. Reported by Claes Wallin.
808
809 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
810 for the benefit of Solaris 10. Reported by Claes Wallin.
811
812 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
813 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
814
8152006-07-21 Kevin Ryde <user42@zip.com.au>
816
817 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
818 autoconf recommendation. Should fix Solaris 10 reported by Claes
819 Wallin.
820
821 * threads.c: Include <string.h>, needed for memset() which is used by
822 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
823
b4912378
RB
8242006-07-18 Rob Browning <rlb@defaultvalue.org>
825
826 * continuations.c: Add __attribute__ ((returns_twice)) to the
827 ia64_getcontext prototype so that gcc will make the right
828 arrangements and avoid an illegal instruction during
829 call-with-current-continuation.
830
9a5fa6e9 8312006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
832
833 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
834 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
835
8ab3d8a0
KR
8362006-07-08 Kevin Ryde <user42@zip.com.au>
837
838 * environments.c (core_environments_unobserve): Use if/else rather
839 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
840 about them not being rvalues. Reported by Mike Gran.
841
842 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
843 portable and in particular fails on OpenBSD and AIX (see autoconf
844 manual too). Reported by Mike Gran.
845
8462006-06-25 Kevin Ryde <user42@zip.com.au>
847
848 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
849 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
850 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
851 HAVE_TM_ZONE.
852 (scm_strptime): Use tm_gmtoff from the strptime result when that field
853 exists, it's set by glibc strptime "%s".
854
9a5fa6e9 8552006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
856
857 * eq.c: Include "struct.h", "goops.h" and "objects.h".
858 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
859 are not GOOPS instances.
860 * struct.c: Include "eq.h".
861 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
862 hand-written code.
863 (scm_i_struct_equalp): New.
864 * struct.h (scm_i_struct_equalp): New declaration.
865
c862d0e0
KR
8662006-06-06 Kevin Ryde <user42@zip.com.au>
867
868 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
869 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
870 reported by Mattias Holm.
b4912378 871
c862d0e0
KR
8722006-06-03 Kevin Ryde <user42@zip.com.au>
873
874 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
875 unused variable warning when elisp disabled. Reported by Ryan
876 VanderBijl.
877
878 * throw.c (scm_handle_by_message): Add dummy return value to avoid
879 compiler warning on cygwin. Reported by Ryan VanderBijl.
880
881 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
882 duplicate of EXTRA_DOT_DOC_FILES.
883 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
884 Add scmconfig.h to dependencies, since these all run cpp. Helps a
885 parallel "make -j2". Reported by Mattias Holm.
886
8872006-05-30 Kevin Ryde <user42@zip.com.au>
888
889 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
890 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
891 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
892 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
893 port type descriptor, same as scm_make_port_type return value.
894
af4f8612
MV
8952006-05-30 Marius Vollmer <mvo@zagadka.de>
896
897 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
898 of the arguments is a array. This allows vectors to be equal to
899 one-dimensional arrays.
900
18bffcd0
MV
9012006-05-29 Marius Vollmer <mvo@zagadka.de>
902
903 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
904 that we have a pair before accessing its cdr. Thanks to Bill
905 Schottstaedt!
906
c862d0e0
KR
9072006-05-28 Kevin Ryde <user42@zip.com.au>
908
909 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
910 by "The Senator".
911
9122006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
913
914 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
915 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
916
c862d0e0
KR
9172006-05-26 Kevin Ryde <user42@zip.com.au>
918
919 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
920 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
921 Reported by "The Senator".
922 For select and ioctl, move fdes into those conditionals, to avoid
923 unused variable warning when neither of those used.
924
9252006-05-23 Kevin Ryde <user42@zip.com.au>
926
927 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
928 It's unused and will be in stdio.h anyway (if it's anywhere).
929
9302006-05-20 Kevin Ryde <user42@zip.com.au>
931
932 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
933 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
934
935 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
936 symlink). Probably can't create symlinks with mknod anyway though.
937
938 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
939 generation.
940
9412006-05-15 Kevin Ryde <user42@zip.com.au>
942
943 * simpos.c, simpos.h (scm_primitive__exit): New function.
944 (scm_primitive_exit): Update docstring, no longer the best exit after
945 a fork.
946
9472006-05-09 Kevin Ryde <user42@zip.com.au>
948
949 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
950 rather than converting to doubles, to avoid inf or nan when the inputs
951 are too big for a double but the quotient does fit. This affects
952 conversions exact->inexact of big fractions.
953
954 * filesys.c (scm_open_fdes): Use open64.
955 (scm_init_filesys): Add O_LARGEFILE.
956
957 * ports.c (scm_seek): Use lseek64.
958 (scm_truncate_file): Use ftruncate64.
959
4a342b19
MV
9602006-05-08 Marius Vollmer <mvo@zagadka.de>
961
962 * private-gc.h (CELL_P): Also check that the potential pointer is
963 correctly aligned for a cell. Thanks to Miroslav Lichvar!
964
c862d0e0
KR
9652006-04-18 Rob Browning <rlb@defaultvalue.org>
966
967 * _scm.h: Add back error if the size of off_t is unknown. The bug
968 was actually in guile-readline's configuration.
969
9702006-04-18 Kevin Ryde <user42@zip.com.au>
971
972 * posix.c (scm_mkstemp): Update docstring from the manual, in
973 particular file mode 0600 is not guaranteed.
974
281ab5e2
KR
9752006-04-17 Kevin Ryde <user42@zip.com.au>
976
977 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
978 size, to help the guile-readline build where off_t is unused.
979
2b829bbb
KR
9802006-04-16 Kevin Ryde <user42@zip.com.au>
981
982 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
983 (scm_readdir): Use readdir64.
984 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
985 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
986 and ftruncate take off_t not size_t.
987 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
988 available.
989
9902006-04-06 Kevin Ryde <user42@zip.com.au>
991
992 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 993 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
994
9952006-03-26 Marius Vollmer <mvo@zagadka.de>
996
997 * threads.c (get_thread_stack_base): Use scm_get_stack_base
998 instead of accessing __libc_stack_end directly, and only do this
999 when pthread_attr_getstack is known not to work for the main
1000 thread or when not using pthreads at all.
1001
1002 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1003 unknown instead of returning NULL.
1004
9a5fa6e9 10052006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1006
1007 * numbers.c (scm_i_mem2number): Renamed to
1008 scm_c_locale_stringn_to_number.
1009 * numbers.c, print.c, read.c: Updated callers.
1010 * numbers.h: Update function declaration.
1011
10122006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1013
1014 * unif.c (string_set): Don't return in a void function. (Reported
1015 by Mike Gran.)
1016
1017 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1018 rather than void*, so we can do pointer arithmetic on it.
1019 (Reported by Mike Gran.)
1020 (s_scm_uniform_vector_write): Ditto.
1021
10222006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1023
1024 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1025 oldra is not an array. (Reported by Steve Juranich.)
1026
1027 * threads.c (do_unlock): Renamed from "unlock", which is defined
1028 in unistd.h on QNX. (Reported by Matt Kraai.)
1029
10302006-03-04 Kevin Ryde <user42@zip.com.au>
1031
1032 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1033 not SCM_CRITICAL_SECTION_START.
1034
1035 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1036 Mike Gran.
1037
10382006-02-28 Kevin Ryde <user42@zip.com.au>
1039
1040 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1041
10422006-02-26 Kevin Ryde <user42@zip.com.au>
1043
1044 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1045 NAME_MAX is not available, which is so on Solaris 10. Report and help
1046 by Bill Schottstaedt.
1047
1048 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1049 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1050 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1051 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1052 use "unsigned char", not signed char. This ensures comparisons are
1053 the same as `char<?' etc, and is also the same as guile 1.6 did.
1054 Reported by Sven Hartrumpf.
1055
4a9f83ff
MD
10562006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1057
1058 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1059 SCM_HAVE_T_INT64.
1060 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1061 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1062 scm_t_int32.
1063
29d8c124 10642006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1065
1066 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1067 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1068 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1069 Take into account SEG->SPAN when computing CELLS_SWEPT.
1070 (scm_i_sweep_segment): Take one more argument, similarly.
1071 (scm_i_sweep_all_segments): Likewise.
1072 (scm_i_sweep_some_segments): Likewise.
1073 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1074 refer to SCM_GC_CELLS_COLLECTED.
1075
1076 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1077 argument, an `scm_i_sweep_statistics' object.
1078 Change the way DELTA is collected: don't take into account
1079 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1080
1081 * gc-malloc.c (scm_realloc): Pass an extra argument
1082 to `scm_i_sweep_all_segments ()'.
1083
1084 * gc.c (gc_start_stats): Updated accordingly.
1085 (gc_end_stats): Take an additional SWEEP_STATS argument.
1086 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1087 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1088 Decrement SCM_CELLS_ALLOCATED.
1089 (scm_i_gc): Likewise.
1090
1091 * private-gc.h (scm_i_sweep_*): Updated function
1092 prototypes accordingly.
1093 (scm_t_sweep_statistics): New type.
1094 (scm_i_sweep_statistics_init): New macro.
1095 (scm_i_sweep_statistics_sum): New macro
1096
9a5fa6e9 10972006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1098
1099 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1100 LEN. Without this, too much collectable memory gets unregistered,
1101 which results in an underflow of SCM_MALLOCATED in
1102 `decrease_mtrigger()'.
1103
1104 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1105 equal to SCM_MALLOCATED.
1106
11072006-02-13 Marius Vollmer <mvo@zagadka.de>
1108
1109 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1110 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1111 configured --without-threads.
1112 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1113
1aaa1c17
MV
11142006-02-12 Marius Vollmer <mvo@zagadka.de>
1115
1116 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1117 filling when the fill parameter is omitted, as documented, but
1118 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1119 can not store characters.
1120
d7c6575f
NJ
11212006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1122
1123 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1124 on to scm_fill_sockaddr call.
1125
43e01b1e
NJ
11262006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1127
1128 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1129 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1130
1131 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1132 (struct pre_unwind_data): New, replaces struct lazy_catch.
1133 (scm_c_catch): New, replaces scm_internal_catch as the primary
1134 catch API for C code; adds pre-unwind handler support.
1135 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1136 compatibility.
1137 (tc16_pre_unwind_data, pre_unwind_data_print,
1138 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1139 "lazy_catch" equivalents.
1140 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1141 as the primary C API for a "lazy" catch.
1142 (scm_internal_lazy_catch): Now just a wrapper for
1143 scm_c_with_throw_handler, for back compatibility.
1144 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1145 pre-unwind handler support.
1146 (scm_catch): Now just a wrapper for
1147 scm_catch_with_pre_unwind_handler, for back compatibility.
1148 (scm_with_throw_handler): New.
1149 (scm_lazy_catch): Update comment to say that the handler can
1150 return, and what happens if it does.
1151 (toggle_pre_unwind_running): New.
1152 (scm_ithrow): When identifying the throw target, take running
1153 flags into account. In general, change naming of things from
1154 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1155 don't unwind the dynamic context first. Add dynwind framing to
1156 manage the running flag of a throw handler. If a lazy catch or
1157 throw handler returns, rethrow the same exception again. Add
1158 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1159
1160 * root.c (scm_internal_cwdr): Add NULL args to
1161 scm_i_with_continuation_barrier call.
1162
1163 * dynwind.c: Change comment mentioning lazy-catch to mention
1164 pre-unwind data and throw handler also.
1165
1166 * continuations.h (scm_i_with_continuation_barrier): Add
1167 pre-unwind handler args.
1168
1169 * continuations.c (scm_i_with_continuation_barrier): Add
1170 pre-unwind handler args, and pass on to scm_c_catch (changed from
1171 scm_internal_catch).
1172 (c_handler): Remove scm_handle_by_message_noexit call.
1173 (scm_c_with_continuation_barrier): Call
1174 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1175 as the pre-unwind handler.
1176 (scm_handler): Remove scm_handle_by_message_noexit call.
1177 (s_scm_with_continuation_barrier): Call
1178 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1179 as the pre-unwind handler.
1180
2b829bbb
KR
11812006-02-04 Kevin Ryde <user42@zip.com.au>
1182
1183 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1184
72098928
KR
11852006-02-03 Kevin Ryde <user42@zip.com.au>
1186
1187 * list.c, list.h (scm_list): Restore this function for use from C.
1188 It's a complete no-op but in theory might used by someone.
1189
aa092c5d
MV
11902006-01-30 Marius Vollmer <mvo@zagadka.de>
1191
1192 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1193 so that it gets unlocked in all cases.
1194 (SCM_APPLY, CEVAL): Likewise.
1195
661ae7ab
MV
11962006-01-29 Marius Vollmer <mvo@zagadka.de>
1197
ee51ba31
MV
1198 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1199 scm_is_typed_array instead.
1200
661ae7ab
MV
1201 Renamed the "frames" that are related to dynamic-wind to "dynamic
1202 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1203 Updated documentation.
1204
99e370f6
MV
1205 Disabled "futures":
1206
1207 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1208 * eval.c, init.c: Comment out all 'future' related things.
1209
15ccf10b
MV
12102006-01-28 Marius Vollmer <mvo@zagadka.de>
1211
1212 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1213 to inline.h to make it inline.
1214
9a5fa6e9 12152005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1216
1217 * strings.c (scm_i_take_stringbufn): New.
1218 (scm_i_c_take_symbol): New.
1219 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1220
1221 * strings.h (scm_i_c_take_symbol): New.
1222 (scm_i_take_stringbufn): New.
1223
1224 * symbols.c (lookup_interned_symbol): New function.
1225 (scm_i_c_mem2symbol): New function.
1226 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1227 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1228 creating a new Scheme string.
1229 (scm_from_locale_symboln): Likewise.
1230 (scm_take_locale_symbol): New.
1231 (scm_take_locale_symboln): New.
1232
1233 * symbols.h (scm_take_locale_symbol): New.
1234 (scm_take_locale_symboln): New.
1235
2ca2ffe6
HWN
12362006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1237
1238 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1239 free_count.
1240
c255614e
HWN
12412005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1242
1243 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1244 upon error
1245
29295b0c
NJ
12462005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1247
9a5fa6e9 1248 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1249 the GC when allocated_fluids_len is zero.
1250
2824f4dc
NJ
12512005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1252
ec3a8ace
NJ
1253 * load.c (the_reader, the_reader_fluid_num): New.
1254 (scm_primitive_load): Support custom reader.
1255 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1256 the_reader as `current-reader'.
1257
2824f4dc
NJ
1258 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1259 (rather than an uninitialized pointer on the stack).
1260
d9c36d2a
MV
12612005-12-07 Marius Vollmer <mvo@zagadka.de>
1262
6a88895b
MV
1263 Reported by Bruce Korb:
1264
1265 * init.c (invoke_main_func): Don't call exit here. Throws that
1266 are only caught by scm_with_guile will bypass us and would cause
1267 scm_boot_guile to return erroneously.
1268 (scm_boot_guile): Expect scm_with_guile to return and call exit
1269 here, passing it an appropriate exit code.
1270
1271 From Andy Wingo:
d9c36d2a
MV
1272
1273 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1274 unsigned char cast to an int, or -1 for EOS.
1275
b54df254
MV
12762005-12-06 Marius Vollmer <mvo@zagadka.de>
1277
08f489c9
MV
1278 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1279 non-const.
9a5fa6e9 1280 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1281
b54df254
MV
1282 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1283 scm_enter_guile): Removed from public API. See comment at
1284 scm_without_guile for the rationale.
1285
1286 * scmsigs.c (read_without_guile): New.
1287 (signal_delivery_thread): Use it instead of
1288 scm_leave_guile/read/scm_enter_guile.
1289
9d9ce2b5
MV
1290 From Stephen Compall:
1291
1292 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1293 (CEVAL): Evaluate SRFI 61 cond clauses.
1294
9a5fa6e9 12952005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1296
1297 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1298 This was typically hit when running `gc-live-object-stats' right
1299 after starting Guile.
1300
efeac8ae
KR
13012005-11-30 Kevin Ryde <user42@zip.com.au>
1302
1303 * srfi-13.c (scm_string_append_shared): No copying if just one
1304 non-empty string in args.
1305
606183ba
KR
13062005-11-26 Kevin Ryde <user42@zip.com.au>
1307
1308 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1309 by Ludovic Courtès.
606183ba
KR
1310
1311 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1312 "register".
1313
1314 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1315 scm_malloc returning NULL, it never does that.
1316 * putenv.c (putenv): Likewise.
1317
1318 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1319 much too big to want to inline.
1320
9a5fa6e9 13212005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1322
1323 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1324 the value at its top. This fixes a reference leak.
1325 (PUSH_REF): Perform `pstate->top++' after calling
1326 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1327 effects.
1328
9a5fa6e9 13292005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1330
1331 * gc.c (scm_weak_vectors): Removed.
1332
f07d2b20
KR
13332005-11-12 Kevin Ryde <user42@zip.com.au>
1334
1335 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1336 by Ludovic Courtès.
f07d2b20 1337
bedd3f5f
MV
13382005-11-07 Marius Vollmer <mvo@zagadka.de>
1339
1340 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1341 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1342 section might exit non-locally.
1343
7c9c0169
NJ
13442005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1345
1346 * eval.c (sym_instead): New symbol.
1347 (ENTER_APPLY): Remove optional use of a continuation when making
1348 trap call.
1349 (scm_debug_opts): Change doc for 'cheap option to make clear that
1350 it is now obsolete.
1351 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1352 making trap calls, and implement substitution of eval expressions
1353 and return values using the values that the trap call handlers
1354 return.
1355
1356 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1357
9a5fa6e9 13582005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1359
1360 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1361 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1362 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1363 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1364 scm_c_make_socket_address): New functions.
1365 * socket.h: Add prototypes.
1366
fc9f596c
KR
13672005-10-24 Kevin Ryde <user42@zip.com.au>
1368
1369 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1370 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1371 POSIX spec examples, the latter are not available on for instance
1372 NetBSD.
1373
1374 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1375 posix.texi.
1376
1377 * stime.c (scm_strftime): Update docstring from posix.texi.
1378
0460c6e1
MV
13792005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1380
1381 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1382
1383 * null-threads.h, pthread-threads.h
1384 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1385 (scm_i_pthread_mutexattr_recursive): New.
1386
1387 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1388 (scm_i_critical_section_mutex): Do not initialize statically.
1389 (scm_threads_prehistory): Initialize
1390 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1391 here.
1392
1393 * eval.c (source_mutex): Do not initialiaze statically.
1394 (scm_init_eval): Do it here, using
1395 scm_i_pthread_mutexattr_recursive.
1396
7b4a9e52
MV
13972005-09-05 Marius Vollmer <mvo@zagadka.de>
1398
1399 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1400 New.
1401 (sym_reader): New.
1402 (scm_print_opts): Added "quote-keywordish-symbols" option.
1403 (quote_keywordish_symbol): New, for evaluating the option.
1404 (scm_print_symbol_name): Use it.
1405 (scm_init_print): Initialize new option to sym_reader.
1406
5defc05d
NJ
14072005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1408
1409 * eval.c (eval_letrec_inits): New.
1410 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1411
036482e9
MV
14122005-08-12 Marius Vollmer <mvo@zagadka.de>
1413
1414 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1415 Peter Gavin!
1416
5c347f8c
KR
14172005-08-12 Kevin Ryde <user42@zip.com.au>
1418
1419 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1420
bc721aa2
KR
14212005-08-06 Kevin Ryde <user42@zip.com.au>
1422
1423 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1424 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1425 scm_string_index, scm_string_index_right, scm_string_skip,
1426 scm_string_skip_right, scm_string_count, scm_string_map,
1427 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1428 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1429 procedures called in loops.
1430
126c81db
KR
14312005-08-02 Kevin Ryde <user42@zip.com.au>
1432
1433 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1434 avoid lots of copying where previoulsy growing by only 80 bytes at a
1435 time.
1436
7f278dc6
MV
14372005-08-01 Marius Vollmer <mvo@zagadka.de>
1438
1439 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1440 already have scm_lookup_closure_module, which does the same thing.
1441
cb5c4b07
MV
14422005-08-01 Marius Vollmer <mvo@zagadka.de>
1443
1444 New marking algorithm for weak hashtables that fixes the problem
1445 that references from the non-weak value to the associated weak
1446 key (for example) would prevent the entry from ever being dropped.
1447
1448 Guardians have been changed back to their original semantics and
1449 are no longer greedy and no longer drop cycles.
1450
1451 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1452 hashtable and guardian machinery but call the relevant functions
1453 directly.
1454
1455 * guardians.h, guardians.c, deprecated.h,
1456 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1457 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1458 Deprecated and moved into deprecated.[ch].
1459
1460 * guardians.h, guardians.c: Mostly rewritten.
1461 (scm_i_init_guardians_for_gc,
1462 scm_i_identify_inaccessible_guardeds,
1463 scm_i_mark_inaccessible_guardeds): New.
930888e8 1464 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1465
1466 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1467 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1468 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1469 (scm_weaks_prehistory): Removed.
1470 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1471 scm_i_mark_weak_vectors_non_weaks,
1472 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1473 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1474 scm_scan_weak_vectors): Removed.
1475
1476 * hashtab.h (scm_i_scan_weak_hashtables): New.
1477 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1478 SCM_WVECTF_NOSCAN.
1479 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1480 t->n_items.
1481 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1482 to latter. Do not scan the alists themselves, this is done by the
1483 weak vector code now. Just update the element count.
1484
1485 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1486 to latter. The type is now only part of the cell word.
1487 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1488
1489 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1490
3e2073bd
MD
14912005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1492
1493 Some changes towards making it possible to run Guile on the EM64T
1494 platform.
1495
1496 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1497 mallocating for (unsigned long *bounds).
1498
1499 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1500 scm_t_bits before storing them in the type word.
1501
1502 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1503 scm_t_bits to int.
1504
e8ac8e75
KR
15052005-07-12 Kevin Ryde <user42@zip.com.au>
1506
1507 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1508 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1509 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1510 than scm_makfrom0str.
1511 Reported by Ken Raeburn.
1512
1513 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1514 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1515 returning SCM_GC_CARD_BVEC.
1516
1517 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1518 rather than latin-1 acute accent, the latter may not print on all
1519 terminals.
1520
1521 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1522 trailing deletions, so as to return a substring if those are the only
1523 changes.
1524
adc0677d
KR
15252005-07-10 Kevin Ryde <user42@zip.com.au>
1526
1527 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1528 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1529 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1530 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1531
8fecbb19
HWN
15322005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1533
1534 * gc-card.c (scm_i_card_statistics): init tag.
1535
1536 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1537
fc9c5d06
HWN
15382005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1539
8fecbb19
HWN
1540 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1541 string.
fc9c5d06 1542
08fce816
KR
15432005-06-25 Kevin Ryde <user42@zip.com.au>
1544
1545 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1546 last change, use plain copy-on-write substrings, the individual
1547 descriptions in the srfi don't mention shared storage (only the
1548 introduction does).
1549
1550 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1551 null-terminator, rather than mallocing a whole new block.
1552 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1553
fc4abd0e
MV
15542005-06-12 Marius Vollmer <mvo@zagadka.de>
1555
e3da8a30
MV
1556 * ramap.c (scm_array_index_map_x): First test for real arrays,
1557 then check for generalized vectors. This ensures that the
1558 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1559 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1560 to access the target array, making these functions work with all
1561 kinds of arrays, not just bit arrays.
e3da8a30 1562
fc4abd0e
MV
1563 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1564 gh_list.c, gh_predicates.c: Deprecated everything.
1565
1566 * environments.c (environment_default_folder,
1567 environment_default_observer): Do not use gh_call3, gh_call1.
1568
e4da0740
HWN
15692005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1570
1571 * modules.c (s_scm_eval_closure_module): new function. Return the
1572 module inside an eval-closure.
1573
1574 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1575 table. This means that procedure properties are GC'd if the
1576 procedure dies.
1577
27667158
KR
15782005-06-11 Kevin Ryde <user42@zip.com.au>
1579
1580 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1581 charset cases, count chars kept and build a string in a second pass,
1582 rather than using a cons cell for every char kept. Use a shared
1583 substring when nothing removed (such sharing is allowed by the srfi).
1584
8a00ba71
HWN
15852005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1586
1587 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1588 string, so live object stats can be sorted with string<?.
1589
a677679f
MV
15902005-06-06 Marius Vollmer <mvo@zagadka.de>
1591
2ff668b0
MV
1592 * print.c (iprin1): When writing a string, collect all characters
1593 that can be printed directly into one call to scm_lfwrite.
1594 Previously, every character was output with its own call to
1595 write(2) on unbuffered ports.
1596
589f22f6
MV
1597 * eval.c (scm_eval_options_interface): Use
1598 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1599 and SCM_CRITICAL_SECTION_END.
1600
a677679f
MV
1601 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1602 check for generalized vectors. This ensures that the generalized
1603 vector case need only work with zero-origin ranges.
1604
f8cda9ee
KR
16052005-06-06 Kevin Ryde <user42@zip.com.au>
1606
1607 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1608 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1609 matched.
1610
cdac1be4
MV
16112005-06-05 Marius Vollmer <mvo@zagadka.de>
1612
6642f7ac
MV
1613 * eval.c: Added comment on how to make case 1.1 of
1614 r5rs_pitfall.test succeed.
1615
cdac1be4
MV
1616 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1617
1618 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1619
1620 * socket.c: Remove obsolete comment about socklen_t.
1621 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1622
1623 * numbers.h (isnan)[__MINGW32__]: Remove.
1624
1625 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1626 DEFAULT_INCLUDES when cross compiling.
1627
1628 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1629
a677679f 1630 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1631 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1632 from Jan's patch.)
1633
9e664475
MV
16342005-05-22 Marius Vollmer <mvo@zagadka.de>
1635
188d0c5e
MV
1636 * unif.c (scm_make_shared_array): Add old base to new base since
1637 scm_array_handle_pos does not include the base.
1638 (scm_aind): Likewise.
1639
9e664475
MV
1640 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1641 output port.
1642
5a6d139b
NJ
16432005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1644
1645 Mac OS X compile warning fixes, reported by Richard Todd.
1646
1647 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1648 that it is signed.
1649
1650 * strports.c (st_resize_port): Add unsigned char cast.
1651 (scm_mkstrport): Make read/write_buf cast unsigned.
1652
1653 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1654
1655 * rdelim.c (scm_read_line): Initialize slen.
1656
1657 * load.c (scm_search_path): Remove weird >=1, and add
1658 parentheses to clarify conditions.
1659
1660 * hash.c (scm_hasher): Add const unsigned char cast.
1661
1662 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1663
b01532af
NJ
16642005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1665
9a5fa6e9 1666 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1667
1668 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1669 code.
1670
1671 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1672 of code.
1673
1674 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1675 of code.
1676 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1677 and current.
1678
229a0710
NJ
16792005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1680
1681 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1682 compile warning reported by Werner Scheinast.
1683
645dd3fc
HWN
16842005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1685
80038021
HWN
1686 * list.h: remove scm_list()
1687
645dd3fc
HWN
1688 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1689 SCM_DEBUG_CELL_ACCESSES
1690 (FLUID_NEXT_LOC): idem.
1691
9a68a4a8
KR
16922005-04-30 Kevin Ryde <user42@zip.com.au>
1693
1694 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1695 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1696 zero when re==0 and im<0. Reported by Jean Crepeau.
1697
0640cdaa
KR
16982005-04-25 Kevin Ryde <user42@zip.com.au>
1699
1700 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1701 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1702 few sensible uses (like filling with a random number generator say),
1703 but has been allowed in the past and so should be kept.
0640cdaa 1704
c0b85e9c
KR
17052005-04-23 Kevin Ryde <user42@zip.com.au>
1706
1707 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1708 scm_hash_fn_remove_x.
1709
1710 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1711 the caller when cons* is reached through apply.
1712
1713 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1714 list is called using apply, under the debugging evaluator.
1715 (scm_list): Remove.
1716
c51682b4
KR
1717 * list.c, list.h (scm_make_list): New code, moving make-list from
1718 boot-9.scm.
8cb2eff8 1719
c0575bde
KR
17202005-04-14 Kevin Ryde <user42@zip.com.au>
1721
1722 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1723 converted from scheme code in boot-9.scm.
1724
47a298d9
KR
17252005-04-11 Kevin Ryde <user42@zip.com.au>
1726
1727 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1728 Validate list argument, scm_string_append and scm_string_append_shared
1729 don't do that to their rest argument (in a normal build).
1730
8ea3dc2e
MV
17312005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1732
1733 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1734 closure can not be stored since it is no longer valid at GC time.
1735 (make_hash_table): Initialize 'hash_fn' field.
1736 (scm_i_rehash): Only store hash_fn in hash table when closre is
1737 NULL.
1738 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1739 non-NULL. Always use a NULL closure.
1740 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1741 few entries.
1742
08d2020d
MV
17432005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1744
1745 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1746 argument; always use scm_delq_x. The delete_fn function works on
1747 the handle, not the key, and it therefore makes no sense to make
1748 it configurable. Changed all callers.
1749 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1750 (scm_hash_clear): Accept plain vectors as hashtables.
1751 (scm_delx_x): Removed.
1752
cb975c21
HWN
17532005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1754
1755 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1756 compatibility with gcc -std=c99.
1757
4c908f2c
MD
17582005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1759
1760 * async.h (scm_mask_ints): Removed left over reference to
1761 scm_root.
1762
1763 * threads.c: Removed fprintf debug statements.
1764
d193b04b
NJ
17652005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1766
1767 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1768
c29748cd
NJ
17692005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1770
1771 * debug.c (scm_make_memoized): Remove unnecessary critical
1772 section, and simplify by using SCM_RETURN_NEWSMOB.
1773
e654b062
MD
17742005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1775
1776 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1777
4bc6f1c6
KR
17782005-03-18 Kevin Ryde <user42@zip.com.au>
1779
1780 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 1781 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 1782
f1531813
KR
17832005-03-13 Kevin Ryde <user42@zip.com.au>
1784
1785 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1786 srfi-60.
1787
1788 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1789 because OR-ing bits into a negative can reduce the value to an inum.
1790
1791 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1792 casting inum to double since that can lose precision.
1793
a9fae247
MV
17942005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1795
1796 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1797 (guilify_self_1): Initialize it.
1798
1799 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1800 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1801 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1802 field.
1803 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1804 recursively.
1805 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1806 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1807 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1808 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1809 scm_after_gc_c_hook here.
1810 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1811 scm_after_gc_c_hook when a full GC has in fact been performed.
1812 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1813
1814 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1815 scm_gc_heap_lock.
1816
1817 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1818 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1819
1820 * inline.h (scm_cell, scm_double_cell): Do not check
1821 scm_gc_running_p, allocation during sweeping is OK.
1822
1823 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1824 not set scm_block_gc.
1825
1826 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1827
1828 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1829 instead of scm_malloc. The latter can not be used during GC.
1830
d1c38e11
MV
18312005-03-09 Marius Vollmer <mvo@zagadka.de>
1832
1833 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1834 years.
1835
99ec43c1
MV
18362005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1837
1838 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1839 scm_gc_running_p. Sweeping can happen in parallel with
1840 allocation.
1841
1842 * inline.h: Updated comments for current threading implementation.
1843
1844 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1845 (scm_i_thread): Removed unused signal_asyncs field.
1846 (threads_mark): Do not mark it.
1847 (guilify_self_1): Do not initialize it. Do initialize
1848 continuation_root field.
1849 (do_thread_exit): Do not remove thread from all_threads list.
1850 (on_thread_exit): Do it here, after leaving guile mode.
1851 (sleep_level): Removed.
1852 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1853 returning. Do not support recursive sleeps.
1854 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1855 entry. Do not support recursive sleeps.
1856
1857 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1858 resize_all_states): Collapsed ensure_state_size and
1859 ensure_all_state_sizes into one function named resize_all_states.
1860 Allocate new vectors outside of single threaded region. Do only
1861 simple things inside that region.
1862 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1863 while adding to the global lists.
1864
1865
461f34aa
MV
18662005-03-08 Marius Vollmer <mvo@zagadka.de>
1867
1868 libltdl is no longer distributed. We expect it to be installed
1869 already.
1870
1871 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1872 (libguile_la_LIBADD): Removed @LIBLTDL@.
1873
4e047c3e
MV
18742005-03-07 Marius Vollmer <mvo@zagadka.de>
1875
1876 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1877 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1878 they also block/unblock execution of asyncs and call
1879 scm_async_click which is declared in async.h but threads.h can not
1880 include async.h since async.h already includes threads.h.
1881 (scm_i_critical_section_level): New, for checking mistakes in the
1882 use of the SCM_CRITICAL_SECTION_* macros.
1883 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1884 critical sections can be nested.
1885
1886 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1887 not zero.
1888
1889 * threads.h, threads.c (scm_frame_lock_mutex): New.
1890 (scm_frame_critical_section): Take mutex as argument.
1891 (framed_critical_section_mutex): New, used as default for above.
1892 (scm_init_threads): Initialize it.
1893 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1894 scm_i_critical_section_mutex; both are initialized statically.
1895
1896 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1897 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
1898 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1899 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
1900
1901 * debug.c (scm_debug_options): Replace
1902 SCM_CRITICAL_SECTION_START/END with a frame and
1903 scm_frame_critical_section.
1904
1905 * continuations.c (scm_make_continuation): No longer a critical
1906 section.
1907 (scm_dynthrow): Abort when scm_i_critical_section_level is
1908 not zero.
1909
d0a45bff
MV
19102005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1911
db6673e5
MV
1912 * threads.c (scm_try_mutex): Renamed argument for consistency.
1913
d0a45bff
MV
1914 * root.c (scm_call_with_dynamic_root): New docstring.
1915
1916 * eval.c: Define _GNU_SOURCE.
1917
9de87eea
MV
19182005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1919
1920 Big merge from the mvo-thread-cleanup branch. The main changes
1921 are:
1922
1923 - The dynamic roots functionality has been split into dynamic
1924 states and continuations barriers. Fluids have been
1925 reimplemented and can now be garbage collected.
1926
1927 - Initialization of Guile now works in a multi-thread friendly
1928 manner. Threads can freely enter and leave guile mode.
1929
1930 - Blocking on mutexes or condition variables or while selecting
1931 can now be reliably interrupted via system asyncs.
1932
1933 - The low-level threading interface has been removed.
1934
1935 - Signals are delivered via a pipe to a dedicated 'signal delivery
1936 thread'.
1937
1938 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1939
1940 * throw.c (scm_handle_by_message): Exit only the current thread,
1941 not the whole process.
1942 (scm_handle_by_message_noexit): Exit when catching 'quit.
1943
1944 * scmsigs.c (take_signal, signal_delivery_thread,
1945 start_signal_delivery_thread, ensure_signal_delivery_thread,
1946 install_handler): Reimplemented signal delivery as explained in
1947 the comments.
1948
1949 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
1950 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
1951 scm_i_sched_yield, scm_i_pthread_sigmask,
1952 SCM_I_PTHREAD_MUTEX_INITIALIZER,
1953 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
1954 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
1955 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
1956 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
1957 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
1958 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
1959 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
1960 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
1961 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
1962 scm_i_pthread_key_create, scm_i_pthread_setspecific,
1963 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
1964 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
1965 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
1966 when using pthreads.
1967 * null-threads.c, null-threads.h: Provide dummy definitions for
1968 the above symbols when not using pthreads.
1969
1970 * modules.h, modules.c (scm_frame_current_module): New.
1971
1972 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
1973 instead of scm_internal_dynamic_wind.
1974
1975 * init.h, init.c (restart_stack, start_stack): Removed.
1976 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
1977 (scm_boot_guile_1): Removed.
1978 (scm_i_init_mutex): New.
1979 (really_cleanup_for_exit, cleanup_for_exit): New.
1980 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
1981 Moved around some init funcs. Call
1982 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
1983 with atexit.
1984
1985 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
1986 Use "!scm_is_eq" instead of "!=".
1987
1988 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
1989 SCM_USE_COOP_THREADS): Removed.
1990
1991 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
1992 maintained. Unlock scm_i_sweep_mutex before running
1993 scm_after_gc_c_hook.
1994 (scm_permanent_object): Allocate outside of critical section.
1995 (cleanup): Removed.
1996
1997 * fluids.h, fluids.c: Reimplemented completely.
1998 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
1999 SCM_FAST_FLUID_SET): Reimplemented as functions.
2000 (scm_is_fluid): New.
2001 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2002 (scm_make_dynamic_state, scm_dynamic_state_p,
2003 scm_is_dynamic_state, scm_current_dynamic_state,
2004 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2005 scm_c_with_dynamic_state, scm_with_dynamic_state,
2006 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2007
2008 * feature.c (progargs_fluid): New.
2009 (scm_program_arguments, scm_set_program_arguments): Use it instead
2010 of scm_progargs.
2011 (scm_init_feature): Allocate it. Also, only add "threads" feature
2012 when SCM_USE_PTHREAD_THREADS is true.
2013
2014 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2015 scm_make_rec_mutex, with all the consequences.
2016 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2017 scm_internal_dynamic_wind. Handle dynamic states as second
2018 argument.
2019
2020 * threads.h, threads.c (scm_internal_select): Renamed to
2021 scm_std_select and discouraged old name.
2022 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2023 and scm_std_usleep.
2024 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2025 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2026 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2027 SCM_THREAD_DATA): Removed.
2028 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2029 (scm_i_thread): New.
2030 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2031 Use scm_assert_smob_type.
2032 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2033 scm_thread_self, scm_thread_yield, scm_mutex_init,
2034 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2035 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2036 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2037 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2038 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2039 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2040 scm_thread_select): Removed. Replaced with scm_i_pthread
2041 functions as appropriate.
2042 (scm_in_guile, scm_outside_guile): Removed.
2043 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2044 take a ticket.
2045 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2046 New.
2047 (scm_i_frame_single_threaded): New.
2048 (scm_init_threads_default_dynamic_state): New.
2049 (scm_i_create_thread): Removed.
2050 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2051 (scm_make_recursive_mutex): New.
2052 (scm_frame_critical_section): New.
2053 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2054 latter, changed all uses.
2055 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2056 scm_i_set_last_debug_frame): New, use them instead of scm_root
2057 stuff.
2058 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2059 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2060 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2061 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2062 (remqueue): Allow the removal of already removed cells. Indicate
2063 whether a real removal has happened.
2064 (scm_thread): Removed, replaced with scm_i_thread.
2065 (make_thread, init_thread_creatant): Removed.
2066 (cur_thread): Removed.
2067 (block_self, unblock_from_queue): New.
2068 (block, timed_block, unblock): Removed.
2069 (guilify_self_1, guilify_self_2, do_thread_exit,
2070 init_thread_key_once, init_thread_key,
2071 scm_i_init_thread_for_guile, get_thread_stack_base,
2072 scm_init_guile): New initialisation method.
2073 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2074 thread creation.
2075 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2076 "fair" to fat and implemented new semantics, including reliable
2077 interruption.
2078 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2079 (scm_threads_mark_stacks): Explicitly mark handle.
2080 (scm_std_select): Allow interruption by also selecting on the
2081 sleep_pipe.
2082 (scm_i_thread_put_to_sleep): Handle recursive requests for
2083 single-threadedness.
2084 (scm_threads_prehistory, scm_init_threads): Put current thread
2085 into guile mode via guileify_self_1 and guileify_self_2,
2086 respectively.
2087
2088 * fluid.h (SCM_FLUIDP): Deprecated.
2089
2090 * coop-threads.c: Removed.
2091
2092 * continuations.h, continuations.c (scm_with_continuation_barrier,
2093 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2094 New.
2095
2096 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2097 (async_mutex): New.
2098 (scm_async_click): Protected with async_mutex. Do not deal with
2099 signal_asyncs, which are gone. Set cdr of handled async cell to
2100 #f.
2101 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2102 current sleep.
2103 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2104 since that might not work during early initialization.
2105
2106 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2107 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2108 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2109 and SCM_CRITICAL_SECTION_END.
2110 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2111 SCM_CRITICAL_SECTION_START/END.
2112
2113 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2114 (libguile_la_SOURCES): Added null-threads.c
2115 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2116 threads-plugin.c.
2117 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2118
2119 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2120 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2121 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2122 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2123 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2124 scm_make_root): Removed or deprecated. Replaced with references
2125 to the current thread, dynamic state, continuation barrier, or
2126 some fluid, as appropriate.
2127 (root_mark, root_print): Removed.
2128 (scm_internal_cwdr): Reimplemented guts with
2129 scm_frame_current_dynamic_state and
2130 scm_i_with_continuation_barrier.
2131 (scm_dynamic_root): Return current continuation barrier.
2132
2133
ad3d5a65
MV
21342005-02-28 Marius Vollmer <mvo@zagadka.de>
2135
2136 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2137 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2138 cleanliness.
2139 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2140 IP_DROP_MEMBERSHIP.
2141 Thanks to Greg Troxel!
2142
73a90115
MD
21432005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2144
2145 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2146 block.
2147
5d2cb3ab
MV
21482005-02-25 Marius Vollmer <mvo@zagadka.de>
2149
2150 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2151 so that no two weak alist vectors share a spine.
2152 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2153 during GC before inserting the new alist cell.
2154
838c4126
MV
21552005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2156
2157 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2158 the hashtable.
2159 (scm_hash_fn_create_handle_x): Likewise.
2160 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2161
29fed193
MD
21622005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2163
2164 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2165 the prototypical examples mentioned in the old reference manual.
2166 Instead keep the old semantics of dispatching on type. (Yes, this
2167 is extremely ugly, but the whole point of keeping the deprecated
2168 interface is not to break old code.)
2169
9cc49060
MD
21702005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2171
2172 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2173 scm_i_array_dims.
2174
8447f463
KR
21752005-01-28 Kevin Ryde <user42@zip.com.au>
2176
2177 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2178 integer-expt and multiply/divide. Inexacts and fractions no longer
2179 supported (they happened to work before for left shifts, but not
2180 right). Don't really need inexacts and fractions, since ash is
2181 documented as a "bitwise operation", and all the rest of those only
2182 take exact integers.
2183
1367aa5e
HWN
21842005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2185
856fca7e
HWN
2186 * gc-card.c (scm_i_card_statistics): map structs, closures and
2187 subrs to one tag.
2188
1367aa5e 2189 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2190 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2191
2192 * gc-segment.c (scm_i_all_segments_statistics): new function.
2193 (scm_i_heap_segment_statistics): new function
2194
2195 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2196 statistics on the number of live objects of each type.
2197
2198 * gc-card.c (scm_i_tag_name): new function.
2199 (scm_i_card_statistics): new function.
2200
333db3b8
KR
22012005-01-24 Kevin Ryde <user42@zip.com.au>
2202
2203 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2204 POSIX and C99 don't document errno being set. Reported by Bruno
2205 Haible.
2206 (scm_flock): Update docstring from manual.
2207
8447f463
KR
2208 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2209 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2210 a 64-bit system.
2211
2212 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2213 sa_handler, needs to be a long on 64-bit systems where int is only 32
2214 bits.
2215
88f59e53
MV
22162005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2217
0eeb2611
MV
2218 * environments.c (obarray_enter, obarray_replace): Call
2219 SCM_HASHTABLE_INCREMENT when adding a new entry.
2220
88f59e53
MV
2221 * objects.c: Include goops.h for the scm_class_of prototype.
2222
2223 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2224 sizes to be smaller than the maximum lengths of vectors.
2225
219b2868
MV
22262005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2227
2228 * ports.c, smob.c: Include "libguile/goops.h".
2229
2230 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2231 scm_class_char, scm_class_pair, scm_class_procedure,
2232 scm_class_string, scm_class_symbol,
2233 scm_class_procedure_with_setter, scm_class_primitive_generic,
2234 scm_class_vector, scm_class_null, scm_class_real,
2235 scm_class_complex, scm_class_integer, scm_class_fraction,
2236 scm_class_unknown, scm_port_class, scm_smob_class,
2237 scm_no_applicable_method, scm_class_of): Moved from objects to
2238 goops since they are only useable once goops has been loaded.
2239 (scm_classes_initialized): Removed.
2240 (scm_class_of): Do not check it.
2241 (create_standard_classes): Do not set it.
2242
009c6b9c
MV
22432005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2244
50472546
MV
2245 * objects.h, objects.c (scm_classes_initialized): New.
2246 (scm_class_of): Signal error when scm_classes_initialized is zero.
2247 * goops.c (create_standard_classes): Set scm_classes_initialized
2248 to one.
2249
009c6b9c
MV
2250 * random.c (scm_random_solid_sphere_x): Use
2251 scm_c_generalized_vector_length instead of
2252 scm_uniform_vector_length.
2253
7719cbe9
MV
22542005-01-16 Marius Vollmer <mvo@zagadka.de>
2255
2256 * script.c (scm_compile_shell_switches): Removed debugging output.
2257
1ec44fed
KR
22582005-01-15 Kevin Ryde <user42@zip.com.au>
2259
2260 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2261 docstrings from manual.
2262 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2263
6e4cd850
MV
22642005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2265
0b5a0521
MV
2266 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2267 its value.
2268
2269 Implement u64 and s64 uniform numeric vectors with bignums when
2270 scm_t_uint64 and scm_t_int64 are not available.
2271
2272 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2273 scm_array_handle_u64_elements,
2274 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2275 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2276 is not available.
2277 (scm_take_s64vector, scm_array_handle_s64_elements,
2278 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2279 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2280 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2281 scm_t_int64/scm_t_uint64 are not available.
2282 (uvec_mark): New, to mark the bignums.
2283 (alloc_uvec): Initialize bignums.
2284 (uvec_fast_ref): Return bignums directly.
2285 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2286 assert_exact_integer): New.
2287 (uvec_fast_set): Use them to validate the bignums.
2288 (scm_init_srfi_4): Set mark function of smob when needed.
2289 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2290 scm_int64_max.
2291
6e4cd850
MV
2292 Recognize 1.4 -e syntax.
2293
2294 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2295 (scm_compile_shell_switches): Use them to recognize and convert
2296 1.4 "-e" syntax.
2297
3b698afe
MV
22982005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2299
2300 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2301 deprecated features that once were macros but are now functions
2302 back into macros.
2303
d6dc83a9
MV
23042005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2305
49086691
MV
2306 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2307 * deprecation.c (scm_issue_deprecation_warning,
2308 scm_c_issue_deprecation_warning_fmt): Use it.
2309 (mode): Removed.
2310 (print_summary): New.
2311 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2312 mode.
2313
d6dc83a9
MV
2314 Deprecated SCM_ARRAY* macros.
2315
2316 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2317 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2318 version. Changed all uses.
2319 (scm_tc16_array, scm_i_tc16_array,
2320 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2321 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2322 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2323 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2324 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2325 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2326 SCM_ARRAY_V, SCM_I_ARRAY_V,
2327 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2328 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2329 scm_t_array, scm_i_t_array): Likewise.
2330 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2331 Moved from unif.h to unif.c.
2332 (scm_c_array_rank): New.
2333 (scm_array_rank): Reimplement using it.
2334
2335 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2336 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2337 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2338
dc91d8de
MV
23392005-01-11 Marius Vollmer <mvo@zagadka.de>
2340
2341 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2342 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2343 scm_c_generalized_vector_ref and scm_cvref, and
2344 scm_c_generalized_vector_set_x, respectively.
2345 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2346 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2347
2348 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2349 former to latter and made public. Changed all uses.
2350 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2351 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2352 (scm_i_shap2ra): New internal version of scm_shap2ra.
2353 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2354 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2355 (scm_ra_set_contp): Deprecated, changed all uses to
2356 scm_i_ra_set_contp.
2357 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2358
66d33784
MV
23592005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2360
b06f099d
MV
2361 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2362 Trotts!
2363
5d35ad81
MV
2364 * unif.c (scm_list_to_typed_array): Allow the specification of the
2365 upper bound as well. This is needed for empty arrays.
2366 (l2ra): Give needed number of elements in error message.
2367 (scm_i_print_array): Print length information for arrays that need
2368 it.
2369 (scm_i_read_array): Parse it.
2370
66d33784
MV
2371 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2372 scm_i_object_chars, scm_i_object_length): Brought back from the
2373 dead.
2374
d7d7d401
MV
23752005-01-10 Marius Vollmer <mvo@zagadka.de>
2376
74c58fce
MV
2377 * ramap.c: Replaced single-index uses of scm_array_set_x with
2378 scm_c_generalized_vector_set_x.
2379
d7d7d401
MV
2380 * unif.c (scm_array_rank, scm_array_dimensions,
2381 scm_shared_array_offset, scm_shared_array_increments,
2382 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2383 to simplify code and make it more general.
2384 (scm_shared_array_root): Work with all kinds of arrays, including
2385 naked vectors.
2386 (indices_to_pos): New.
74c58fce
MV
2387 (scm_make_shared_array): Use it instead of scm_aind; use handle
2388 for oldra.
2389
4475d3fe
KR
23902005-01-10 Kevin Ryde <user42@zip.com.au>
2391
2392 * posix.c (scm_mkstemp): Update docstring from manual.
2393
d3ddc95e
KR
2394 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2395
8c8491f5
MV
23962005-01-09 Marius Vollmer <mvo@zagadka.de>
2397
b89ecc6f
MV
2398 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2399 scm_i_uniform_vector_set_proc): New.
2400 (u8ref, u8set, s8ref, s8set, etc): New.
2401 (uvec_reffers, uvec_setters): New.
2402 (uvec_to_list): Use generic scm_array_handle_ref instead of
2403 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2404 (coerce_to_uvec, scm_c_uniform_vector_ref,
2405 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2406
2407 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2408 New.
2409 (scm_t_array_handle): Added ref, set, elements and
2410 writable_elements for fast inline operation of
2411 scm_array_handle_ref and scm_array_handle_set.
2412 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2413 and replaced with inline code that simply calls the ref/set
2414 members of the handle.
2415 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2416 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2417 New.
2418 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2419 and memoize_set.
2420 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2421 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2422 scm_bit_invert_x): Correctly multiply index with increment in the
2423 general case.
2424
8c8491f5
MV
2425 * unif.c (scm_array_handle_set): Correctly execute only one
2426 alternative. D'Oh!
2427 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2428 the array; this covers all cases with much simpler code.
2429
2430 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2431 as well.
2432
cd5d55c7
MV
24332005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2434
2435 * srfi-4.c (uvec_type): New.
2436 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2437 scm_c_uniform_vector_x): Use it to get concrete type.
2438
2439 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2440 fit the docs.
2441
2442 * unif.c (ra2l): Handle zero rank arrays.
2443 (scm_i_print_array): Print zero rank arrays specially.
2444 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2445 (scm_i_read_array): Allow zero rank arrays.
2446
a4aad74e
MV
24472005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2448
2449 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2450 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2451 and SCM_SET_HASHTAB_BUCKET.
2452
2453 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2454 Removed ref_stack field.
2455 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2456 of a print state. Use them everywhere instead of ref_stack.
2457
3a40d5e1
MV
2458 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2459
a4aad74e
MV
2460 * srfi-4.c: Include deprecation.h.
2461
2462 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2463 deprecated.c, eq.c
2464 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2465 (scm_vector_elements, scm_vector_writable_elements,
2466 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2467 unif.[hc].
2468 (SCM_SIMPLE_VECTOR_LOC): Removed.
2469 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2470 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2471 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2472 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2473 latter. Changed use in eq.c.
2474
f01fe441
MV
24752005-01-07 Marius Vollmer <mvo@zagadka.de>
2476
2477 Make the uniform vector routines also deal with one dimensional
2478 arrays.
2479
2480 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2481 SCM_SMOB_PREDICATE in this file.
2482 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2483 of the right type.
2484 (scm_is_uniform_vector): Likewise.
2485 (uvec_fast_ref): Made BASE param const.
2486 (uvec_writable_elements, uvec_elements): New.
2487 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2488 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2489 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2490 arrays.
2491 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2492 argument convention.
2493 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2494 checking.
2495 (scm_uniform_vector_length): Use uvec_length.
2496
2aaf5726
MV
24972005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2498
2499 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2500 scm_c_uniform_vector_size): Removed.
2501 (scm_array_handle_uniform_element_size): New.
2502
2503
2504 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2505 type of POS parameter to be signed, positions can be negative.
2506 (scm_array_handle_release): New, changed all uses of
2507 scm_t_array_handle to properly call it.
2508 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2509 Renamed former to latter, changed all uses.
2510
34ae52fc
MV
25112005-01-05 Marius Vollmer <mvo@zagadka.de>
2512
2513 Updated bitvector routines to also use scm_t_array_handles.
2514
2515 * unif.h (scm_bitvector_elements,
2516 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2517 deliver offset, length and increment to caller. Changed all uses.
2518 (scm_bitvector_release_elements,
2519 scm_frame_bitvector_release_elements,
2520 scm_bitvector_release_writable_elements,
2521 scm_frame_bitvector_release_writable_elements): Removed.
2522 (scm_array_handle_bit_elements,
2523 scm_array_handle_bit_writable_elements,
2524 scm_array_handle_bit_elements_offset): New.
2525 (scm_make_typed_array): The special value for non-initialized
2526 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2527 was a valid value to fill bitvectors with, so it can't really be
2528 specialed out.
2529
c4cb7628
KR
25302005-01-04 Kevin Ryde <user42@zip.com.au>
2531
2532 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2533 Reported by Bill Schottstaedt.
2534
0356881d
MV
25352005-01-02 Marius Vollmer <mvo@zagadka.de>
2536
2537 * sort.c (quicksort): Added INC parameter for non-contigous
2538 vectors.
2539 (quicksort1): New, for contigous vectors. Both functions are
2540 generated from the same code by including "quicksort.i.c".
2541 (scm_restricted_vector_sort_x): Call one of quicksort and
2542 quicksort1, depending on increment of vector.
2543 (scm_sort): Simply call scm_sort_x on a copy of the list or
2544 vector.
2545 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2546 size_t, added inc parameter.
2547 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2548 so that it doesn't leak.
2549 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2550 list or vector.
2551
2552 * ramap.c (scm_array_map_x): Do not try to convert fill value
2553 before filling, any necessary conversion is done while storing.
2554
2555 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2556 doing it inline.
2557
2558 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2559 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2560 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2561
2562 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2563 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2564 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2565 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2566 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2567 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2568 vector elements API or simple vector API, as appropriate. Removed
2569 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2570 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2571
2572 * srfi-4.h, srfi-4.c,
2573 srfi-4.i.c (scm_array_handle_uniform_elements,
2574 scm_array_handle_uniform_writable_elements,
2575 scm_uniform_vector_elements,
2576 scm_uniform_vector_writable_elements):
2577 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2578 scm_t_array_handle, deliver length and increment.
2579 (scm_array_handle_<foo>_elements,
2580 scm_array_handle_<foo>_writable_elements): New.
2581
2582 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2583 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2584
2585 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2586 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2587 scm_array_handle_set, scm_array_handle_elements
2588 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2589 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2590 scm_dimensions_to_uniform_array): Deprecated for real.
2591 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2592 snarfing wont allow a mismatch between C and Scheme arglists.
2593 (scm_make_shared_array, scm_enclose_array): Correctly use
2594 scm_c_generalized_vector_length instead of
2595 scm_uniform_vector_length.
2596
2597 * validate.h (SCM_VALIDATE_VECTOR,
2598 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2599 of SCM_VECTORP.
2600
2601 * weaks.h, weaks.c: Use new internal weak vector API from
2602 vectors.h.
2603
2604 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2605 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2606 'extra' to being regular sources.
2607 (noinst_HEADERS): Added quicksort.i.c.
2608 * quicksort.i.c: New file.
2609
2610 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2611 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2612 and reimplemented. Replaced all uses with scm_vector_elements,
2613 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2614 appropriate.
2615 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2616 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2617 SCM_SIMPLE_VECTOR_LOC): New.
2618 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2619 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2620 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2621 Removed.
2622 (scm_vector_copy): New.
2623 (scm_vector_elements, scm_vector_writable_elements): Use
2624 scm_t_array_handle, deliver length and increment. Moved to
2625 unif.h. Changed all uses.
2626 (scm_vector_release_elements,
2627 scm_vector_release_writable_elements,
2628 (scm_frame_vector_release_elements,
2629 scm_frame_vector_release_writable_elements): Removed.
2630 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2631 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2632 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2633 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2634 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2635 weak vectors.
2636
0336d18b
MV
26372004-12-29 Marius Vollmer <mvo@zagadka.de>
2638
2639 No longer use creators to specify the type of an array. Creators
2640 expose the fact that arrays are wrapped around vectors, but that
2641 might change.
2642
2643 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2644 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2645 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2646 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2647 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2648 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2649 uvec_proc_vars): Removed.
2650 (scm_i_generalized_vector_creator): Removed.
2651 (scm_i_generalized_vector_type): New.
2652
2653 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2654 scm_make_typed_array, scm_array_type, scm_list_to_array,
2655 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2656 (scm_array_creator): Removed.
2657 (scm_array_p): Deprecated second PROT argument.
2658 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2659 Deprecated, reimplemented in terms of scm_make_typed_array and
2660 scm_list_to_typed_array.
2661 (scm_i_proc_make_vector, scm_i_proc_make_string,
2662 scm_i_proc_make_bitvector): Removed.
2663 (type_creator_table, init_type_creator_table, type_to_creator,
2664 make_typed_vector): New.
2665 (scm_i_convert_old_prototype): Removed.
2666 (prototype_to_type): New.
2667 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2668 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2669 minor added clarity.
2670 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2671 instead of scm_make_uve.
2672 (tag_creator_table, scm_i_tag_to_creator): Removed.
2673 (tag_to_type): New.
2674 (scm_i_read_array): Use scm_list_to_typed_array instead of
2675 scm_list_to_uniform_array.
2676
277e8472
MV
26772004-12-27 Marius Vollmer <mvo@zagadka.de>
2678
32b26202
MV
2679 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2680 (scm_bitvector_writable_elements): New.
2681 (scm_bitvector_release, scm_bitvector_release_elements):
2682 Renamed former to latter. Added explicit call to
2683 scm_remember_upto_here_1.
2684 (scm_frame_bitvector_release,
2685 scm_frame_bitvector_release_elements): Renamed former to latter.
2686 (scm_bitvector_release_writable_elements,
2687 scm_bitvector_release_writable_elements): New.
2688 Changed all uses as required by the changes above.
2689
2690 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2691 scm_u8vector_elements, etc): Made return value "const".
2692 (scm_uniform_vector_writable_elements,
2693 scm_u8vector_writable_elements, etc): New.
2694 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2695 Renamed former to latter. Added explicit call to
2696 scm_remember_upto_here_1.
2697 (scm_frame_uniform_vector_release,
2698 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2699 (scm_uniform_vector_release_writable_elements,
2700 scm_frame_uniform_vector_release_writable_elements): New. Takes
2701 crown of longest identifier yet.
2702 Changed all uses as required by the changes above.
2703
277e8472
MV
2704 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2705 void.
2706 (scm_is_vector, scm_vector_p, scm_vector_length,
2707 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2708 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2709 scm_vector_move_left_x, scm_vector_move_right_x,
2710 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2711 (scm_vector_elements, scm_vector_release_elements,
2712 scm_vector_frame_release_elements, scm_vector_writable_elements,
2713 scm_vector_release_writable_elements,
2714 scm_vector_frame_release_writable_elements): New.
2715 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2716 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2717
2718 * ramap.c (scm_ramapc, scm_raeql): Use
2719 scm_c_generalized_vector_length instead of
2720 scm_uniform_vector_length.
2721 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2722 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2723
49c51610
MV
27242004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2725
2726 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2727 member for relocating debug frames.
2728 (scm_make_continuation): Set it.
2729
2730 * stacks.c (read_frame, read_frames, scm_make_stack,
2731 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2732 of continuations instead of calculating the offset ourselves.
2733 Relocate 'vect' member of scm_t_debug_frame.
2734
3b2ee265
KR
27352004-12-16 Kevin Ryde <user42@zip.com.au>
2736
2737 * ramap.c (scm_array_map_x): Check for at least one source argument.
2738
e120686a
KR
27392004-12-14 Kevin Ryde <user42@zip.com.au>
2740
2741 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2742 the C code so for the final call to the predicate procedure is a tail
2743 call, per SRFI-13 spec.
2744
680b5237
KR
27452004-12-10 Kevin Ryde <user42@zip.com.au>
2746
2747 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2748 recent revision to the reference manual.
2749
2750 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2751 with "%", C99 says it's well-defined.
2752
2753 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2754 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2755 bother trying to fit scm_from_ulong, not really worth the trouble if
2756 addresses are more than 4 bytes usually.
2757
446d320c
KR
27582004-11-30 Kevin Ryde <user42@zip.com.au>
2759
2760 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2761 arm32. Reported by Greg Troxel.
2762
f2654760
MV
27632004-11-14 mvo <mvo@zagadka.de>
2764
2765 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2766
2767 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2768
d550e35f
MV
27692004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2770
2771 Enclosed arrays are now their own smob. This has been done to
2772 make the code more explicit about them and to prepare for the time
f2654760
MV
2773 when generalized vectors include arbitrary one-dimensional
2774 arrays. (Uptonow, enclosed arrays have been recognized by their
2775 use of an array as their storage 'vector'. When all generalized
2776 vectors are allowed as storage, including one-dimensional arrays,
2777 this will no longer work.)
d550e35f
MV
2778
2779 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2780 New.
2781 (exactly_one_third, singp): Removed.
2782 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2783 scm_shared_array_offset, scm_shared_array_increments): Handle
2784 enclosed arrays explicitely.
2785 (scm_array_rank): Likewise. Also, do not return zero for
2786 non-arrays, signal an error instead since arrays with rank zero do
2787 exist.
2788 (scm_i_make_ra): New, for specifying the tag of the new array.
2789 (scm_make_enclosed_array): Use it.
2790 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2791 (scm_make_shared_array): Use scm_c_generalized_vector_length
2792 instead of scm_uniform_vector_length.
2793 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2794 (scm_i_cvref): New, doing the job of scm_cvref.
2795 (scm_cvref): Use scm_i_cvref.
2796 (scm_array_ref): Do not accept non-arrays when no indices are
2797 given. Use scm_i_cvref to do the actual access.
2798 ("uniform-array-set1"): Do not register.
2799 (scm_array_set_x, scm_uniform_array_read_x,
2800 scm_uniform_array_write): Handle enclosed arrays explicitly.
2801 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2802 handle enclosed arrays.
2803 (scm_array_to_list): Handle enclosed arrays explicitly.
2804 (rapr1): Removed.
2805 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2806 enclosed arrays.
2807 (scm_i_print_enclosed_array): New.
2808 (tag_proto_table, tag_creator_table): Renamed former to latter.
2809 Added "a" and "b" for strings and bitvectors, resp.
2810 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2811 latter. Tag "a" is in the table now, no need to handle it as a
2812 legacy tag.
2813 (scm_raprin1): Just call scm_iprin1.
2814 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2815 explicitly.
2816 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2817 Use scm_i_print_array as printer for scm_tc16_array.
2818
2ed34885
MV
28192004-11-10 Marius Vollmer <mvo@zagadka.de>
2820
823086c1
MV
2821 * ramap.c (cind): Changed second arg to be pointer to long instead
2822 of uniform vector.
2823 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 2824 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
2825 (scm_array_index_map_x): Likewise.
2826
2827 * unif.c: Changed all uses of scm_array_prototype to
2828 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2829 prototype is known.
2830 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2831 in terms of scm_uniform_vector_read_x and
2832 scm_uniform_vector_write, respectively. Strings and
2833 bitvector support has been dropped.
2834
2ed34885
MV
2835 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2836 needed files directly. Include config.h, <unistd.h> and <io.h>
2837 when available.
2838 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2839
2c72f253
MV
28402004-11-09 Marius Vollmer <mvo@zagadka.de>
2841
2842 * gh_data.c (gh_uniform_vector_length): Properly use
2843 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2844
3cc0a296
MV
28452004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2846
2847 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2848 New.
2849 (scm_i_uniform_vector_creator): Removed.
2850 (scm_i_generalized_vector_creator): New.
2851 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2852 handle generalized vectors, only uniform numeric vectors.
2853 (alloc_uvec): Do length check here...
2854 (make_uvec): ...but not here.
2855 (coerce_to_uvec): Use new generalized vector functions to handle
2856 all kinds of vectors in one go.
2857
2858 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2859 remaining scm_tc7_unused tags to get a neatly ordered list.
2860
2861 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2862 longer handle scm_tc7_bvect bitvectors.
2863
2864 * ramap.c: Use the new generalized vector functions to handle all
2865 vector like things.
2866
2867 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2868 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2869 scm_generalized_vector_length, scm_generalized_vector_ref,
2870 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2871 scm_is_generalized_vector, scm_c_generalized_vector_length,
2872 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2873 New.
2874
2875 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2876 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2877 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2878 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2879 scm_c_bitvector_length, scm_c_bitvector_ref,
2880 scm_c_bitvector_set_x, scm_bitvector_elements,
2881 scm_bitvector_release, scm_frame_bitvector_release,
2882 scm_tc16_bitvector, bitvector_free, bitvector_print,
2883 bitvector_equalp, count_ones, find_first_one): New.
2884 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2885 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2886 using the new C API for bitvectors and maybe count_ones or
2887 find_first_one, as appropriate.
2888 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2889 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2890 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2891 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2892 new functions from above.
2893 (scm_i_proc_make_vector, scm_i_proc_make_string,
2894 scm_i_proc_make_bitvector): Made non-static for use in
2895 scm_i_generalized_vector_creator.
2896 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2897 (scm_make_uve): Validate that the created object is a generalized
2898 vector.
2899 (scm_i_legacy_tag): Removed.
2900 (scm_i_print_array): Do it here.
2901 (scm_raprin1): Only print enclosed arrays.
2902
2903 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2904
c24d026b
MV
29052004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2906
1f2328fe
MV
2907 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2908 added portability.
2909
2910 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2911 for "space". Thanks to Bruce Korb!
2912
c24d026b
MV
2913 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2914 only after dest has been set. Thanks to Hyper Division!
2915
2916 * gh_data.c (gh_uniform_vector_length): Use
2917 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2918
d4ea47c8
MV
29192004-11-03 Marius Vollmer <mvo@zagadka.de>
2920
2921 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2922 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2923 SCM_SET_UVECTOR_LENGTH): Removed.
2924
236288e2
MV
29252004-11-02 Marius Vollmer <mvo@zagadka.de>
2926
9a5fa6e9 2927 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
2928 Thanks!
2929
2930 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2931 first and the second line of the SCM_DEFINE macro call, since old
2932 preprocessors cannot handle definitions that are split into two
2933 lines.
2934
2935 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2936 declarations.
2937
2938 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2939 scm_t_uint32 to fix the mismatch between the function declaration
2940 and definition.
2941
2942 * sort.c (quicksort): Don't use C99 variable declarations.
2943
2944 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2945 SCM_BOOL_F if no type matches.
2946
2947 * threads.c (thread_print): Cast a pointer to size_t when printing
2948 with scm_uintprint.
2949
2950 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
2951 defined.
2952 (scm_array_prototype): Deprecated.
2953
f738b51d
MV
29542004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2955
5d1015ec
MV
2956 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
2957 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
2958 more efficient access to the u32vector.
2959
034486df
MV
2960 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
2961 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
2962 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
2963
2964 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
2965 instead of the old-style dvectors.
2966
2967 * gh_data.c: Use new-style uniform arrays in place of old-style
2968 ones.
2969
2970 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
2971 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
2972
2973 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
2974 instead of old-sytle uvectors.
2975
2976 * convert.c, convert.i.c: Rewritten completely, using
2977 scm_any_to_u8vector, etc and other new-style uniform vector
2978 functions.
2979
2980 * random.c (scm_random_solid_sphere_x,
2981 scm_random_hollow_sphere_x): Do not validate vector argument, this
2982 is already done elsewhere.
2983
2984 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
2985 scm_any_to_u8vector, etc): New.
2986 (scm_uniform_element_size, scm_uniform_vector_length): Do no
2987 longer handle old-style uniform vectors.
2988
f738b51d
MV
2989 * read.c (scm_lreadr): Bugfix: include the last bit in the
2990 bit vector.
2991
5e9c05a1
MV
29922004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2993
327114a2
MV
2994 * unif.h, unif.c (scm_array_creator): New.
2995 (scm_i_get_old_prototype): New.
2996 (scm_array_prototype): use it to return old-style prototype, never
2997 return creators.
2998 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
2999 arg of SCM_UNDEFINED. The latter is wrong.
3000
5e9c05a1
MV
3001 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3002 (make_uve): Removed.
3003 (scm_i_proc_make_vector, scm_i_proc_make_string,
3004 scm_i_proc_make_u1vector): New.
3005 (scm_init_unif): Initialize them.
3006 (scm_i_convert_old_prototype): New.
3007 (scm_make_uve): Use it to get the creator procedure. Removed all
3008 old code that created old-style uniform vectors.
3009 (scm_array_p): Handle generic vectors.
3010 (scm_dimensions_to_uniform_array): Do not fill new array with
3011 prototype when that is a procedure.
3012 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3013 the NDIM argument.
3014 (scm_i_print_array): Print rank for shared or non-zero-origin
3015 vectors.
3016 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3017 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3018 which I do not understand yet.
3019 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3020
5e9c05a1
MV
3021 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3022 (iflo2str): Use icmplx2str for complex numbers.
3023
3024 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3025 scm_i_uniform_vector_prototype): Removed.
3026 (scm_i_uniform_vector_creator): New.
3027 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3028 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3029 Updated all tables and generic functions to support them.
3030 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3031 (scm_init_srfi_4): Initialize them.
3032
3033 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3034 sizeof(CTYPE) as explained in the comment.
3035
3036 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3037 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3038 'i' and 'e' between introducing numbers and uniform vectors. Do
3039 not call scm_i_read_homogenous_vector, since that is also handled
3040 by scm_i_read_array now.
3041
f984af07
MV
30422004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3043
3044 First cut at integrating uniform vectors from srfi-4 with the rest
3045 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3046 vector. The plan is to gradually replace one type after the other
3047 until none is left and then to consider general cleanups and
3048 optimizations.
3049
3050 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3051
3052 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3053 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3054 scm_uniform_vector_to_list, scm_is_uniform_vector,
3055 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3056 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3057 scm_uniform_vector_release): New.
3058 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3059 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3060 from unif.h, unif.c and extended to handle both the old and new
3061 uniform vectors.
3062
3063 * tags.h (scm_tc7_byvect): Commented out.
3064
3065 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3066 the former to the latter.
3067 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3068 srfi-4.h, srfi-4.c.
3069 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3070 (scm_array_p, scm_array_rank, scm_array_dimensions,
3071 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3072 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3073 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3074 vectors. Removed code for scm_tc7_byvect.
3075 (scm_dimensions_to_uniform_array): Fill array with 0 when
3076 prototype is #\nul.
3077 (scm_i_print_array_dimension, scm_i_legacy_tag,
3078 scm_i_print_array): New.
3079 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3080 for scm_tc7_byvect.
3081
3082 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3083 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3084 uniform vectors. Removed code for scm_tc7_byvect
3085
3086 * print.c (iprin1): Removed code for scm_tc7_byvect.
3087 * objects.c (scm_class_of): Likewise.
3088 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3089 * gc-card.c (scm_i_sweep_card): Likewise.
3090 * evalext.c (scm_self_evaluating_p): Likewise.
3091 * eq.c (scm_equal_p): Likewise.
3092
3093 * gh_data.c (gh_chars2byvect): Reimplemented with
3094 scm_make_s8vector.
3095 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3096
3097 * srfi-4.c (take_uvec): New.
3098 (alloc_uvec): Use it.
3099 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3100
3101 * random.c (vector_scale, vector_scale_x): Renamed former to the
3102 latter, since it modifies its argument.
3103 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3104 Do not use scm_universal_vector_length for non-uniform vectors.
3105 Use scm_f64vector_elements to access innards of uniform vectors.
3106
3107 * convert.i.c: Convert srfi-4 style uniform vectors when
3108 requested.
3109 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3110 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3111
79d52182
MV
31122004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3113
3114 * numbers.h, numbers.c (scm_i_print_double): New.
3115
3116 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3117 ../srfi/ but heavily modified.
3118 * Makefile.am: Add them in all the right places.
3119 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3120 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3121 '#u', and '#s'.
3122
3123 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3124 and made non-static. Changed all uses.
3125
6191ccec
MV
31262004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3127
e64e80b0
MV
3128 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3129 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3130 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3131 scm_uintprint to print unsigned integers, raw heap words, and
3132 adresses, using a cast to scm_t_bits to turn pointers into
3133 integers.
3134
3135 * unif.c: Include "libguile/print.h".
3136
c90ac3a8
MV
3137 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3138 scm_t_intmax values.
3139 (scm_uint2str): New, for scm_t_uintmax.
3140 (scm_iint2str): Argument type changed to scm_t_intmax,
3141 reimplemented in terms of scm_uint2str.
3142
3143 * print.c, print.h (scm_uintprint): New, for printing
3144 scm_t_uintmax values.
3145 (scm_intprint): Argument type changed to scm_t_intmax.
3146
77c2594f
MV
3147 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3148 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3149 strategic places so that the loops can be interrupted.
3150
6191ccec
MV
3151 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3152 "-I$(top_srcdir)/libguile-ltdl".
3153 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3154 "../libguile-ltdl/libguile-ltdl.a".
3155
3156 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3157 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3158 instead of <libguile-ltdl.h>.
3159
77600f3e
MV
31602004-10-20 Marius Vollmer <mvo@zagadka.de>
3161
3162 * sort.c (quicksort): Copy pivot out of the array while
3163 constructing the partitions; it could get overwritten otherwise.
3164 Because of the ultimate insertion sort, this bug did not cause
3165 quicksort to fail, it just put all the burdon on the insertion
3166 sort and was thus very slow. Thanks to Rolan Orre for reporting
3167 the slowness!
3168
5000379b
MV
31692004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3170
192cd792
MV
3171 * numbers.c (scm_i_range_error): New.
3172 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3173 scm_out_of_range.
3174
3175 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3176 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3177
3178 * unif.c (scm_array_p): When no prototype is given, explicitely
3179 test for allowable types, do not simply return true. Thanks to
3180 Roland Orre for reporting this!
3181
5000379b
MV
3182 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3183
3184 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3185 segment to scm_max_segment_size.
3186
497eb0b7
HWN
31872004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3188
1367aa5e
HWN
3189 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3190
497eb0b7
HWN
3191 * inline.h (scm_double_cell): abort if GC running.
3192 (scm_cell): idem.
3193
aef0bdb4
MV
31942004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3195
3196 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3197 pos == 0.
3198
3199 Keywords no longer store a 'dash symbol'. Instead, they store a
3200 symbol with their real name.
3201
3202 * keywords.h, keywords.c, deprecated.h, deprecated.c
3203 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3204 terms of scm_is_keyword and scm_keyword_dash_symbol.
3205
3206 * keywords.h, keywords.c, discouraged.h, discouraged.c
3207 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3208 scm_c_make_keyword): Discouraged.
3209
3210 * keywords.h, keywords.c (scm_symbol_to_keyword,
3211 scm_keyword_to_symbol): Implemented in C.
3212 (scm_is_keyword, scm_from_locale_keyword,
3213 scm_from_locale_keywordn): New.
3214
3215 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3216
3217 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3218 scm_from_locale_keyword instead of scm_c_make_keyword.
3219
3220 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3221 better error message.
3222
3223 * deprecated.c: Include discouraged.h and keywords.h.
3224
3225 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3226 reading '#:' or ':'. See NEWS for consequences.
3227
818deb11
MV
32282004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3229
43c25626
MV
3230 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3231 literals are now read-write again (until SCM_STRING_CHARS is
3232 removed).
3233
3234 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3235 strings with an error message that blames SCM_STRING_CHARS.
3236
3237 * options.c (change_option_setting): Use scm_car instead of
3238 explicit type check plus SCM_CAR.
3239
3240 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3241 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3242 (scm_iprin1): Use them instead of the previoulsy hardcoded
3243 strings.
3244 (scm_init_print): Initialize them.
3245
3246 * backtrace.c (display_frame_expr): Do not remove control
3247 characters from the final string. Print it directly using
3248 scm_display.
3249
818deb11
MV
3250 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3251 Thanks to Roland Orre!
3252
d748089e
KR
32532004-09-29 Kevin Ryde <user42@zip.com.au>
3254
3255 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3256 be whole original string in match struct, not offsetted substring.
3257
0ff7e3ff
HWN
32582004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3259
3260 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3261
ad7de4b8
MV
32622004-09-24 Marius Vollmer <mvo@zagadka.de>
3263
2edf319f
MV
3264 * Makefile.am (EXTRA_DIST): Added gettext.h.
3265
d180337b
MV
3266 * smob.c, smob.h (scm_assert_smob_type): New.
3267
05d7cf89 3268 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3269 Include GUILE_CFLAGS.
3270 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3271 now.
3272 (libpath.h): Put GUILE_CFLAGS in the build-info.
3273
c9fedf8a
MV
32742004-09-23 Marius Vollmer <mvo@zagadka.de>
3275
3276 * print.h (scm_print_state): Added highlight_objects.
3277 * print.c (make_print_state, scm_free_print_state): Initialize it
3278 to SCM_EOL.
3279 (scm_iprin1): Wrap output in '{...}' when object is contained in
3280 highlight_objects.
3281
3282 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3283 scm_backtrace_with_highlights): New. Set highlight_objects of
3284 printstate.
3285
3286 * error.c (scm_error_scm): Document new meaning of data/rest
3287 argument for out-of-range and wrong-type-arg errors.
3288 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3289 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3290 exception so that it gets highlighted in the backtrace.
3291 Don't talk about "argument" when not giving a position.
3292
3293 * throw.c (handler_message): The rest argument is the fourth
3294 argument, not everything after the third. Call
3295 scm_display_backtrace_with_highlights, passing the rest argument
3296 when appropriate.
3297
d5ac9b2a
MV
32982004-09-22 Marius Vollmer <mvo@zagadka.de>
3299
3300 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3301 <bruno@clisp.org>:
3302
3303 * i18n.c: Handle --disable-nls (thanks Bruno).
3304
3305 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3306 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3307
3308 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3309 LC categories.
05d7cf89 3310 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3311
3312 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3313 scm_bind_textdomain_codeset): Make wrappers similar to C function
3314 they wrap.
3315
3316 * i18n.h: New file.
3317 * i18n.c: New file.
3318 * gettext.h: New file, taken from GNU gettext.
3319 * init.c: Include libguile/i18n.h.
3320 (scm_init_guile_1): Add call to scm_init_i18n().
3321 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3322 (DOT_X_FILES): Add i18n.x.
3323 (DOT_DOC_FILES): Add i18n.doc.
3324 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3325 (modinclude_HEADERS): Add i18n.h.
3326
d2e53ed6
MV
33272004-09-22 Marius Vollmer <mvo@zagadka.de>
3328
2cdfe016
MV
3329 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3330
d2e53ed6
MV
3331 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3332 discouraged.h. Replaced all uses with scm_is_pair.
3333 (SCM_I_CONSP): New name for SCM_CONSP.
3334
3335 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3336 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3337 scm_cadr, etc): New.
3338 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3339 uses with scm_is_null.
5dd82006 3340
d2e53ed6
MV
3341 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3342 instead of explicit code.
5dd82006 3343
5dfdf243
MV
33442004-09-22 Marius Vollmer <mvo@zagadka.de>
3345
b50c53e5
MV
3346 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3347 Reworded logic a bit so that #f is returned immediately when s1 is
3348 too short to contain s2.
3349
5dfdf243 3350 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3351 zero-terminated locale string before matching against it.
5dfdf243
MV
3352
3353 * strings.h, strings.c (scm_substring_read_only,
3354 scm_c_substring_read_only, scm_i_substring_read_only): New.
3355 (RO_STRING_TAG, IS_RO_STRING): New.
3356 (scm_i_string_writable_chars): Bail on read-only strings.
3357
3358 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3359 literals, thus making them read-only as specified by R5RS.
3360
22ab5ba3
MV
33612004-09-22 Marius Vollmer <mvo@zagadka.de>
3362
3363 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3364 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3365
2663421c
MV
33662004-09-21 Marius Vollmer <mvo@zagadka.de>
3367
0d83cb90
MV
3368 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3369 numbers.c.
3370 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3371 Thanks to Andreas Vögele!
0d83cb90 3372
2663421c
MV
3373 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3374 just on a line of its own.
3375
3376 * srfi-13.c (scm_string_any, scm_string_every,
3377 scm_string_tabulate, string_upcase_x, string_down_case_x,
3378 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3379 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3380 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3381 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3382 indices, which can also be negative.
3383
b00b73f9
MV
33842004-09-20 Marius Vollmer <mvo@zagadka.de>
3385
3386 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3387
3388 * threads.c (scm_threads_mark_stacks): Call
3389 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3390 only used once.
3391
adba74f3
HWN
33922004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3393
05d7cf89 3394 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3395 Bugfix: when subtracting unsigned values, make sure that result
3396 does not wrap.
3397
f6de32c8
KR
33982004-09-09 Kevin Ryde <user42@zip.com.au>
3399
3400 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3401 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3402 by Andreas Vögele.
f6de32c8 3403
e548be5f
MV
34042004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3405
eb8d0af1
MV
3406 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3407
e548be5f
MV
3408 * eq.c (real_eqv): Pretend that all NaNs are equal.
3409
3410 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3411
e7acba81
MV
34122004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3413
874fbad1
MV
3414 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3415 use size_t for some locals instead of int.
3416
e7acba81
MV
3417 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3418 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3419 (skip_scsh_block_comment): Use scm_input_error instead of
3420 scm_misc_error in case of EOF.
3421
5de12658
KR
34222004-09-07 Kevin Ryde <user42@zip.com.au>
3423
3424 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3425 Bug report by Bill Schottstaedt.
3426
3427 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3428 column.
3429 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3430
3431 * posix.c (scm_access): Update docstring per manual.
3432
3433 * posix.c (scm_nice): Correction to error detection. Reported by
3434 Matthias Koeppe.
3435
3436 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3437 throw error before unlocking mutex with SCM_ALLOW_INTS.
3438
e227addf
KR
34392004-09-06 Kevin Ryde <user42@zip.com.au>
3440
3441 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3442 available. This also gets around CLK_TCK being absent when
3443 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3444
edea856c
SJ
34452004-09-03 Stefan Jahn <stefan@lkcc.org>
3446
3447 * threads.c (scm_threads_mark_stacks): Fixed local variable
3448 definitions.
3449
e7acba81 3450 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3451 local variable definitions.
3452
3453 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3454 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3455 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3456 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3457 scm_makfrom0str().
3458
874fbad1 3459 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3460 part.
3461
3462 * numbers.c (scm_init_numbers): Removed check_sanity() call
3463 inside GUILE_DEBUG. The function has been removed somewhen...
3464
3465 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3466 MinGW32 because it conflicts with its pthread headers.
3467
d9eb2d67
MV
34682004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3469
3470 * strings.c (SCM_STRINGP): Accept all strings.
3471 (SCM_STRING_CHARS): Reject shared substrings here.
3472
3473 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3474 the Copyright years.
3475
c495c342
KR
34762004-08-27 Kevin Ryde <user42@zip.com.au>
3477
3478 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3479 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3480 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3481
57aa5515
MV
34822004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3483
3484 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3485 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3486 scm_i_symbol_is_interned, scm_i_mem2symbol,
3487 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3488
ce25760f
MV
34892004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3490
19ff6ffc
MV
3491 * srfi-13.c: First cut at thread-safeness and proper use of
3492 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3493 been inserted. Made sure that no internal string pointer is used
3494 across a SCM_TICK or a possible GC.
3495
ce25760f
MV
3496 * script.c (scm_compile_shell_switches): Use
3497 scm_from_locale_string instead of scm_makfrom0str.
3498
3499 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3500 always been.
3501
c5080b51
MV
35022004-08-25 Marius Vollmer <mvo@zagadka.de>
3503
3504 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3505 strop.c.
3506
3507 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3508 * strop.h, strop.c: Removed, they are now empty.
3509 * Makefile.am: Updated for new and removed files.
3510
3511 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3512 to scm_string_to_symbol.
3513
3514 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3515 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3516 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3517 charset instead of libc functions.
3518
3519 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3520 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3521 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3522 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3523 instead of explicit code.
3524
3525 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3526 "srfi-13.h" instead of "strop.h".
3527
3528 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3529 scm_init_srfi_14. Do not call scm_init_strop.
3530
4b0d27f2
MV
35312004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3532
3533 * numbers.c (scm_inf_p): Synced docstring back from manual.
3534
3ece39d6
MV
35352004-08-22 Marius Vollmer <mvo@zagadka.de>
3536
3537 * strings.c (get_str_buf_start): New helper function.
3538 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3539 scm_i_string_char, scm_i_string_writable_chars): Use it.
3540 (scm_i_substring_copy): Make START argument optional for C
3541 callers, for upcoming SRFI-13 integration.
3542
35432004-08-21 Marius Vollmer <mvo@zagadka.de>
3544
3545 From Richard Todd, Thanks!
3546
3547 * script.c (scm_compile_shell_switches): added '-L' switch to add
3548 to the %load-path.
3549
5fa0939c
DH
35502004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3551
3552 * eval.c (unmemoize_exprs): When dropping internal body markers
3553 from the output during unmemoization, also drop those that are not
3554 immediately at the beginning of a body.
3555
2146fdeb
MV
35562004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3557
c1f54b3d
MV
3558 * eval.c (scm_lookupcar1): Report "Variable used before given a
3559 value" insetad of an "Unbound" one for variables that are found
3560 but still contain SCM_UNDEFINED.
2146fdeb
MV
3561
3562 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3563 expects a null-terminated string in the locale encoding, but
3564 scm_i_string_writable_chars doesn't give that. Fixed by letting
3565 mkstemp modify a locale version of the tmpl argument and copying
3566 the result back into tmpl.
3567
3568 * strop.c (scm_substring_move_x): Store into str2, not str1.
3569
d4f76919
KR
35702004-08-20 Kevin Ryde <user42@zip.com.au>
3571
3572 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3573 to modify the input string.
3574
b5247a6b
MV
35752004-08-19 Marius Vollmer <mvo@zagadka.de>
3576
3577 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3578 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3579 scm_c_symbol_length.
3580
f26b9395
MV
35812004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3582
3583 New string implementation, with copy-on-write strings and
3584 mutation-sharing substrings, and a new internal string API.
3585 Symbols can now share memory with strings.
3586
3587 * tags.h (scm_tc7_stringbuf): New tag.
3588
3589 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3590 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3591 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3592 uses.
3593 (scm_i_make_string, scm_c_make_string): New, to replace
3594 scm_allocate_string. Updated all uses.
3595 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3596 SCM_STRING_LENGTH): Deprecated.
3597 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3598 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3599 Discouraged. Replaced all uses with scm_from_locale_string or
3600 similar, as appropriate.
3601 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3602 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3603 scm_substring_shared, scm_substring_copy): New.
3604
3605 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3606 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3607 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3608 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3609 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3610 Deprecated.
3611 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3612 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3613 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3614 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3615 Updated all uses.
3616 (scm_gensym): Generate only the number suffix in the buffer, just
3617 string-append the prefix.
3618
3619 * error.c (scm_memory_error): Do not try to throw, just abort.
3620 Throwing will not work anyway.
3621
3622 * gh.h, gh-data.c (gh_set_substr): Made src const.
3623
3624 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3625 (scm_mode_bits): Use it.
3626 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3627 a vector normally and fill that instead of consing a list with a
3628 blocked GC.
3629
3630 * read.c (scm_i_casei_streq): New, for counted strings.
3631
3632 * threads.c (gc_section_count): Removed, thread-sleeping can not
3633 be nested.
3634 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3635 admin mutex so that we can be put to sleep by other threads while
3636 blocking on that mutex. Lock all the heap mutex of all threads,
3637 including ourselves.
3638 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3639 call scm_i_enter_guile.
3640 (scm_thread_mark_stacks): Expect all threads to be suspended.
3641
3642 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3643 scm_gc_mallocated, for now.
3644 (scm_init_storage): Initialize it.
3645 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3646
3647 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3648 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3649 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3650 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3651
cd505b38
MV
3652 * strop.c (scm_string_copy): Use scm_c_substring to get a
3653 copy-on-write string.
3654
8a807b26
KR
36552004-08-18 Kevin Ryde <user42@zip.com.au>
3656
3657 * arbiters.c (FETCH_STORE): New macro.
3658 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3659 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3660 scm_try_arbiter and scm_release_arbiter.
3661 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3662 for speed on i386, otherwise using mutex.
3663
3664 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3665 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3666 exact and inexact is #f.)
3667
3668 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3669 to get thread safety of scm_ttyname.
3670
3671 * ports.c (ttyname): Remove prototype, unused.
3672
d6cd4c36 3673 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3674 Reported by Michael Tuexen.
d6cd4c36 3675
fa0c0a4b
MV
36762004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3677
3678 * load.c (scm_init_load_path): Do not pass NULL to
3679 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3680 not set. Thanks to Bill Schottstaedt.
3681
70f7ee41
MV
36822004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3683
3684 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3685 locale strings instead of accessing their internals.
3686 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3687 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3688 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3689
3690 * simpos.c (scm_system): Convert SCM strings to locale strings
3691 instead of accessing their internals.
3692
3693 * script.c (scm_compile_shell_switches): Convert version to locale
3694 string before printing it.
3695
3696 * rdelim.c (scm_read_delimited_x): Avoid
3697 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3698 of scm_from_long for the returned number of read characters.
3699
3700 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3701 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3702
3703 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3704 Use them instead of SCM_SYSCALL when one or two strings need to be
3705 converted into locale strings.
3706 (my_rename): New, gathers platform dependent code for renaming.
3707 (scm_rename): Use it.
3708 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3709 strings instead of accessing their internals.
3710 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3711 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3712 SCM_STRING_LENGTH.
3713
3714 * extensions.c (load_extension): Convert lib and init to locale
3715 strings instead of accessing the internals directly.
3716 (scm_c_load_extension): Use scm_from_locale_string instead of
3717 scm_makfrom0str.
3718
3719 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3720 scm_fdes_to_port, but take mode bits directly instead of as a C
3721 string.
3722 (scm_i_fdes_to_port): Implement using above.
3723 (scm_open_file): Use scm_i_fdes_to_port together with
3724 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3725 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3726 with scm_i_mode_bits to avoid accessing internals of SCM string
3727 from C.
3728
3729 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3730 SCM string as argument.
3731
3732 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3733 bits directly instead of C string.
3734 (scm_void_port): Implement using above.
3735 (scm_sys_make_void_port): Use scm_i_void_port together with
3736 scm_i_mode_bits to avoid accessing internals of SCM string.
3737
3738 * strings.h, strings.c (scm_i_get_substring_spec): New.
3739
3740 * socket.c, rw.c, deprecated.h, validate.h
3741 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3742 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3743 scm_to_locale_string, etc.
3744 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3745 above, plus scm_i_get_substring_spec.
3746
3747 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3748 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3749 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3750 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3751 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3752 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3753 with more explicit scm_remember_upto_here_1, etc, or introduced
3754 them in the first place.
3755
3756 * posix.c (WITH_STRING): New helper macro. Use it where one
3757 locale string is needed for a short piece of code.
3758 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3759 when one locale string is needed.
3760 (scm_mkstemp): Convert tmpl to a locale string.
3761 (scm_putenv): Rewritten to use only C strings.
3762 (scm_setlocale, scm_crpt): Convert argument strings to locale
3763 strings.
3764
37652004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3766
3767 * load.c (scm_primitive_load_path): Do not check for absolute
3768 filenames when scm_sys_search_load_path returns false, which will
3769 return absolute filenames unchanged.
3770
bb26cc2d
MV
37712004-08-11 Marius Vollmer <mvo@zagadka.de>
3772
3773 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3774 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3775 of an alist. Thanks to Matthias Koeppe!
3776
02573e4c
MV
37772004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3778
3779 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3780 Moved from string.h to deprecated.h.
3781
3782 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3783
f9751e86 3784 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
3785 SCM_I_MAKE_STRING_TAG, changed all uses.
3786 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3787 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3788 respectively. For a short time, the old names are still there as
3789 aliases. Not all uses have been changed yet, but the ones in
3790 strings.c have.
3791 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3792 SCM_T_BITS_MAX.
3793 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3794 scm_take_locale_string, scm_take_locale_stringn,
3795 scm_to_locale_string, scm_to_locale_stringn,
3796 scm_to_locale_stringbuf): New.
3797 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3798 deprecated.[hc]. Implemented in terms of the new functions above.
3799 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3800 scm_makfrom0str): Reimplemented in terms of the new functions from
3801 above. They will be discouraged shortly.
3802 (scm_substring): Do not use scm_mem2string.
3803 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3804 to replace similar code from posix.c, simpos.c, and dynl.c.
3805 (scm_string_append): Use memcpy instead of explicit loop. Do not
3806 use register keyword. Use plain 'char' instead of 'unsigned
3807 char'.
3808
3809 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3810 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3811
3812 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3813 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3814 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3815 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3816
3817 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3818 string. This avoids a conversion round-trip.
3819
3820 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3821 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3822 SCM_I_STRING_LENGTH, respectively.
3823 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3824
3825 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3826 of a string, call scm_display on the string itself.
3827
3828 * dynwind.c, dynwind.h (scm_frame_free): New.
3829
3830 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3831 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3832 Replaced uses of SCM_STRING_CHARS with proper uses of
3833 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3834 Replaced scm_mem2string with scm_from_locale_string.
3835
3836 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3837 Removed, replaced all uses with scm_i_allocate_string_pointers.
3838
3839 * load.h, load.c (scm_internal_parse_path): Removed.
3840 (scm_parse_path): Use scm_string_split to do the work.
3841 (scm_init_load_path): Use scm_parse_path instead of
3842 scm_internal_parse_path.
3843 (scm_search_path): Rewritten string handling part of the code in
3844 terms of scm_to_locale_stringbuf and so that it is thread safe.
3845
3846 * error.c (scm_error_scm): Throw directly instead of calling
3847 scm_error, this avoids the back and forth conversion of SUBR and
3848 MESSAGE and also plugs a memory leak.
3849 (scm_error): Call scm_error_scm.
3850
3851 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3852 (display_header): Print FNAME when it is true, not
3853 merely when it is a string.
3854
3855 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3856 unceremoniously. They were unused by Guile itself, and external
3857 use should stop immediately.
3858
3859
409eb4e5
MV
38602004-08-10 Marius Vollmer <mvo@zagadka.de>
3861
3862 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3863 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3864 deprecated versions installed in deprecated.h and deprecated.c.
3865 Changed all uses.
3866
a00eaf19
RB
38672004-08-06 Rob Browning <rlb@defaultvalue.org>
3868
3869 * net_db.c (scm_resolv_error): don't cause an exception while
3870 trying to throw an exception -- call scm_misc_error with correct
3871 arguments. The previous arguments needed a format escape that
3872 wasn't in any of the format strings.
3873
bcb88c93
KR
38742004-08-06 Kevin Ryde <user42@zip.com.au>
3875
8f094b97
KR
3876 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3877 so as not to depend on signedness of plain char. For byvect range
3878 check, throw out-of-range rather than wrong-type-arg.
3879
bcb88c93
KR
3880 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3881 signed byte range checks by using scm_to_schar and scm_from_schar,
3882 don't want to depend on signedness of C char.
3883
29e61124
KR
38842004-08-05 Kevin Ryde <user42@zip.com.au>
3885
3886 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3887 SCM_DEFER_INTS.
3888 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3889 guaranteed if multiple threads compete to unlock.
3890 Update docstrings per doc/ref/api-scheduling.texi.
3891
99de794f
KR
3892 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3893 stat on the filename, to be certain a file rename can't mean we get
3894 info on one filesystem object but open another. This fstat usage is
3895 similar to Emacs copy-file.
3896
29e61124
KR
3897 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3898
3899 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3900 SIGINT and SIGQUIT, since those values are ints.
3901
759aa8f9
MV
39022004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3903
7241f213
MV
3904 * num2integral.i.c, num2float.i.c: Removed.
3905 * Makefile.am (noinst_HEADERS): Updated.
3906
f9656a9f
MV
3907 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3908 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
3909 (scm_complex_p): New, export as "complex?" to Scheme.
3910 (scm_number_p): Export as "number?" to Scheme.
3911 (scm_is_complex, scm_is_number): New.
3912 (scm_c_make_rectangular, scm_c_make_polar): New.
3913 (scm_make_rectangular, scm_make_polar): Use above.
3914 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3915 New.
3916 (scm_make_complex): Discouraged by moving to discouraged.h and
3917 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3918
759aa8f9
MV
3919 * discouraged.h, discouraged.c, numbers.c, numbers.h
3920 (scm_is_rational): New.
3921 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3922 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3923 Removed prototypes.
3924 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3925 Discouraged by moving to discouraged.h and discouraged.c.
3926 Replaced all uses with scm_from_double.
3927 (scm_num2float, scm_num2double): Discouraged by moving prototype
3928 to discouraged.h and rewriting in terms of scm_to_double.
3929 Replaced all uses with scm_to_double.
3930 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3931 explicit code.
3932 (scm_from_double): Do not implement in terms of scm_make_real, use
3933 explicit code.
3934
531bf3e6
MV
39352004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3936
759aa8f9
MV
3937 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3938
531bf3e6
MV
3939 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3940 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3941
3942 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3943 Renamed to SCM_I_* in order to avoid collisions with the versions
3944 defined in deprecated.h.
3945
3946 * discouraged.h, discouraged.c: New files.
3947
3948 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
3949 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
3950 deprecated to being discouraged by moving to discouraged.h.
3951
3952 * numbers.h, numbers.c, discouraged.h, discouraged.c
3953 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
3954 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
3955 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
3956 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
3957 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
3958 scm_num2ulong_long): Discouraged by moving to discouraged.h and
3959 discouraged.c and reimplementing in terms of scm_from_* and
3960 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
3961 functions.
3962
3963 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
3964 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
3965 scm_i_size2big, scm_i_ptrdiff2big): Removed.
3966 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
3967 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
3968 explicit code.
3969
5ec82e96
KR
39702004-08-02 Kevin Ryde <user42@zip.com.au>
3971
3972 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
3973 and current usage and migration.
3974
58f28989
KR
39752004-07-31 Kevin Ryde <user42@zip.com.au>
3976
3977 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
3978 it's not thread safe.
3979 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
3980 advantage of this.
3981 * fports.c (scm_open_file): Use scm_strerror likewise.
3982 * filesys.c (scm_stat, scm_lstat): Ditto.
3983
3984 * filesys.c (scm_copy_file): Avoid fd leak when destination file
3985 cannot be opened.
3986
3987 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
3988 update, for thread safety.
3989 (gensym_counter): Move into scm_gensym which is its only user.
3990 (scm_init_symbols): No need to explicitly initialize gensym_counter.
3991
03696aab
MV
39922004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3993
51fdb325
MV
3994 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
3995 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
3996 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
3997 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
3998 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
3999 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4000 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4001 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4002 defined in terms of scm_to_signed_integer, etc, but in terms of
4003 scm_to_int8, etc.
4004
4005 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4006
03696aab
MV
4007 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4008 no longer used.
4009
4010 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4011 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4012
4013 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4014 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4015 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4016 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4017 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4018 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4019 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4020
4021 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4022 the functions below.
4023
4024 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4025 conv-uinteger.i.c.
4026
4027 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4028 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4029 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4030 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4031 scm_from_uint64): Turned from macros into proper functions.
4032 (scm_to_signed_integer, scm_to_unsigned_integer,
4033 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4034 conv-integer.i.c and conv-uinteger.i.c, as well.
4035
4036 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4037 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4038 the limits. Those are always defined.
4039
1f15779e
KR
40402004-07-29 Kevin Ryde <user42@zip.com.au>
4041
4042 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4043
48360eb3
KR
40442004-07-28 Kevin Ryde <user42@zip.com.au>
4045
4046 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4047 safety.
4048
c3f3c841
KR
4049 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4050 consistency with other vector types and to get arg and func name into
4051 error message.
4052
c82f8ed6
MV
40532004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4054
4055 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4056 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4057 scm_from_bool, respectively.
4058 (SCM_NINUMP): Added.
4059
4060 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4061 deprecated.h. Replaced all uses with scm_is_eq.
4062
317b4c4a
KR
40632004-07-24 Kevin Ryde <user42@zip.com.au>
4064
4065 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4066 * posix.c (scm_crypt): Use it to protect static data in crypt().
4067
e11e83f3
MV
40682004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4069
4070 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4071 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4072 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4073 versions to deprecated.h and deprecated.c. Changed all uses to
4074 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4075 scm_from_*, as appropriate.
4076
4077 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4078 the unexisting scm_cross_dynwind_binding_scope for inums on the
4079 windlist.
4080
a55c2b68
MV
40812004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4082
4083 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4084 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4085 byte-wise address to a SCM integer. Changed all uses.
4086 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4087 scm_to_ipv6 and added type and range checking, for converting from
4088 an IPv& byte-wise address to a SCM integer. Changed all uses.
4089 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4090 is now done by scm_to_ipv6.
4091
4092 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4093 not accept inexact integers.
4094
4095 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4096 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4097 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4098 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4099 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4100 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4101 fixnum/bignum distinction visible. Changed all uses to
4102 scm_to_size_t or similar.
4103
41042004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4105
4106 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4107
48a06bd5
KR
41082004-07-10 Kevin Ryde <user42@zip.com.au>
4109
4110 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4111 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4112 such a size causes divide-by-zeros in scm_hasher.
4113
052fbfd9
KR
4114 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4115 leak.
4116
43240c9c
MV
41172004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4118
4119 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4120 Rewritten using the same logic as scm_to_signed_integer and
4121 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4122 use CHAR_BIT instead of hardcoding 8.
4123 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4124 SCM_I_LLONG_MIN etc. instead.
4125
4126 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4127 SCM_I_MAKINUM and changed all uses.
4128 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4129
a3de8e7b
MV
4130 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4131 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4132 them by assuming twos-complement.
4133
c9eb03bb
MV
41342004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4135
4136 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4137 configure now produces.
4138 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4139 definitions, giving the limits of the integer types defined by
4140 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4141 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4142
4143 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4144 SHORT_MIN.
4145 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4146 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4147 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4148 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4149 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4150 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4151 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4152 scm_from_uintmax): New.
4153
7888309b
MV
41542004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4155
4156 * tags.h (scm_is_eq): New.
4157
4158 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4159 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4160 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4161 scm_from_bool, and scm_is_bool, respectively.
4162
4163 * boolean.h (scm_is_bool): Fix bug in prototype.
4164 (scm_from_bool): The argument is "x" not "f", stupid.
4165
4166 * boolean.c (scm_is_bool): Fix typo.
4167
4168 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4169 scm_is_unsigned_integer, scm_to_signed_integer,
4170 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4171 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4172 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4173 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4174 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4175 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4176 New.
4177
800570a6
MV
41782004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4179
4180 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4181 scm_to_bool): New.
4182
9fcf3cbb
DH
41832004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4184
4185 * backtrace.c (display_expression, display_frame): Call
4186 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4187 single memoized expression.
4188
4189 * debug.c (memoized_print): Don't try to unmemoize the memoized
4190 object, since we can't know whether it holds a single expression
4191 or a body.
4192
4193 (scm_mem_to_proc): Removed check for lambda expression, since it
4194 was moot anyway. Whoever uses these functions for debugging
4195 purposes should know what they do: Creating invalid memoized code
4196 will cause crashes, independent of whether this check is present
4197 or not.
4198
4199 (scm_proc_to_mem): Take the closure's code as it is and don't
4200 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4201 memoized code should not be modified.
4202
4203 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4204 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4205 available as a guile internal function instead. However,
4206 scm_i_unmemoize_expr will only work on memoized objects that hold
4207 a single memoized expression. It won't work with bodies.
4208
4209 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4210 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4211 i. e. a list of expressions.
4212
4213 * eval.c (unmemoize_exprs): Drop internal body markers from the
4214 output during unmemoization.
4215
4216 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4217 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4218 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4219 as guile internal functions instead. scm_i_unmemoize_expr will
4220 only work on a single memoized expression, while
4221 scm_i_unmemocopy_body will only work on bodies.
4222
90df793f
DH
42232004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4224
4225 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4226
4227 (scm_cons_source, scm_primitive_eval): Prefer higher level
4228 predicate SCM_FALSEP over SCM_IMP.
4229
8048c00b
RB
42302004-06-15 Rob Browning <rlb@defaultvalue.org>
4231
4232 * script.c (scm_shell_usage): minor phrasing change.
4233
4234 * gc_os_dep.c: update ifdefery for macosx.
4235 (scm_get_stack_base): separate result initialization from
4236 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4237 3.3. Thanks to Andreas Vögele.
8048c00b 4238
d93294d4
HWN
42392004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4240
4241 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4242
212e58ed
DH
42432004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4244
4245 * list.[ch] (scm_i_finite_list_copy): New internal function to
4246 copy lists that are known to be finite (though not necessarily
4247 proper).
4248
4249 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4250 a closure's argument list like an expression of a body.
4251
4252 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4253 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4254 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4255 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4256 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4257 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4258 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4259 unmemoize_builtin_macro): New static functions and symbols.
4260
4261 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4262 now has a slightly different meaning: The memoized form that is
4263 receives as its argument is now interpreted as a sequence of
4264 expressions from a body.
4265
4266 (unmemocar, scm_unmemocar): Since the whole functionality of
4267 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4268 has its old content back and is deprecated, while unmemocar has
4269 been removed.
4270
4271 (SCM_BIT7): Removed.
4272
4273 (CEVAL): For unmemoizing a single expression, call
4274 unmemoize_expression instead of scm_unmemocopy, which now expects
4275 a sequence of body expressions. Eliminated unnecessary empty
4276 environment frame when executing let* forms. Eliminated
4277 unmemoization step from evaluator.
4278
9ccea370
MV
42792004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4280
4281 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4282 macroexp and made static. Added new version of scm_macroexp that
4283 emits a deprecation warning and then calls macroexp.
4284 (scm_m_undefine): Issue deprecation warning.
4285
57d23e25
DH
42862004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4287
4288 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4289 Modified to make set! work on symbols that represent syntactic
4290 keywords.
4291
141521ad
HWN
42922004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4293
4294 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4295 compound expression as lvalue errors.
4296
7c2f56a4
MV
42972004-05-24 Marius Vollmer <mvo@zagadka.de>
4298
4299 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4300 WINDER_DATA to a SCM.
4301
366ecaec
DH
43022004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4303
4304 * goops.c (compute_getters_n_setters, create_standard_classes,
4305 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4306 lambda expression rather than creating them with scm_closure.
4307
26ecfa39
DH
43082004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4309
4310 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4311 misplaced syntactic keywords. This will not work unless guile's
4312 defmacro feature is deprecated.
4313
4314 (scm_m_case): Fixed a bug that caused the list of labels to grow
4315 with every case form.
4316
f865229a
KR
43172004-05-19 Kevin Ryde <user42@zip.com.au>
4318
4319 * numbers.c (scm_round_number): For inum and big, just return x. For
4320 real, use scm_round for 2^54-1 etc problems covered there.
4321
4322 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4323 doesn't provide trunc. This was for when `truncate' was done as a
4324 scm_tc7_dsubr, no longer required.
4325
4326 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4327 to stack marking call, two parameters and no cast on t->base.
4328
63947c7a
MV
43292004-05-18 Marius Vollmer <mvo@zagadka.de>
4330
4331 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4332 processed hashtables back into the weak_hashtables list. Thanks
4333 to Bill Schottstaedt!
4334
e7313a9d
DH
43352004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4336
4337 * eval.c (unmemoize_quote): New static function.
4338
4339 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4340 representation of 'quote' and '@slot-ref' to an improper list.
4341 This reduces execution time, the number of cells used to hold the
4342 memoized code, and thus also reduces garbage collection time.
4343
4344 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4345
4346 (SCM_CEVAL): Changed macro handling to also work with macros that
4347 return improper lists. Added an assertion, that the code returned
4348 by a macro transformer will not lead to cycles in the memoized
4349 code.
4350
e5156567
DH
43512004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4352
4353 No functional change, just rearrangements of functions within the
4354 file.
4355
4356 * eval.c (scm_ilookup, scm_unbound_variable_key,
4357 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4358 the definitions used for execution, since that's where they will
4359 belong to later.
4360
651f07f8
DH
43612004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4362
4363 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4364 throughout guile, has not been part of an official release yet,
4365 and the concept of sloppy predicates has never been a good idea.
4366
4367 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4368 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4369 Simplified.
4370
770e048f
DH
43712004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4372
4373 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4374 to make explicit what happens.
4375
2ff08405
DH
43762004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4377
4378 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4379 explicit what happens.
4380
4381 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4382 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4383
89afb9cd
MV
43842004-05-11 Marius Vollmer <mvo@zagadka.de>
4385
4386 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4387 is indeed a procedure when it isn't a number.
4388
3d5ebfa9
MV
43892004-05-10 Marius Vollmer <mvo@zagadka.de>
4390
4391 Convert floating point numbers into strings with an arbitrary
4392 radix. Thanks to Richard Todd!
4393
4394 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4395 fit.
4396 (fx): Removed.
4397 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4398 number_chars): New, to support variable radices.
4399 (idbl2str): Use above instead of the old base-10 only tables.
4400 (iflo2str): Pass on new RADIX argument to idbl2str.
4401 (scm_number_to_string): Pass radix to iflo2str.
4402 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4403 iflo2str.
4404 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4405 possible radices.
4406
3ae69bb4
KR
44072004-05-10 Kevin Ryde <user42@zip.com.au>
4408
4409 * numbers.c (scm_logbit_p): Correction to test above the end of an
4410 inum. Reported by Jan Konecny.
4411
27968825
MV
44122004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4413
4414 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4415 scm_t_bits. Updated all users.
4416 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4417 duplicating the code.
4418 (SCM_CELL_OBJECT_LOC): New.
4419 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4420 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4421
4422 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4423 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4424 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4425 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4426 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4427 SCM_SMOB_OBJECT_3_LOC): New.
4428 * smob.c (scm_i_set_smob_flags): New function.
4429
4430 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4431 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4432 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4433 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4434 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4435 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4436
4437 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4438 taking the address of SCM_CELL_WORD_1, the latter being no longer
4439 an lvalue.
4440
4441 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4442 of casting SCM_CELL_WORD_LOC.
4443
3cf17ef0
KR
44442004-05-02 Kevin Ryde <user42@zip.com.au>
4445
37026925 4446 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4447 --disable-deprecated. Reported by Andreas Vögele.
37026925 4448
3cf17ef0 4449 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4450 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4451
c5854598
KR
4452 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4453 code has support for. Fixes building with AIX cc, which is ansi but
4454 doesn't define __STDC__. Reported by Keith Crane.
4455 (var_start): Remove macro, this variation no longer required.
4456 (scm_list_n): Use va_start directly.
4457
f26c1a32
KR
44582004-05-01 Kevin Ryde <user42@zip.com.au>
4459
4460 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4461 is now gone. Reported by Andreas Vögele.
f26c1a32 4462
dfa6017e
KR
44632004-04-28 Kevin Ryde <user42@zip.com.au>
4464
4465 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4466 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4467 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4468 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4469 Also cast through unsigned char to avoid passing negatives to those
4470 macros if input contains 8-bit values.
4471
4472 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4473 corrections to range check for signed numbers. Remove
4474 scm_remember_upto_here_1(num) from these checks, since num is used
4475 subsequently anyway.
4476
4477 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4478 avoid warning from gcc 3.4. Reported by Hyperdivision.
4479
4480 * numbers.c (scm_bit_extract): Use min instead of MIN.
4481 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4482 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4483
4484 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4485 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4486
a0d06a00 4487 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4488 Reported by Andreas Vögele.
a0d06a00 4489
dfa6017e
KR
4490 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4491 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4492 by Andreas Vögele.
dfa6017e 4493
36245b66
DH
44942004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4495
4496 * eval.c (s_macro_keyword): New static identifier.
4497
4498 (scm_m_define): Change order to first create binding and
4499 evaluating the expression afterwards.
4500
4501 (scm_m_set_x): Memoize complete set! expression. Only leave
4502 symbols if no binding exists at memoization time. Throw error if
4503 assigning to a syntactic keyword.
4504
4505 (lazy_memoize_variable): New function.
4506
4507 (CEVAL): When execution set!, perform lazy memoization if
4508 unmemoized symbol is detected.
4509
4510 * modules.c (module_variable): Return variables with unbound
4511 value.
4512
4513 * tags.h: Fix comment.
4514
4d81111e
KR
45152004-04-25 Kevin Ryde <user42@zip.com.au>
4516
da8bcb2f
KR
4517 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4518 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4519 in 8-bit locales, and ensures consistency with char-upper-case? and
4520 char-lower-case? which already use ctype.h.
4521 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4522 Remove.
4523 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4524
4d81111e
KR
4525 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4526 call. Reported by Hyperdivision.
4527
4528 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4529 Reported by Hyperdivision.
4530
4531 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4532 Hyperdivision.
4533
7e6e6b37
DH
45342004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4535
4536 Hide the implementation of ilocs and isyms in eval.c.
4537
4538 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4539 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4540 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4541 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4542 eval.h to eval.c.
4543
4544 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4545 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4546 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4547 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4548 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4549 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4550 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4551 renamed to ISYMNUM.
4552
4553 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4554 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4555 Extracted printing of ilocs and isyms to guile internal functions
4556 scm_i_print_iloc, scm_i_print_isym of eval.c.
4557
caab294f
KR
45582004-04-22 Kevin Ryde <user42@zip.com.au>
4559
7aaf4758
KR
4560 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4561
caab294f
KR
4562 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4563 rounding in x+0.5 when x is a big value already an integer. In
4564 certain hardware rounding cases x+0.5 can give an adjacent integer,
4565 leading to that as the result, when we really just wanted x itself.
4566
b1cb24ff
DH
45672004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4568
4569 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4570
4571 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4572 added const qualifiers, cast intentionally unused expressions to
4573 void for emphasis, improved comment.
4574
5065b40d
DH
45752004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4576
4577 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4578 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4579 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4580 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4581 Defined the tc8-tag for flags to be 0x04, which will mean that
4582 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4583 to the reduced number of bits and the simpler bit pattern for
4584 SCM_BOOL_F, certain machines may be able to use more efficient
4585 processor instructions to deal with SCM_BOOL_F.
4586
4587 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4588 never been defined in a released version, thus no need to
4589 deprecate them.
4590
4591 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4592 instead of tc9 tags.
4593
4594 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4595 of tc9 tags.
4596
4597 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4598 could have used this definition.
4599
4600 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4601 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4602 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4603 as isyms, as special isyms don't exist any more.
4604
9fa6c119
KR
46052004-04-18 Kevin Ryde <user42@zip.com.au>
4606
e08d2eee
KR
4607 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4608 safety.
4609
9fa6c119
KR
4610 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4611 explicit swapping code.
4612
c9cdd396
KR
46132004-04-15 Kevin Ryde <user42@zip.com.au>
4614
4615 * cpp_sig_symbols.in: Add SIGSYS.
4616
4617 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4618 recursion.
4619
4620 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4621 frac/big and frac/frac, use scm_less_p for exact comparison.
4622
83ac9c59
KR
4623 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4624 with big/inum.
4625
84a4be9a
KR
4626 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4627
84fad130
HWN
46282004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4629
6b69393d
HWN
4630 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4631
84fad130
HWN
4632 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4633 scm_c_{up,down}case.
4634 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4635 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4636
c3110a30
KR
46372004-04-06 Kevin Ryde <user42@zip.com.au>
4638
0b288f36
KR
4639 * numbers.c (scm_ash): Remove stray "}" in docstring.
4640
ea2508c8
KR
4641 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4642 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4643 calling mpz_cmp_ui in most cases.
4644
c3110a30
KR
4645 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4646 for big == abs(most-negative-fixnum) special case.
4647 (abs_most_negative_fixnum): Remove, no longer used.
4648
4649 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4650 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4651 calling (sigaction NSIG).
4652
4653 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4654 and fork error cases to do this.
4655
dec40cd2
DH
46562004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4657
4658 * eval.c (CEVAL): Don't distinguish between short and long
4659 instructions when dispatching - just always dispatch on the
4660 instruction code, which is common for short and long instructions.
4661 Further, removed unnecessary goto statements and added comment.
4662
0e7bb795
DH
46632004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4664
4665 * eval.c (scm_unmemocopy): Don't distinguish between short and
4666 long instructions when dispatching - just always dispatch on the
4667 instruction code, which is common for short and long instructions.
4668 Further, removed unnecessary goto statements, fixed indentation
4669 and replaced SCM_IMP predicates by SCM_NULLP.
4670
f9986767
DH
46712004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4672
4673 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4674 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4675 'checkmacro'.
4676
fbc42231
KR
46772004-03-31 Kevin Ryde <user42@zip.com.au>
4678
4679 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4680
434f2f7a
DH
46812004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4682
4683 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4684 SCM_DEBUGGINGP:
4685
4686 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4687 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4688 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4689 single interface that also matches the naming conventions.
4690 Probably scm_debug_mode_p should be part of the private interface
4691 anyway.
4692
4693 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4694 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4695 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4696 to scm_debug_mode_p.
4697
4698
4699 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4700
4701 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4702 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4703 from debug.h to eval.h.
4704
4705 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4706 more, just leave it with setting scm_debug_mode_p, which is
4707 equivalent for practical purposes.
4708
4709 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4710 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4711
4712 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4713
4714 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4715 static and renamed it to ceval throughout. Provide a new exported
4716 but deprecated function scm_ceval as a wrapper for backwards
4717 compatibility. The same is done for the deval/scm_deval pair of
4718 functions.
4719
4720 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4721 throughout. Defined CEVAL to ceval or deval, based on compilation
4722 phase.
4723
4724 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4725 to ceval and deval instead of calling *scm_ceval_ptr.
4726
4727 * eval.c (dispatching_eval): New deprecated static function.
4728
4729 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4730 to emulate its old behaviour as closely as possible.
4731
4732
4733 Change the evaluator such that only expressions for which pair? is
4734 true are passed to CEVAL, and such that all other expressions are
4735 evaluated outside of CEVAL:
4736
4737 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4738 expression that is assumed to be memoized already. All but
4739 expressions of the form '(<form> <form> ...)' are evaluated inline
4740 without calling an evaluator.
4741
4742 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4743 expressions of the form '(<form> <form> ...)' inline without
4744 calling an evaluator.
4745
4746 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4747 the special case of unmemoized symbols passed on the top level.
4748
4749 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4750 is known that the expression passed to CEVAL is of the form
4751 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4752 now it is known that the input expression of CEVAL is a pair.
4753
47542004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4755
4756 * eval.c (is_self_quoting_p): New static function.
4757
4758 (scm_m_quote): Use is_self_quoting_p.
4759
4760 (copy_tree): Corrected typo in comment.
4761
702551e6
HWN
47622004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4763
bfefbf18
HWN
4764 * eval.c (s_scm_copy_tree): idem.
4765
4766 * list.c (s_scm_filter): remove "pointer" from doc string.
4767
702551e6
HWN
4768 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4769
4770 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4771
4772 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4773 (display_frame): idem.
4774 (display_backtrace_file_and_line): idem.
4775
4776 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4777 arguments.
4778
3cd23214
KR
47792004-03-26 Kevin Ryde <user42@zip.com.au>
4780
88a7ae1f
KR
4781 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4782
3cd23214
KR
4783 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4784 big==0 since that never occurs.
4785
4786 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4787 scm_modular_expt, matching scheme level name `modulo-expt'.
4788
4789 * numbers.c (scm_modular_expt): Return a negative remainder for a
4790 negative divisor, the same as `modulo' does.
4791
47922004-03-26 Eric Hanchrow <offby1@blarg.net>
4793
4794 * numbers.c, numbers.h (scm_modular_expt): New function.
4795
2926035a
KR
47962004-03-25 Kevin Ryde <user42@zip.com.au>
4797
4798 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4799 return inexact as required by r5rs.
4800
62360b89
DH
48012004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4802
4803 * eval.c: Separated some definitions relevant for execution from
4804 the memoization part of the file.
4805
4806 (copy_tree): New static function
4807
4808 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4809 structures are detected now and will lead to an exception instead
4810 of forcing guile to run in an endless loop, using up all the
4811 system's memory. Second, arrays in the cdr of an improper list
4812 are now copied. See the new test cases in eval.test.
4813
48142004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
4815
4816 * posix.c (scm_gethostname): Make sure len is initialised before
4817 it is used. Restructured to (hopefully) represent possible
4818 configurations more clearly in the code. Added unwind handler.
4819
3bd3bae8
KR
48202004-03-23 Kevin Ryde <user42@zip.com.au>
4821
4822 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4823 MAXHOSTNAMELEN when available.
4824
254bf78d
MV
48252004-03-21 Marius Vollmer <mvo@zagadka.de>
4826
4827 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4828 terminator. Rewritten the logic as a state machine, I must have
4829 been doing too much VHDL lately...
4830
4831 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4832 themselves. Thanks to Han-Wen Nienhuys!
4833
4834 * list.c: Changed docstrings so that they no longer talk about
4835 returning 'pointers' to something.
4836
009c34a2
HWN
48372004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4838
4839 * gc.c: remove set_debug_cell_accesses! when
4840 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4841 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4842 debugging conditionally.
4843
54733c95
KR
48442004-03-21 Kevin Ryde <user42@zip.com.au>
4845
4846 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4847
bbaf8747
KR
48482004-03-20 Kevin Ryde <user42@zip.com.au>
4849
4850 * posix.c (scm_gethostname): Preserve errno across free() call.
4851
726f82e7
HWN
48522004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4853
4854 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4855 free cells.
4856
e1350d6a
KR
48572004-03-14 Kevin Ryde <user42@zip.com.au>
4858
4859 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4860 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4861
62055253
KR
48622004-03-07 Kevin Ryde <user42@zip.com.au>
4863
4864 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4865 than "GMT" always.
4866 (filltime): Make zname parameter "const".
4867
92e64b87
MD
48682004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4869
4870 * threads.c, threads.h (scm_c_scm2thread): New function.
4871
004ad931
KR
48722004-02-29 Kevin Ryde <user42@zip.com.au>
4873
4874 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4875 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4876 particular don't assume "defined (__alpha__) && ! defined (linux)"
4877 means OSF. Remove "SCO" code, which was not really SCO specific and
4878 which John W. Eaton advises should be long past being needed.
4879
4880 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4881 error throw.
4882
72ea45ac
KR
48832004-02-24 Kevin Ryde <user42@zip.com.au>
4884
4885 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4886
2af0602e
KR
48872004-02-22 Kevin Ryde <user42@zip.com.au>
4888
4889 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4890 complex, same as for two args. (Handle only inum, big, real, frac).
4891
b114eafe
KR
48922004-02-21 Kevin Ryde <user42@zip.com.au>
4893
4894 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4895 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 4896 Reported by Andreas Voegele.
b114eafe 4897
1e55d288
NJ
48982004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4899
4900 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4901 validation.
4902
4903 * read.c (scm_lreadparen): Removed.
4904 (scm_lreadparen1): Renamed scm_i_lreadparen.
4905
eb741d98
HWN
49062004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4907
4908 * list.c (scm_list_n): validate non-immediate arguments;
4909 this will catch forgotten a SCM_UNDEFINED.
4910
4e28ba5e
MV
49112004-02-18 Marius Vollmer <mvo@zagadka.de>
4912
4913 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4914 Thanks to Bill Schottstaedt!
4915
4916 * socket.h (scm_gethost): Removed prototype it is already in
4917 "net_db.h". Thanks to Bill Schottstaedt!
4918
ef861ead
KR
49192004-02-18 Kevin Ryde <user42@zip.com.au>
4920
4921 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4922 order parameter to mpz_import, in fact with just one word there's no
4923 order to worry about at all.
4924
4925 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4926 and frac==complex, make an exact comparison rather than converting
4927 with fraction2double.
4928
4929 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4930 shared library, since environ is not directly available there.
4931
4932 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4933 standard.
4934
4935 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4936 errno EINVAL in case localtime and gmtime don't set it.
4937 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4938 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4939
ae43d08e 49402004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 4941
c9ea6462
KR
4942 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4943 which were permitted in the past for these.
4944
292dfa7f
KR
4945 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
4946 previous change to numbers.c.
4947
ae43d08e
KR
4948 * script.c (scm_shell_usage): Print bug-guile email address, as per
4949 GNU standard. Reported by Han-Wen Nienhuys.
4950
711a9fd7
MD
49512004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4952
4953 * unif.c (scm_make_uve): Removed local variable and simplified
4954 code in order to avoid compiler used uninitialized warnings.
4955
4956 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
4957 scm_hash_map.
4958 (scm_hash_fold): Use scm_call_3 directly in the call to
4959 scm_internal_hash_fold instead of going via fold_proc (which is
4960 now removed).
4961 (scm_hash_for_each): Use a trampoline +
4962 scm_internal_hash_for_each_handle.
4963 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
4964 functions.
4965
3da7f6b2
KR
49662004-02-12 Kevin Ryde <user42@zip.com.au>
4967
344a212f
KR
4968 * ports.c (scm_port_line): In docstring, note first line is 0.
4969 (scm_set_port_line_x): In docstring, note first line is 0.
4970 (scm_port_column): In docstring, there's no default to current input
4971 port, and remove shared port-line @defun.
4972 (scm_set_port_column_x): In docstring, there's no default to current
4973 input port, note first column is 0, remove shared set-port-line!
4974 @defun.
4975
3da7f6b2
KR
4976 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
4977 convert args the same way that array-set! does.
4978
4979 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
4980 for dvect.
4981 (scm_array_p): Add missing "break"s in switch, fix llvect test look
4982 for "l" not "s", fix dvect to be false for singp(prot) since such a
4983 value is for fvect.
4984 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
4985 (exactly_one_third): New variable.
4986 (scm_init_unif): Initialize it.
3da7f6b2 4987
cd21f5eb
NJ
49882004-02-10 Neil Jerram <neil@ossau.uklinux.net>
4989
4990 * read.c (scm_read_opts): Change `escaped-parens' to
4991 `elisp-strings'.
4992
16353acc
NJ
49932004-02-08 Neil Jerram <neil@ossau.uklinux.net>
4994
4995 * read.c (scm_read_opts): New opts `elisp-vectors' and
4996 `escaped-parens'.
4997 (s_vector): New.
4998 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
4999 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5000 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5001 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5002 `escaped-parens' option set.
5003 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5004 in tokens.
5005 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5006 (scm_lreadparen1): New.
5007
5008 * read.h: Remove conditionally compiled last arg to
5009 scm_lreadparen.
5010 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5011
f62b9dff
HWN
50122004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5013
5014 * eval.c (m_expand_body): remove stray variable new_body.
5015
ef5b6b61
MV
50162004-01-22 Marius Vollmer <mvo@zagadka.de>
5017
5018 * eval.c (m_expand_body): Rewrite the expression in place (by
5019 overwriting FORMS) also when a letrec is constructed, not only
5020 when no definitions are found. Do not return rewritten expression
5021 to emphasize the in-place rewriting. Changed all users.
5022
7eec4c37
HWN
50232004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5024
5025 * gc.c: add protected_object_count, a number that is dumped from
5026 gc_stats()
5027
25ffbdac
MV
50282004-01-11 Marius Vollmer <mvo@zagadka.de>
5029
5030 * dynwind.h, dynwind.c (scm_frame_unwind,
5031 scm_frame_unwind_handler): Renamed and changed all uses.
5032 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5033
08568c95
KR
50342004-01-11 Kevin Ryde <user42@zip.com.au>
5035
5036 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5037 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5038 changes made to scheme-compound.texi.
5039
5565749c
MV
50402004-01-10 Marius Vollmer <mvo@zagadka.de>
5041
25ffbdac
MV
5042 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5043 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5044
5045 * guile-snarf.in: Use mkdir to create a unique temporary directory
5046 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5047
fc6bb283
MV
50482004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5049
7ebccde8
MV
5050 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5051 argument since it is always zero now. Changed all callers.
5052 Removed code for handling fluids.
96e3b2f8
MV
5053
5054 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5055 the wind chain explicitely. Use scm_c_with_fluid for the common
5056 case of only one fluid.
5057 (scm_with_fluid): New.
5058 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5059
fc6bb283 5060 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5061 (scm_with_fluid): New.
5062 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5063
5064 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5065 do the unwinding directly. It is simple enough.
5066
5067 * dynwind.h, dynwind.c: Did the following renamings:
5068 scm_begin_frame -> scm_frame_begin,
5069 scm_end_frame -> scm_frame_end,
5070 scm_on_unwind -> scm_frame_unwind,
5071 scm_on_rewind -> scm_frame_rewind,
5072 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5073 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5074 Changed all uses.
5075
5076 * aync.h, async.c: Did the follwing renamings:
5077 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5078 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5079 Changed all uses.
5080
5081 * ports.h, ports.c: Did the follwing renamings:
5082 scm_with_current_input_port -> scm_frame_current_input_port,
5083 scm_with_current_output_port -> scm_frame_current_output_port,
5084 scm_with_current_error_port -> scm_frame_current_error_port.
5085 Changed all uses.
5086
298ab996
KR
50872004-01-07 Kevin Ryde <user42@zip.com.au>
5088
5089 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5090 Reported by Richard Todd.
5091
ba40113e
KR
5092 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5093 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5094
298ab996
KR
5095 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5096 traversing the args list, fixes segv if an improper list is given.
5097 Reported by Rouben Rostamian.
5098
aacff585
MV
50992004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5100
5101 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5102 swap_data on stack, use a 'malloc obj'.
5103
5104 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5105 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5106 scm_i_... since they are internal. Changed all uses.
5107
5108 * dynwind.c (frame_print): Removed, use the default printer.
5109 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5110 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5111 to protect SCM values.
5112
5113 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5114 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5115 Changed all uses.
5116 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5117
49c00ecc
MV
51182004-01-05 Marius Vollmer <mvo@zagadka.de>
5119
5120 * ports.h, ports.c (scm_with_current_input_port,
5121 scm_with_current_output_port, scm_with_current_error_port): New.
5122
5123 * async.h, async.c (scm_with_blocked_asyncs,
5124 scm_with_unblocked_asyncs): New.
5125
dab514a8
MV
51262004-01-03 Marius Vollmer <mvo@zagadka.de>
5127
5128 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5129 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5130 New.
5131 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5132 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5133 function when the outermost wind point has been reached. The
5134 latter is used to copy a continuation stack at the right time.
5135 scm_dowinds remains available.
5136 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5137 tc16_guard, guards_print): Removed.
5138 (scm_internal_dynamic_wind): Reimplemented using frames.
5139
5140 * continuations.c (copy_stack): New, do only the stack copying
5141 part of copy_stack_and_call.
5142 (copy_stack_and_call): Copy the stack after unwinding and before
5143 rewinding.
5144 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5145 copy_stack_and_call.
5146
441a25d9
KR
51472004-01-04 Kevin Ryde <user42@zip.com.au>
5148
5149 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5150 can give bad results due to rounding.
441a25d9 5151
e0499207
KR
5152 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5153 setzone/restorezone protection for DOS.
5154
89fcf1b4
MV
51552003-12-26 Marius Vollmer <mvo@zagadka.de>
5156
5157 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5158 and scm_t_uintmax to be defined in scmconfig.h
5159
caff34d4
KR
51602003-12-03 Kevin Ryde <user42@zip.com.au>
5161
5162 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5163
5164 * numbers.c (scm_make_ratio): Check for numerator equal to
5165 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5166 giving integer -1.
5167
5168 * numbers.c (scm_real_part): Return fraction unchanged rather than
5169 converting to flonum.
5170
2d0b85ac
DH
51712003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5172
5173 * modules.c (module_variable): Fixed (and thus simplified) the
5174 definition of SCM_BOUND_THING_P to reflect the fact that since
5175 after the 1.4 series of guile, obarrays only hold variable
5176 objects.
5177
2297981d
MV
51782003-11-30 Marius Vollmer <mvo@zagadka.de>
5179
5180 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5181
5182 From Paul Jarc:
5183
5184 * read.c (scm_lreadr): Signal an error for invalid escape
5185 sequences in strings. Code cleanups too.
5186
5187 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5188 writing control characters in strings.
5189
51902003-11-21 Marius Vollmer <mvo@zagadka.de>
5191
5192 * ports.c (scm_drain_input): Bug fix: only access the port after
5193 checking that it indeed is one.
5194
5c264007
DH
51952003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5196
5197 * eval.c (s_bad_define): New static identifier.
5198
5199 (m_body): Fixed comment.
5200
5201 (scm_m_define): Don't generate memoized code for definitions that
5202 are not on the top level. As a consequence, no memoized code at
5203 all is generated for definitions any more: Top level definitions
5204 are executed immediately during memoization and internal
5205 definitions are handled separately in m_expand_body.
5206
5207 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5208 definitions. Consequently, there is no unmemoizing code any more
5209 that might modify the environment. Thus, the old scm_unmemocopy
5210 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5211
5212 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5213 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5214 over SCM_NIMP in places, where the argument is known to be part of
5215 a proper list.
5216
018d4730
KR
52172003-11-21 Kevin Ryde <user42@zip.com.au>
5218
5219 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5220 for bignums.
5221
5222 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5223 to share some shifting.
5224
5225 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5226 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5227 since gc does this.
5228
4bca30d8
MV
52292003-11-19 Marius Vollmer <mvo@zagadka.de>
5230
fb16d26e
MV
5231 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5232 structure. Previously, not all cases with a negative denominator
5233 were covered.
5234
4bca30d8
MV
5235 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5236 scm_divide2real when forming the fractional part. This allows
5237 "#e1.2" to yield 6/5.
5238
5239 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5240 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5241 fractions were equal to each other regardless of value. Ooops.
5242
5243 * numbers.c (scm_rationalize): Return an inexact result when given
5244 inexact arguments.
5245
5246 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5247 non-numbers.
5248
bdf26b60
MV
52492003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5250
5251 Support for exact fractions from Bill Schottstaedt! Thanks!
5252
5253 * print.c (scm_iprin1): Handle fractions.
5254
5255 * objects.h (scm_class_fraction): New.
5256 * objects.c (scm_class_fraction): New.
5257 (scm_class_of): Handle fractions.
5258
5259 * hash.c (scm_hasher): Handle fractions.
5260
5261 * numbers.c: New code for handling fraction all over the place.
5262 (scm_odd_p, scm_even_p): Handle inexact integers.
5263 (scm_rational_p): New function, same as scm_real_p.
5264 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5265 New exact functions that replace the inexact 'dsubr'
5266 implementations.
5267 (scm_numerator, scm_denominator): New.
5268
5269 * numbers.h (SCM_NUMP): Recognize fractions.
5270 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5271 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5272 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5273 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5274 SCM_FRACTION_REDUCED): New.
5275 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5276 New prototypes.
5277 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5278 scm_rational_p): New prototypes.
5279 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5280 scm_i_print_fraction): New prototypes.
5281
5282 * goops.c (create_standard_classes): Create "<fraction>" class.
5283
5284 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5285
5286 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5287 case in the switch, but do nothing for now.
5288
5289 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5290 to doubles when calling 'dsubr' functions.
5291
5292 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5293
28fda544
RB
52942003-11-18 Rob Browning <rlb@defaultvalue.org>
5295
5296 * gen-scmconfig.c (main): remove public definition of
5297 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5298 direct typedef of long_long and ulong_long inside deprecated block
5299 when appropriate.
5300
5301 * deprecated.h: move long_long and ulong_long definitions to
5302 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5303 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5304
b58e7420
MV
53052003-11-17 Marius Vollmer <mvo@zagadka.de>
5306
9a1d7d7c
MV
5307 * hash.c (scm_string_hash): New hashing algorithm that takes the
5308 complete string into account.
5309
b58e7420
MV
5310 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5311 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5312 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5313 SCM_ASSYNT.
b58e7420
MV
5314
5315 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5316 the "-e" option instead of scm_str2symbol. This allows things
5317 like (@ ...) to be specified for the entry point.
5318
461bffb1
DH
53192003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5320
5321 * eval.c (scm_m_letstar): Create memoized code in place to
5322 minimize consing.
5323
6f81708a
DH
53242003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5325
5326 * eval.c (s_splicing): Commented and reformulated.
5327
5328 (lookup_global_symbol, lookup_symbol): New static functions.
5329
5330 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5331
5332 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5333 creating a temporary pair for scm_lookupcar.
5334
5335 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5336 created deprecated wrapper function scm_unmemocar.
5337
5338 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5339 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5340 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5341 undefineds, sym_three_question_marks): Moved around without
5342 modifications.
5343
5344 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5345
910b5125
DH
53462003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5347
5348 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5349 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5350 No further modifications.
5351
c86c440b
DH
53522003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5353
5354 * eval.c (s_mixed_body_forms): New static identifier.
5355
5356 (canonicalize_define, scm_m_define): The check for a bad
5357 expression is performed in canonicalize_define now.
5358
5359 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5360 static helper functions for m_expand_body.
5361
5362 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5363 expand user defined macros. Fixed handling of the definition/
5364 expression boundary. Fixed handling of definitions grouped with
5365 'begin. Use canonicalize_define to expand definitions.
5366
3890131a
MV
53672003-11-13 Marius Vollmer <mvo@zagadka.de>
5368
b58e7420
MV
5369 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5370 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5371
5df36eac
MV
5372 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5373 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5374 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5375 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5376 New macros from Paul Jarc. Thanks!
5377
3890131a
MV
5378 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5379 return NULL when the machine type is unknown. Previously,
5380 gc_os_dep.c would refuse to compile.
5381
430b8401
DH
53822003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5383
5384 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5385 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5386 scm_m_body to m_body.
5387
328dc9a3
DH
53882003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5389
5390 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5391 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5392 scm_m_expand_body to m_expand_body and made it static. Added
5393 deprecated wrapper scm_m_expand_body.
5394
5395 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5396 of scm_m_expand_body.
5397
c2337a61
KR
53982003-11-09 Kevin Ryde <user42@zip.com.au>
5399
5400 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5401 argument. Reported by Mike Gran.
5402
ced8edb0
DH
54032003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5404
5405 * eval.c (s_missing_body_expression): New static identifier.
5406
5407 (s_body): Removed.
5408
5409 (scm_m_expand_body): Fixed core dump when passing a body with
5410 defines, but without expressions (see additions to syntax.test).
5411 Use ASSERT_SYNTAX to signal syntax errors.
5412
0f572ba7
DH
54132003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5414
5415 * eval.c (canonicalize_define): New static helper function.
5416
5417 (memoize_define, canonicalize_define): Extract handling of
5418 function currying to canonicalize_define.
5419
2510c810
DH
54202003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5421
5422 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5423 Make sure that error checking in debug mode is not worse than in
5424 standard mode.
5425
34adf7ea
DH
54262003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5427
5428 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5429 handled in scm_m_body any more, but rather in scm_m_lambda.
5430
5431 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5432 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5433 calling functions of scm_m_body.
5434
5435 (scm_m_lambda): Avoid unnecessary consing when creating the
5436 memoized code.
5437
89bff2fc
DH
54382003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5439
5440 * eval.c (s_expression): Added comment.
5441
5442 (s_empty_combination, error_unbound_variable): New static
5443 identifiers.
5444
5445 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5446 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5447 signal syntax errors.
5448
5449 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5450 scheme objects.
5451
60a49842
DH
54522003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5453
5454 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5455 Grouped together with unmemocopy, without modifications.
5456
5457 (build_binding_list, unmemocopy): Renamed names of list arguments
5458 and variables to reflect the actual order of the list elements.
5459
70c1c108
DH
54602003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5461
5462 * eval.c (s_defun): New static identifier.
5463
5464 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5465 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5466 when creating the memoized code.
5467
0ee39677
KR
54682003-10-19 Kevin Ryde <user42@zip.com.au>
5469
5470 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5471
5472 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5473 in accordance with R5RS, which just mpz_get_d doesn't really give.
5474
9a848baf
DH
54752003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5476
5477 * eval.c (s_bad_slot_number): New static identifier.
5478
5479 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5480 signal syntax errors. Avoid unnecessary consing when creating the
5481 memoized code.
5482
da48db62
DH
54832003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5484
5485 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5486 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5487 errors. Avoid unnecessary consing when creating the memoized
5488 code.
5489
5490 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5491 standard case. Make sure line and file information are copied to
5492 every created expression.
5493
82b3e2c6
DH
54942003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5495
5496 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5497 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5498 when creating the memoized code.
5499
5500 (scm_m_atbind): Reversed the order, in which the init expressions
5501 are stored and executed. The order of execution is now equal to
5502 the order in which the initializers of the let-forms are executed.
5503 Use check_bindings and transform_bindings.
5504
5505 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5506 !SCM_NULLP. Added some comments.
5507
21628685
DH
55082003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5509
5510 * eval.c: Sorted include files alphabetically.
5511
5512 (scm_m_begin): Added comment.
5513
5514 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5515 unnecessary consing when creating the memoized code.
5516
5517 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5518 syntax errors. Be more specific about the kind of error that was
5519 detected.
5520
5521 (scm_m_quote, unmemocopy): As an optimization, vector constants
5522 are now inserted unquoted into the memoized code. During
5523 unmemoization the quotes are added again to provide syntactically
5524 correct code.
5525
d6754c23
DH
55262003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5527
5528 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5529 scm_m_expand_body, check_bindings): Extracted syntax checking of
5530 bindings to new static function check_bindings.
5531
5532 (scm_m_let, memoize_named_let): Extracted handling of named let to
5533 new static function memoize_named_let.
5534
5535 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5536 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5537 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5538 unnecessary consing when creating the memoized code.
5539
03a3e941
DH
55402003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5541
5542 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5543 static identifiers.
5544
5545 (s_clauses, s_formals, s_duplicate_formals): Removed.
5546
5547 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5548 specific about the kind of error that was detected. Prepare for
5549 easier integration of changes for separated memoization.
5550
da48db62 55512003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5552
5553 * eval.c (s_duplicate_binding): New static identifier.
5554
5555 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5556
5557 (scm_m_define): Added comment about how we check for duplicate
5558 formals.
5559
5560 (scm_m_do): Added check for duplicate bindings.
5561
5562 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5563 unnecessary consing when creating the memoized code.
5564
5565 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5566 scm_c_improper_memq to c_improper_memq, since it is not exported.
5567
5568 (transform_bindings): Call scm_c_memq rather than
5569 scm_c_improper_memq.
5570
5571 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5572
da48db62 55732003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5574
5575 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5576 static identifiers.
5577
5578 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5579 specific about the kind of error that was detected. Avoid use of
5580 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5581 code, this way also making sure that file name, line number
5582 information etc. remain available.
5583
da48db62 55842003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5585
5586 * eval.c (memoize_as_thunk_prototype): New static function.
5587
5588 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5589 Avoid unnecessary consing when creating the memoized code.
5590
9b9a35b6
KR
55912003-10-12 Kevin Ryde <user42@zip.com.au>
5592
5593 * list.c (scm_append): Track argument number and use in error.
5594
cc56ba80
DH
55952003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5596
5597 * eval.c (s_missing_expression, s_bad_variable): New static
5598 identifiers.
5599
5600 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5601 R5RS terminology for the naming of variables. Be more specific
5602 about the kind of error that was detected. Make sure file name,
5603 line number etc. are added to all freshly created expressions.
5604 Avoid unnecessary consing when creating the memoized code.
5605
609a8b86
DH
56062003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5607
5608 * eval.c (s_extra_expression, s_misplaced_else_clause,
5609 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5610
5611 (s_extra_case_clause): Removed.
5612
5613 (scm_m_case, scm_m_cond): If a clause appears after an else
5614 clause, report a misplaced else clause.
5615
5616 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5617 specific about the kind of error that was detected. Handle bound
5618 'else and '=>. Avoid unnecessary consing when creating the
5619 memoized code.
5620
5621 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5622 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5623 syntactic keyword '=>.
5624
58a2510b
DH
56252003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5626
5627 * eval.c (scm_m_case): Allow empty lists of case labels.
5628
2a6f7afe
DH
56292003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5630
5631 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5632
5633 * print.c (scm_isymnames): Add names for the new memoizer codes.
5634
5635 * eval.c (s_missing_clauses, s_bad_case_clause,
5636 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5637 literal_p): New static identifiers.
5638
5639 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5640 specific about the kind of error that was detected. Check for
5641 duplicate case labels. Handle bound 'else. Avoid unnecessary
5642 consing when creating the memoized code.
5643
5644 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5645 the syntactic keyword 'else.
5646
e6729603
DH
56472003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5648
5649 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5650 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5651
5652 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5653 unnecessary consing when creating the memoized code.
5654
9ddeb776
KR
56552003-10-09 Kevin Ryde <user42@zip.com.au>
5656
5657 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5658 cast gives for values bigger than a long, or for nan or inf.
5659
df5af69a
DH
56602003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5661
5662 * smob.h (scm_make_smob_type): Made the declaration match the
5663 definition.
5664
da0e6c2b
MV
56652003-10-07 Marius Vollmer <mvo@zagadka.de>
5666
5667 * goops.c, objects.h, smob.c, smob.h: Make type names char
5668 const * instead of char *. Thanks to Paul Jarc!
5669
591924eb
KR
56702003-10-02 Kevin Ryde <user42@zip.com.au>
5671
ff6ea7b9 5672 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5673 rather than scm_strport_to_string, so as to guard against the port
5674 having been closed by the called procedure. Reported by Nic Ferrier.
5675
f03314f9
DH
56762003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5677
5678 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5679
5680 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5681 tags.h to deprecated.h.
5682
534c55a9
DH
56832003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5684
5685 This set of patches introduces a new tc7 code scm_tc7_number for
5686 numbers. Bignums, reals and complex numbers are turned from smobs
5687 into subtypes of scm_tc7_number.
5688
5689 * tags.h (scm_tc7_number): New.
5690
5691 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5692 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5693 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5694 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5695 (scm_class_of), print.c (scm_iprin1), smob.c
5696 (scm_smob_prehistory): Don't handle bignums, reals and complex
5697 numbers as subtypes of scm_tc7_smob any more.
5698
5699 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5700 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5701
29c4382a
DH
57022003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5703
5704 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5705 sizeof (scm_t_complex) to determine the memory size of the
5706 malloc'd area for complex numbers.
5707
47ae1f0e
DH
57082003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5709
5710 * numbers.c (scm_bigequal): Fixed.
5711
859b6b2f
MV
57122003-09-16 Marius Vollmer <mvo@zagadka.de>
5713
5714 * stime.c (scm_current_time): 'time' does not set errno so don't
5715 use SCM_SYSERROR for reporting errors.
5716
e17d318f
DH
57172003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5718
5719 This set of patches eliminates the dependency between the
5720 implementation of evaluator specific memoization codes and special
5721 constants like #f, '() etc. ('flags'), which are not evaluator
5722 specific. The goal is to remove definitions of evaluator
5723 memoization codes completely from the public interface. This will
5724 make it possible to experiment more freely with optimizations of
5725 guile's internal representation of memoized code.
5726
5727 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5728
5729 * print.c (iflagnames): New array, holding the printed names of
5730 guile's special constants ('flags').
5731
5732 (scm_isymnames): Now holds only the printed names of the
5733 memoization codes.
5734
5735 (scm_iprin1): Separate the handling of memoization codes and
5736 guile's special constants.
5737
5738 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5739 SCM_IFLAGNUM): new
5740
5741 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5742 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5743 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5744 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5745 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5746 values.
5747
5748 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5749
5750 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5751 tc9 macros and scm_tc9_flag.
5752
eecac806
MV
57532003-09-15 Marius Vollmer <mvo@zagadka.de>
5754
5755 * posix.c (scm_setgroups): Check that the gid list is not too
5756 long. Thanks to Paul Jarc!
5757
22f2cf2d
DH
57582003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5759
5760 * tags.h: Reduced the number of short instructions from 14 to 13.
5761 The typecode of the former 14th short instruction is now used to
5762 represent long instructions. Changed some comments to reflect
5763 this fact.
5764
5765 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5766 previously used by SCM_IM_DEFINE.
5767
5768 (SCM_IM_DEFINE): Turned into a long instruction.
5769
5770 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5771 instruction.
5772
5773 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5774 code that is separate from all instructions, one level of dispatch
5775 for long instructions can be eliminated.
5776
5777 * print.c (scm_isymnames): Removed some commented code.
5778
62f548e1
MV
57792003-09-12 Marius Vollmer <mvo@zagadka.de>
5780
97a61c5f
MV
5781 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5782 compiler on IA64.
5783
50e0ba57
MV
5784 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5785
5786 * modules.c (scm_module_reverse_lookup): Check that the obarray
5787 really is a hashtable and do nothing if not.
5788
62f548e1
MV
5789 * inline.h: Use "extern inline" only with GCC. Use "static
5790 inline" else.
5791
0d5e3480
DH
57922003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5793
5794 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5795 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5796
5797 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5798 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5799 deprecated.h.
5800
6b412e91
DH
58012003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5802
5803 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5804 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5805
5806 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5807 0.0==some_expression to some_expression==0.0. The latter is
5808 better readable. The former is preferred by some people, since it
5809 leads to a compiler error when confusing == with =. However, when
5810 using gcc, a warning will be issued if in an if-statement an
5811 assigment appears. Since many Guile developers are using gcc,
5812 such errors will not remain unnoticed anyway. We can therefore
5813 focus on better readability.
5814
7e3b25bf
DH
58152003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5816
5817 * tags.h: Added description of Guile's type system. Removed some
5818 old and misleading comments.
5819
3ea39242
DH
58202003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5821
5822 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5823 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5824
5d7d39ff
DH
58252003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5826
5827 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5828
5829 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5830 respective SLOPPY macro.
5831
baa84a20
DH
58322003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5833
5834 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5835 type string, not SCM_TYP7S.
5836
ba15f500
KR
58372003-09-03 Kevin Ryde <user42@zip.com.au>
5838
5839 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5840 2s-complement.
5841
53bb8782
KR
5842 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5843 current timezone requiring SCM_DEFER_INTS.
5844
defdc4b4
NJ
58452003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5846
5847 * script.c (scm_compile_shell_switches): Make -s switch optional
5848 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5849 VanDevender for the patch!)
5850
0f008a15
KR
58512003-08-30 Kevin Ryde <user42@zip.com.au>
5852
5853 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5854 and to have non-integer types rejected as per other logical funcs.
5855
438a3ba1
KR
58562003-08-28 Kevin Ryde <user42@zip.com.au>
5857
5858 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5859
98dceb37
KR
58602003-08-23 Kevin Ryde <user42@zip.com.au>
5861
5862 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5863 thread safe, and could take a long time too.
5864
1fa79a38
KR
58652003-08-22 Kevin Ryde <user42@zip.com.au>
5866
5867 * numbers.c (scm_difference): Correction to bignum - negative inum.
5868
d97f9b42
KR
58692003-08-14 Kevin Ryde <user42@zip.com.au>
5870
5871 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5872 [__GNUC__]: Use volatile asm macros rather than a function call.
5873 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5874 macros while defining functions.
5875
5876 * simpos.c (getenv): Use <stdlib.h> for prototype.
5877 (scm_system): In docstring, refer to status:exit-val rather than
5878 "functions above".
5879
b9052fcc
KR
58802003-08-09 Kevin Ryde <user42@zip.com.au>
5881
5882 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5883 list set by source-properties! rather than an SRCPROPS object,
5884
8e5b4b9e
KR
58852003-07-29 Kevin Ryde <user42@zip.com.au>
5886
5887 * properties.c (scm_primitive_property_ref): In docstring, note
5888 parameters to not-found-proc, use hyphens rather than underscores for
5889 that parameter name.
5890 (scm_primitive_property_set_x): In docstring, VAL is the value
5891 parameter not CODE.
5892
20703ac4
MV
58932003-07-27 Marius Vollmer <mvo@zagadka.de>
5894
c6ccee34
MV
5895 * print.c (scm_print_symbol_name): handle more weird characters by
5896 escaping the symbol name properly. Thanks to Paul Jarc!
5897
2f4931bf
MV
5898 * posix.h (scm_setgroups): New prototype.
5899 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5900 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5901 Don't use SCM_WRITABLE_VELTS.
5902
265c456f
MV
5903 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5904 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5905 Matthias Koeppe!
5906
20703ac4
MV
5907 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5908 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5909 compiles when SCM_C_INLINE is undefined.
5910
59c4bb82
DH
59112003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5912
5913 * __scm.h: Reformulated the architecture and compiler properties
5914 in terms of properties of scm_t_bits and SCM variables rather than
5915 in terms of c standard types. This is since it is not known which
5916 of the standard types scm_t_bits and SCM variables will be defined
5917 to.
5918
d7850c8d
KR
59192003-07-24 Kevin Ryde <user42@zip.com.au>
5920
5921 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5922 and real.
5923
8a0c514f
KR
59242003-07-18 Kevin Ryde <user42@zip.com.au>
5925
5926 * numbers.c (scm_product): In complex * bignum, correction to
5927 REAL/IMAG fetch, x is the complex, not y.
5928
0aacf84e
MD
59292003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5930
5931 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5932 scm_inf_p test as Scheme values.
5933 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5934 and a positive inum.
5935 Use GNU indentation style.
5936
192de9a4
DH
59372003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5938
5939 * values.c (scm_values): Build lists of length 1 by using
5940 scm_list_1 instead of using scm_cons.
5941
bbb4438a
KR
59422003-07-10 Kevin Ryde <user42@zip.com.au>
5943
b58c85ce
KR
5944 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5945 * list.c (scm_list_n): Ditto.
5946
bbb4438a
KR
5947 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
5948
287f8ad1
KR
59492003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
5950
5951 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
5952 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
5953 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
5954 the other using intptr_t.
5955
005d2366
KR
59562003-07-08 Kevin Ryde <user42@zip.com.au>
5957
0aacf84e 5958 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
5959 (scm_magnitude): Use hypot.
5960
5961 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
5962 @footnote since it doesn't go through to guile-procedures.txt.
5963
5964 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
5965 outside @var to quieten makeinfo, and use @code.
5966
cbfe8e62
HWN
59672003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5968
5969 * gc-malloc.c (decrease_mtrigger): new function
5970 (increase_mtrigger): new function, separate debug registering and
5971 mtrigger administration.
5972 (scm_gc_realloc): bugfix: do mtrigger administration before the
5973 actual realloc, for the realloc might invalidate a GC-d segment of
5974 memory. Thanks to Sam Hocevar for pointing this out.
5975 (scm_gc_realloc): use scm_malloc_reregister instead of
5976 unregistering and registering in sequence.
5977
aeb4c2e1
HWN
59782003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5979
5980 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
5981
4c27f8d2
HWN
59822003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5983
5984 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
5985 clauses.
5986
983e697d
MV
59872003-06-29 Marius Vollmer <mvo@zagadka.de>
5988
5989 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
5990 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
5991 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
5992 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
5993 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
5994 the release_1_6 branch.
5995
78b6566e
SJ
59962003-06-25 Stefan Jahn <stefan@lkcc.org>
5997
5998 * continuations.c: Redeclaration of getcontext() via the
5999 __asm__ ("getcontext") directive.
6000
6001 * continuations.h: Include <ucontext.h> instead of
6002 <sys/ucontext.h>.
6003
1ebb8497
KR
60042003-06-21 Kevin Ryde <user42@zip.com.au>
6005
6006 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6007 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6008 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6009 available.
6010 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6011 (isfinite): Remove, conflicts with C99 isfinite().
6012
fbf85ba4
MV
60132003-06-19 Marius Vollmer <mvo@zagadka.de>
6014
6015 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6016 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6017 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6018 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6019 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6020 the release_1_6 branch.
6021
fcc5d734
SJ
60222003-06-14 Stefan Jahn <stefan@lkcc.org>
6023
6024 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6025 to be functions instead of macros.
6026
6027 * threads.c: Conditionalized inclusion of <sys/time.h> and
6028 <unistd.h>.
6029 (scm_getspecific, scm_setspecific): Made these two function
6030 real part of the API.
6031
6032 * posix.c (s_scm_putenv): Added some code to make a
6033 (putenv "FOO="), i.e. setting an empty string, work also on
6034 Win32 systems. Thanks to Kevin Ryde for the proposal.
6035
c3ae8e07
KR
60362003-06-12 Kevin Ryde <user42@zip.com.au>
6037
75b14838
KR
6038 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6039 freebsd to comment about need to use unsetenv.
c3ae8e07 6040
9d9fa092
MV
60412003-06-02 Marius Vollmer <mvo@zagadka.de>
6042
6043 * ports.c (scm_peek_char): Safe the column of the port around the
6044 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6045
f2478375
KR
60462003-06-07 Kevin Ryde <user42@zip.com.au>
6047
6048 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6049 and friends required by scm_t_bits setups.
6050
6375e040
DH
60512003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6052
6053 * tags.h (scm_tc2_int): Added.
6054
6055 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6056 scm_tc2_int.
6057
6058 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6059 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6060
f5c6ec2f
DH
60612003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6062
6063 * eval.c: Partially undid my patch from 2003-05-31. This patch
6064 caused the segfault referenced in the previous changelog entry.
6065
47dbd81e
DH
60662003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6067
6068 * tags.h: Fixed comment about the immediate type code layout.
6069
6070 * eval.c: Fixed handling of non-special instructions. Without
6071 this patch, guile will segfault on (#\0) and similar instructions.
6072
3ec52c51
KR
60732003-06-05 Kevin Ryde <user42@zip.com.au>
6074
6075 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6076 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6077
e418bd7c
KR
6078 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6079 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6080
d0624e39
DH
60812003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6082
6083 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6084 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6085 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6086 generalized it to apply not only to C level functions but also to
6087 scheme level functions.
6088
6089 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6090 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6091 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6092 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6093 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6094 respectively.
6095
6096 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6097 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6098 eval.h into eval.c and a copy is placed into deprecated.h.
6099
6100 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6101 into eval.c. This definition was not part of the API in any
6102 officially released version of guile and thus does not need to go
6103 through a phase of deprecation.
6104
e90c3a89
DH
61052003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6106
d0624e39
DH
6107 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6108 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6109 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6110 definitions are make static and renamed from scm_s_xxx to s_xxx.
6111 In deprecated.c the original definitions are copied.
6112
d0624e39
DH
6113 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6114 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6115 eval.h into eval.c and a copy (slightly modified to work in user
6116 code) is placed into deprecated.h.
6117
6118 * eval.c: Use the local static s_xxx definitions instead of the
6119 scm_s_xxx definitions throughout.
6120
14b18ed6
DH
61212003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6122
6123 This set of patches separates the representation of the cxr family
6124 of functions (car, cdr etc.) from the dsubr family of functions
6125 (i. e. functions that take a double precision floating point
6126 argument). Further, the algorithm for handling the cxr function
6127 is improved.
6128
6129 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6130 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6131 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6132 cosh, tanh), objects.c (scm_class_of), procprop.c
6133 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6134 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6135 typecode for the dsubr family of functions.
6136
6137 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6138 ramap_dsubr.
6139
6140 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6141 (scm_init_pairs): Make use of the (now usable) second cell element
6142 of a scm_tc7_cxr function to implement the cxr family of functions
6143 more efficiently.
6144
2ca0d207
DH
61452003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6146
6147 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6148 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6149 end of an if-else-if-sequence of checks.
6150
9a069bdd
DH
61512003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6152
6153 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6154 execution. Generalize apply_closure to apply_proc and use that
6155 for call-with-values.
6156
e910e9d2
DH
61572003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6158
6159 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6160 a non closure.
6161
1e498fbd
SJ
61622003-05-30 Stefan Jahn <stefan@lkcc.org>
6163
6164 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6165 appropriately for mingw32 hosts.
6166
6167 * numbers.h: Defining copysign(), isnan() and finite() to
6168 be prefixed by a single '_' for mingw32 hosts.
6169
c47e2599
KR
61702003-05-30 Kevin Ryde <user42@zip.com.au>
6171
6172 * numbers.c (z_negative_one): New variable.
6173 (scm_init_numbers): Initialize it.
6174 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6175
2e945bcc
SJ
61762003-05-29 Stefan Jahn <stefan@lkcc.org>
6177
6178 * win32-dirent.c: Use malloc() instead of scm_malloc().
6179
6180 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6181 warning.
6182
6183 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6184 mingw32 build.
6185
6186 * modules.c (s_scm_module_import_interface): Renamed local
6187 variable interface to _interface. Seems like 'interface'
6188 is a special compiler directive for the mingw32 compiler.
6189
6190 * mkstemp.c: Provide prototype to avoid compiler warning.
6191
6192 * load.c (s_scm_search_path): Fixed absolute and relative
6193 path detections for native Windows platforms.
6194
6195 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6196 to build on mingw32).
6197
6198 * gc-freelist.c ("s_scm_map_free_list",
6199 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6200
6201 * fports.c (fport_fill_input): Disable use of
6202 fport_wait_for_input() on Win32 platforms.
6203
6204 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6205
6206 * Makefile.am: Modified some rules for cross compiling.
6207
ddd8f927
DH
62082003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6209
6210 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6211 proper function object and the correct number of arguments are now
6212 performed in the application part of SCM_CEVAL.
6213
6214 (scm_badformalsp): Removed.
6215
f8ba2197
DH
62162003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6217
6218 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6219
79f55b7c
MD
62202003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6221
a502595f
MD
6222 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6223 always being false by inserting preprocessor conditional. (Thanks
6224 to Bruce Korb.)
6225
79f55b7c
MD
6226 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6227 (void *) in order to avoid an aliasing warning; thanks to Bruce
6228 Korb.)
6229
6230 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6231
6232 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6233 SCM_STACK_PTR.
6234
6235 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6236 thread->base --> t->base.
6237
6238 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6239
47dee228
MV
62402003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6241
6242 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6243 scm_variable_set_name_hint, scm_builtin_variable,
6244 scm_internal_with_fluids, scm_make_gsubr,
6245 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6246 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6247 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6248 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6249 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6250 scm_make_subr_with_generic, scm_make_subr_opt,
6251 scm_call_catching_errors, scm_make_smob_type_mfpe,
6252 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6253 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6254 branch. Some have been slightly rewritten.
6255 (scm_i_object_chars, scm_i_object_length): New, to support
6256 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6257
e681d187
DH
62582003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6259
6260 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6261 names and inits in the memoized code of do.
6262
7e59d9d4
MD
62632003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6264
6265 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6266 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6267 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6268 a compilation error if error-on-warning is enabled).
6269
9950a42c
MV
62702003-05-17 Marius Vollmer <mvo@zagadka.de>
6271
6272 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6273 removes preprocessor directives from the snarfage that might
6274 otherwise confuse us. These directives appear when compiling with
6275 "-g3", for example.
6276
0068984b
HWN
62772003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6278
26e68795
HWN
6279 * ChangeLog: add my surname
6280
0068984b
HWN
6281 * srcprop.c (scm_finish_srcprop): use
6282 scm_gc_register_collectable_memory()
6283 (scm_make_srcprops): idem.
6284
131805f0
HWN
62852003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6286
6287 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6288 wrap-around for scm_mtrigger
6289 (scm_gc_register_collectable_memory): abort on overflowing
6290 scm_mallocated().
6291
d4611024
KR
62922003-05-13 Kevin Ryde <user42@zip.com.au>
6293
6294 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6295 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6296
7aaf8dc9
MD
62972003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6298
dfd03fb9
MD
6299 * backtrace.c (scm_display_error_message): Introduced fancy
6300 printing with max level 7 and length 10. (Purpose: avoid printing
6301 gigantic objects in error messages.)
6302
6303 * print.c, print.h (scm_i_port_with_print_state): New function.
6304
6305 * print.c (scm_iprin1, scm_printer_apply,
6306 scm_port_with_print_state): Use scm_i_port_with_print_state.
6307 (scm_simple_format): Modified not to destroy print states.
6308 (print_state_mutex): New mutex.
6309 (scm_make_print_state, scm_free_print_state, scm_prin1):
6310 Lock/unlock print_state_mutex.
6311
7aaf8dc9
MD
6312 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6313 Use current names in definitions.
6314
a4d9ffa1
KR
63152003-05-10 Kevin Ryde <user42@zip.com.au>
6316
6317 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6318
d25e96a4
KR
6319 * numbers.c (scm_integer_length): On negative bignums, adjust
6320 mpz_sizeinbase to account for it looking at absolute value where we
6321 want ones-complement.
6322
6323 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6324 since we're only using the ulong return value, and x might not fit.
6325
5bf6a6f0
DH
63262003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6327
6328 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6329 read. This will allow to make the definition in read.c static.
6330
f58c472a
DH
63312003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6332
6333 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6334 from evalext to eval. This will allow to make some of the
6335 definitions in eval.c static.
6336
90382aeb
KR
63372003-05-06 Kevin Ryde <user42@zip.com.au>
6338
6339 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6340 (scm_logcount): Use mpz_com, not mpz_neg.
6341
3b88ed2a
DH
63422003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6343
6344 The purpose of this patch is to make guile's internal memoizers
6345 distinguishable from memoizing macros created on the scheme level
6346 or from user provided primitive memoizing macros. The reason is,
6347 that the internal memoizers are the only ones that are allowed to
6348 transform their scheme input into memoizer byte code, while all
6349 other memoizing macros may only transform scheme code into new
6350 scheme code.
6351
6352 To achieve this, a new macro type 'builtin-macro!' is introduced.
6353 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6354 this will change when the memoizer and executor are separated.
6355
6356 * macros.[ch] (scm_i_makbimacro): New.
6357
6358 * macros.h (SCM_BUILTIN_MACRO_P): New.
6359
6360 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6361
6362 * eval.c, goops.c: All of guile's primitive memoizing macros are
6363 primitive builtin-macros now.
6364
6365 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6366 builtin-macros are handled equally to memoizing macros.
6367
b0780eb1
MV
63682003-05-04 Marius Vollmer <mvo@zagadka.de>
6369
6370 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6371 work around a bug in GCC 2.95.2 but is now a bug in itself.
6372
1cbf4fe9
MV
63732003-05-02 Marius Vollmer <mvo@zagadka.de>
6374
6375 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6376 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6377 scm_tcs_symbols): New.
6378
1a61d41b
MV
63792003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6380
096ecbaf
MV
6381 * deprecated.h, deprecated.c (scm_protect_object,
6382 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6383 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6384 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6385 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6386 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6387 scm_ptob_descriptor, scm_port_rw_active,
6388 scm_close_all_ports_except): New.
6389
1a61d41b
MV
6390 * ports.c (scm_c_port_for_each): New function, mostly copied from
6391 scm_port_for_each.
6392 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6393 * ports.h (scm_c_port_for_each): New prototype.
6394
c8e1d354
MD
63952003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6396
6397 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6398 macro was introduced in anticipation of GOOPS method compilation
6399 code.)
6400
6401 * goops.c: Removed binding of @dispatch.
6402
a4aa2134
DH
64032003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6404
6405 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6406 instructions that bind the macros on the scheme level back to
6407 goops.c in order to make sure again that the bindings go into the
6408 (oop goops) module and are not visible from the outside.
6409
9fbee57e
DH
64102003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6411
6412 * eval.c: Non functional change: Separated R5RS and non-R5RS
6413 macros into different sections of the file and ordered the
6414 memoizers alphabetically.
6415
12841895
DH
64162003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6417
6418 * eval.c (scm_ilookup): Rewritten to improve readability.
6419
6a3f13f0
DH
64202003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6421
6422 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6423 Partially reverted patch from 2003-04-23 in oder to find a better
6424 compromise between readability and debuggability.
6425
b0c5d67b
DH
64262003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6427
6428 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6429 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6430 definitions of the special goops memoizers from goops.[ch] to
6431 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6432 throughout guile.
6433
b9ad392e
MD
64342003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6435
6436 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6437
6438 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6439
6440 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6441
6442 * ioext.c (scm_fdes_to_ports): Ditto.
6443
6444 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6445 lock/unlock scm_i_port_table_mutex.
6446
6447 * strports.c (scm_mkstrport): Ditto.
6448
6449 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6450
6451 * fports.c (scm_fdes_to_port): Ditto.
6452
d0b07b5d
DH
64532003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6454
6455 This set of patches contains no functional changes, only debatable
6456 minor stylistic ones. Still, in order to prepare a patch between
6457 my local copy and the CVS version, I decided to submit the changes
6458 below. Then, the patch will hopefully only contain relevant
6459 modifications :-)
6460
6461 * eval.c (iqq): Added const specifier.
6462
6463 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6464 Use NULL instead of 0 to indicate that a pointer is returned.
6465 Removed some misleading 'fall through' comments.
6466
6467 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6468 Split up long expressions into smaller ones to be more debugging
6469 friendly.
6470
a98e8e98
DH
64712003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6472
6473 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6474 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6475 rather than casting to SCM.
6476
c178c3a6
DH
64772003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6478
6479 * sort.c, pairs.h: Removed unnecessary includes.
6480
d339981a
DH
64812003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6482
6483 * sort.c: Replaced hand-made trampline code by the new official
6484 mechanism from eval.c. This fixes a segfault in the new test file
6485 sort.test.
6486
6487 (quicksort, compare_function, scm_restricted_vector_sort_x,
6488 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6489 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6490 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6491 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6492 eval.c.
6493
6494 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6495 cmp_fun_t): Removed.
6496
6497 (compare_function): Added.
6498
6499 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6500 arithmetics with index arithmetics. Changed quicksort to work on
6501 an array of SCM values instead of an array of characters. Avoid
6502 bytewise copying of SCM elements. Avoid allocating memory on the
6503 stack with alloca. Fixed some comments.
6504
821f18a4
DH
65052003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6506
6507 * eval.c (EXTEND_ENV): Eliminated.
6508
6509 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6510 EXTEND_ENV.
6511
94fb5a6e
DH
65122003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6513
6514 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6515
6516 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6517 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6518
6519 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6520 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6521 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6522 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6523 functions such that they check if the object is a non-immediate.
6524 Further, renamed identifiers to use the scm_dbg_ prefix and made
6525 their inclusion into the lib dependent of the
6526 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6527
fce0b22d
DH
65282003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6529
6530 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6531 debug option.
6532
1685446c
DH
65332003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6534
821f18a4 6535 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6536 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6537 any calls to SCM_NCONSP any more.
6538
6539 * unif.c (l2ra): Eliminate redundant check.
6540
9ff1720f
DH
65412003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6542
6543 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6544 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6545 SCM_NNULLP. Now, guile itself does not include any calls to
6546 SCM_NNULLP any more.
6547
05b15362
DH
65482003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6549
6550 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6551 scm_copy_tree): Place assignment expressions which are part of
6552 other expressions into an expression of their own.
6553
0c88d7df
DH
65542003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6555
6556 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6557 compare SCM values with !=.
6558
5cb22e96
DH
65592003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6560
6561 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6562 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6563 and definition of the memoizer for the generalized set! macro from
6564 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6565 define the macro object.
6566
6567 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6568 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6569 eval.c, it is made static and renamed to s_set_x.
6570
6571 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6572 over SCM_N<foo>.
6573
a44a9715
DH
65742003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6575
6576 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6577 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6578 to undefineds and registered the object as a permanent object.
6579
6580 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6581 static in eval.c, renamed it to f_apply and registered the object
6582 as a permanent object.
6583
1b43d24c
DH
65842003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6585
5cb22e96 6586 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6587 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6588
aec16f99
DH
65892003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6590
6591 * numbers.c (scm_logtest): Fixed argument bug in the call to
6592 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6593
f96460ce
DH
65942003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6595
6596 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6597 type errors that showed up when compiling with SCM_DEBUG defined.
6598
d0f6ceb8
DH
65992003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6600
6601 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6602 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6603 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6604 fix compile errors with --disable-deprecated.
6605
19a7a089
RB
66062003-04-17 Rob Browning <rlb@defaultvalue.org>
6607
6608 * numbers.c (scm_integer_expt): fix case where we were declaring
6609 vars in the middle of a statement block. Thanks to Thamer
6610 Al-Harbash.
6611
47cd67db
MD
66122003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6613
0fd7dcd3
MD
6614 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6615 change.
6616
47cd67db
MD
6617 * eq.c (scm_eqv_p): Turned into a primitive generic.
6618
3b8b889c
RB
66192003-04-16 Rob Browning <rlb@defaultvalue.org>
6620
312006bb
RB
6621 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6622 Thanks to Boyd Gerber.
6623 Added check for __arm__ in addition to arm for LINUX and copied
6624 __s390__ defines from upstream libgc. Thanks to James Treacy for
6625 reporting the problems.
c7ef2ea1 6626
3b8b889c
RB
6627 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6628
6629 * socket.c: use SCM_CHAR_BIT.
6630
6631 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6632
6633 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6634
43261b39
MD
66352003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6636
6637 * feature.c (scm_init_feature): Always add threads feature.
6638
58241edc
MD
66392003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6640
6641 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6642 scm_at_assert_bound_ref. (We don't want the unbound check. See
6643 oop/goops/active-slot.scm.)
6644
94e91275
RB
66452003-04-14 Rob Browning <rlb@defaultvalue.org>
6646
6647 * tags.h: scm_t_intptr should have been intptr_t.
6648
3071ea27
RB
66492003-04-13 Rob Browning <rlb@defaultvalue.org>
6650
6651 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6652 test. Instead use
6653 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6654 as gc_os_dep.c suggests is appropriate.
6655
6656 * goops.c (prep_hashsets): make static to match prototype.
6657 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6658 Chin.
6659
6660 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6661 Albert Chin.
6662
6663 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6664 Klausner.
6665
21ab2aeb
MD
66662003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6667
6668 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6669 indicated through extra fields in getters-n-setters.
6670 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6671 (Thanks to Andy Wingo.)
6672
dff96e95
HWN
66732003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6674
6675 * gc-segment.c: add comment
6676
07921c76
RB
66772003-04-07 Rob Browning <rlb@defaultvalue.org>
6678
b5331f10
RB
6679 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6680 clash.
6681
07921c76
RB
6682 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6683 and add regression test to standalone/.
6684
66852003-04-06 Rob Browning <rlb@defaultvalue.org>
6686
6687 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6688 Thanks to Dale P. Smith.
6689
6690 * random.c: #include gmp.h.
6691 (scm_c_random_bignum): normalize result on return.
6692
6693 * init.c: #include gmp.h.
6694
6695 * numbers.h: remove the gmp.h #include (not needed now).
6696
6697 * posix.h: change occurences of "id" to something else so we don't
6698 cause trouble when included via objective-c (can't hurt, might
6699 help). Still have usage in debug.h, though.
6700
938f6b7c
MD
67012003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6702
372691d8
MD
6703 * random.c (scm_c_random_bignum): Don't generate a random number
6704 equal to m (the second argument of scm_c_random_bignum); only
6705 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6706 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6707 scm_var_random_state.
372691d8 6708
938f6b7c
MD
6709 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6710 clause.
6711
6cdb8c3f
RB
67122003-04-05 Rob Browning <rlb@defaultvalue.org>
6713
938f6b7c 6714 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6715 uses before any code.
6716
15635be5
MD
67172003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6718
1ecfd013
MD
6719 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6720 not top_srcdir.
6721
15635be5
MD
6722 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6723 processing it in order to avoid an infinite loop.
6724
6725 * print.c (scm_prin1): Remember old state of pstate->writingp.
6726
73be1d9e
MV
67272003-04-05 Marius Vollmer <mvo@zagadka.de>
6728
6729 * Changed license terms to the plain LGPL thru-out.
6730
ad815c06
RB
67312003-04-04 Rob Browning <rlb@defaultvalue.org>
6732
6733 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6734 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6735 rewrite to handle GMP bignums.
6736
6737
6738 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6739
6740 * ports.c (scm_getc): minor tweak.
6741
6742 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6743 rewrite to handle GMP bignums.
6744
6745 * numbers.c: rewrite *many* functions to handle GMP bignums.
6746
6747 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6748 handle GMP bignums.
6749
6750 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6751
6752 * init.c (check_config): remove SCM_BIGDIG conditionals.
6753 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6754
6755 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6756
6757 * eval.c: remove SCM_BIGDIG conditionals.
6758
6759 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6760
6cdb8c3f
RB
67612003-03-31 Rob Browning <rlb@defaultvalue.org>
6762
6763 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6764 to Kevin Ryde.)
6765
67662003-03-27 Rob Browning <rlb@defaultvalue.org>
6767
6768 * threads.h: fix various preprocessor usages of new public
6769 symbols to expect 0 or 1 values rather than 1 or undefined.
6770 i.e. change #ifdef to #if, etc.
6771
6772 * threads.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
6776 * tags.h: fix various preprocessor usages of new public
6777 symbols to expect 0 or 1 values rather than 1 or undefined.
6778 i.e. change #ifdef to #if, etc.
6779
6780 * stacks.c: fix various preprocessor usages of new public
6781 symbols to expect 0 or 1 values rather than 1 or undefined.
6782 i.e. change #ifdef to #if, etc.
6783
6784 * stackchk.h: fix various preprocessor usages of new public
6785 symbols to expect 0 or 1 values rather than 1 or undefined.
6786 i.e. change #ifdef to #if, etc.
6787
6788 * stackchk.c: fix various preprocessor usages of new public
6789 symbols to expect 0 or 1 values rather than 1 or undefined.
6790 i.e. change #ifdef to #if, etc.
6791
6792 * sort.c: fix various preprocessor usages of new public
6793 symbols to expect 0 or 1 values rather than 1 or undefined.
6794 i.e. change #ifdef to #if, etc.
6795
6796 * read.c: fix various preprocessor usages of new public
6797 symbols to expect 0 or 1 values rather than 1 or undefined.
6798 i.e. change #ifdef to #if, etc.
6799
6800 * random.c: fix various preprocessor usages of new public
6801 symbols to expect 0 or 1 values rather than 1 or undefined.
6802 i.e. change #ifdef to #if, etc.
6803
6804 * print.c: fix various preprocessor usages of new public
6805 symbols to expect 0 or 1 values rather than 1 or undefined.
6806 i.e. change #ifdef to #if, etc.
6807
6808 * objects.c: fix various preprocessor usages of new public
6809 symbols to expect 0 or 1 values rather than 1 or undefined.
6810 i.e. change #ifdef to #if, etc.
6811
6812 * numbers.h: fix various preprocessor usages of new public
6813 symbols to expect 0 or 1 values rather than 1 or undefined.
6814 i.e. change #ifdef to #if, etc.
6815
6816 * null-threads.c: fix various preprocessor usages of new public
6817 symbols to expect 0 or 1 values rather than 1 or undefined.
6818 i.e. change #ifdef to #if, etc.
6819
6820 * lang.c: fix various preprocessor usages of new public
6821 symbols to expect 0 or 1 values rather than 1 or undefined.
6822 i.e. change #ifdef to #if, etc.
6823
6824 * lang.h: fix various preprocessor usages of new public
6825 symbols to expect 0 or 1 values rather than 1 or undefined.
6826 i.e. change #ifdef to #if, etc.
6827
6828 * iselect.h: fix various preprocessor usages of new public
6829 symbols to expect 0 or 1 values rather than 1 or undefined.
6830 i.e. change #ifdef to #if, etc.
6831
6832 * init.c: fix various preprocessor usages of new public
6833 symbols to expect 0 or 1 values rather than 1 or undefined.
6834 i.e. change #ifdef to #if, etc.
6835
6836 * gh_data.c: fix various preprocessor usages of new public
6837 symbols to expect 0 or 1 values rather than 1 or undefined.
6838 i.e. change #ifdef to #if, etc.
6839
6840 * gh.h: fix various preprocessor usages of new public
6841 symbols to expect 0 or 1 values rather than 1 or undefined.
6842 i.e. change #ifdef to #if, etc.
6843
6844 * gen-scmconfig.c: change most new public symbols to be defined to
6845 0 or 1 rather than being either 1 or undefined.
6846
6847 * gc_os_dep.c: fix various preprocessor usages of new public
6848 symbols to expect 0 or 1 values rather than 1 or undefined.
6849 i.e. change #ifdef to #if, etc.
6850 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6851
6852 * gc.h: fix various preprocessor usages of new public
6853 symbols to expect 0 or 1 values rather than 1 or undefined.
6854 i.e. change #ifdef to #if, etc.
6855
6856 * gc-card.c: fix various preprocessor usages of new public
6857 symbols to expect 0 or 1 values rather than 1 or undefined.
6858 i.e. change #ifdef to #if, etc.
6859
6860 * gc-mark.c: fix various preprocessor usages of new public
6861 symbols to expect 0 or 1 values rather than 1 or undefined.
6862 i.e. change #ifdef to #if, etc.
6863
6864 * feature.c: fix various preprocessor usages of new public
6865 symbols to expect 0 or 1 values rather than 1 or undefined.
6866 i.e. change #ifdef to #if, etc.
6867
6868 * evalext.c: fix various preprocessor usages of new public
6869 symbols to expect 0 or 1 values rather than 1 or undefined.
6870 i.e. change #ifdef to #if, etc.
6871
6872 * eval.h: fix various preprocessor usages of new public
6873 symbols to expect 0 or 1 values rather than 1 or undefined.
6874 i.e. change #ifdef to #if, etc.
6875
6876 * eval.c: fix various preprocessor usages of new public
6877 symbols to expect 0 or 1 values rather than 1 or undefined.
6878 i.e. change #ifdef to #if, etc.
6879
6880 * eq.c: fix various preprocessor usages of new public
6881 symbols to expect 0 or 1 values rather than 1 or undefined.
6882 i.e. change #ifdef to #if, etc.
6883
6884 * coop.c: fix various preprocessor usages of new public
6885 symbols to expect 0 or 1 values rather than 1 or undefined.
6886 i.e. change #ifdef to #if, etc.
6887
6888 * coop-threads.c: fix various preprocessor usages of new public
6889 symbols to expect 0 or 1 values rather than 1 or undefined.
6890 i.e. change #ifdef to #if, etc.
6891
6892 * coop-pthreads.c: fix various preprocessor usages of new public
6893 symbols to expect 0 or 1 values rather than 1 or undefined.
6894 i.e. change #ifdef to #if, etc.
6895
6896 * coop-defs.h: fix various preprocessor usages of new public
6897 symbols to expect 0 or 1 values rather than 1 or undefined.
6898 i.e. change #ifdef to #if, etc.
6899
6900 * convert.i.c: fix various preprocessor usages of new public
6901 symbols to expect 0 or 1 values rather than 1 or undefined.
6902 i.e. change #ifdef to #if, etc.
6903
6904 * continuations.c: fix various preprocessor usages of new public
6905 symbols to expect 0 or 1 values rather than 1 or undefined.
6906 i.e. change #ifdef to #if, etc.
6907
6908 * _scm.h: fix various preprocessor usages of new public symbols to
6909 expect 0 or 1 values rather than 1 or undefined. i.e. change
6910 #ifdef to #if, etc.
6911
d11d697a
MV
69122003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6913
9686f86d
MV
6914 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6915
6916 * deprecated.c, deprecated.h: New files, to collect deprecated
6917 things in one place.
6918 * Makefile.am: Added them in all the right places.
6919
d11d697a
MV
6920 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6921 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6922 builds work.
9686f86d
MV
6923 (DOT_X_FILES): Removed "iselect.x".
6924 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 6925
e3c0c3b9
RB
69262003-03-25 Rob Browning <rlb@defaultvalue.org>
6927
6928 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6929 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6930
6931 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6932
6933 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6934
6935 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6936 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6937
6938 * threads.h: replace usage of struct timespect with
6939 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6940 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6941 favor of scm_t_timespec from scmconfig.h.
6942
6943 * threads.c: move libguile/_scm.h include to the top so we pick up
6944 any critical defines like _GNU_SOURCE early. Replace usage of
6945 struct timespect with scm_t_timespec. Replace usage of
6946 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
6947 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
6948
6949 * threads-plugin.h: replace usage of struct timespect with
6950 scm_t_timespec.
6951
6952 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
6953 usage of struct timespect with scm_t_timespec.
6954
6955 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
6956 HAVE_INTTYPES_H handling to scmconfig.h. #include
6957 "libguile/__scm.h". Rework handling for scm_t_bits,
6958 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
6959 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
6960 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
6961 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
6962 SCM_HAVE_ARRAYS.
6963
6964 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
6965
6966 * struct.c: #include <config.h> if HAVE_CONFIG_H.
6967
6968 * strports.c: #include <config.h> if HAVE_CONFIG_H.
6969
6970 * strop.c: #include <config.h> if HAVE_CONFIG_H.
6971
6972 * stime.h: move handling of time related headers to scmconfig.h.
6973
6974 * stime.c: #include <config.h> if HAVE_CONFIG_H.
6975
6976 * stacks.c: replace usage of STACK_GROWS_UP with
6977 SCM_STACK_GROWS_UP.
6978
6979 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6980 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6981
6982 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6983 of uint32 and HAVE_UINT_32 with scm_t_int32.
6984
6985 * smob.c: #include <config.h> if HAVE_CONFIG_H.
6986
6987 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
6988
6989 * script.c: #include <config.h> if HAVE_CONFIG_H.
6990
6991 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
6992
6993 * scmconfig.h.top: new file -- preamble for scmconfig.h.
6994
6995 * rw.c: #include <config.h> if HAVE_CONFIG_H.
6996
6997 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
6998
6999 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7000
7001 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7002
7003 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7004 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7005 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7006 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7007
7008 * ramap.c: replace usage of HAVE_LONG_LONGS with
7009 "SCM_SIZEOF_LONG_LONG != 0".
7010
7011 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7012 "libguile/scmconfig.h".
7013
7014 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7015
7016 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7017 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7018
7019 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7020
7021 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7022
7023 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7024
7025 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7026 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7027 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7028 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7029 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7030 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7031 "SCM_SIZEOF_LONG_LONG != 0".
7032
7033 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7034 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7035 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7036 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7037
7038 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7039
7040 * null-threads.h: replace usage of struct timespect with
7041 scm_t_timespec.
7042
7043 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7044
7045 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7046 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7047 scm_t_uint64 and rename usages.
7048
7049 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7050
7051 * load.c: #include <config.h> if HAVE_CONFIG_H.
7052
7053 * iselect.h: move handling of time related headers to scmconfig.h.
7054 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7055 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7056 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7057
7058 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7059 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7060 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7061
7062 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7063
7064 * inline.h: #include "libguile/__scm.h" at the top. Change code
7065 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7066 what to do instead of creating a new public #define. Rename usage
7067 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7068 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7069 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7070
7071 * inline.c: rearrange handling -- now we just #define
7072 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7073 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7074 appropriate, and we use that in inline.h along with the above
7075 define to determine how to respond.
7076
7077 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7078 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7079
7080 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7081
7082 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7083 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7084
7085 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7086
7087 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7088
7089 * gen-scmconfig.c: new file -- see comments in file for details.
7090
7091 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7092
7093 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7094 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7095
7096 * gc.h: replace usage of SIZEOF_LONG with
7097 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7098 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7099 since we handle that in scmconfig.h now.
7100
7101 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7102
7103 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7104 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7105 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7106
7107 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7108
7109 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7110 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7111
7112 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7113
7114 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7115
7116 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7117 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7118
7119 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7120
7121 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7122 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7123
7124 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7125 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7126 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7127 with "SCM_SIZEOF_LONG_LONG != 0".
7128
7129 * error.c: #include <config.h> if HAVE_CONFIG_H.
7130
7131 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7132 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7133 with "SCM_SIZEOF_LONG_LONG != 0".
7134
7135 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7136
7137 * coop.c: replace usage of struct timespect with scm_t_timespec.
7138 #include <config.h> if HAVE_CONFIG_H.
7139
7140 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7141 usage of struct timespect with scm_t_timespec. Replace usage of
7142 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7143
7144 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7145 usage of struct timespect with scm_t_timespec. Replace usage of
7146 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7147
7148 * coop-defs.h: move handling of time related headers to
7149 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7150 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7151 timespect with scm_t_timespec.
7152
7153 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7154
7155 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7156
7157 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7158 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7159
7160 * continuations.c: move libguile/_scm.h include to the top so we
7161 pick up any critical defines like _GNU_SOURCE early.
7162
7163 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7164
7165 * async.c: #include <config.h> if HAVE_CONFIG_H.
7166
7167 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7168
7169 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7170 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7171
7172 * __scm.h: move libguile/scmconfig.h include up to the top, so
7173 we're sure to pick up any critical defines like _GNU_SOURCE early.
7174 #include <limits.h> removed in favor of scmconfig.h inclusion when
7175 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7176 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7177 scmconfig.h inclusion when appropriate. Various Win32 related
7178 definitions removed in favor of scmconfig.h inclusion when
7179 appropriate.
7180 (HAVE_UINTPTR_T): definition removed (see NEWS).
7181 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7182 (HAVE_LONG_LONGS): definition removed (see NEWS).
7183 (HAVE_LONG_LONG): definition removed (see NEWS).
7184 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7185
7186 * Makefile.am: scmconfig.h is now generated by building and
7187 running gen-scmconfig.h and capturing its output. gen-scmconfig
7188 uses config.h and the configure.in generated gen-scmconfig.h to
7189 decide what to output. See gen-scmconfig.c for details.
7190 (noinst_PROGRAMS): add gen-scmconfig.
7191 (gen_scmconfig_SOURCES): new variable.
7192 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7193 cross-compiling right.
7194 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7195 (BUILT_SOURCES): add scmconfig.h.
7196
25e0bf97
MV
71972003-03-19 Marius Vollmer <mvo@zagadka.de>
7198
7199 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7200 Adrian Bunk. Thanks!
7201
74b6d6e4
MD
72022003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7203
7204 * goops.c (make_class_from_template): New fourth arg:
7205 applicablep.
7206 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7207 cpls.
7208
7209 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7210
7211 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7212 second arg: applicablep.
7213 (scm_i_inherit_applicable): New function.
7214
7215 * goops.c, goops.h (scm_class_applicable,
7216 scm_class_extended_accessor): New classes.
7217
5c9e7dad
DH
72182003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7219
7220 * procs.c (scm_procedure_documentation): Removed redundant
7221 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7222 predicates.
7223
f8af5c6d
MD
72242003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7225
c614a00b
MD
7226 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7227
109c2c9f
MD
7228 * modules.c (scm_module_import_interface): New function.
7229
f8af5c6d
MD
7230 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7231 scm_class_accessor.
7232 (scm_class_accessor): New class.
7233
a48d60b1
MD
72342003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7235
7236 * goops.c (scm_primitive_generic_generic): Enable primitive
7237 generic if not enabled.
7238 (scm_sys_goops_loaded): Setup unextended primitive generics.
7239
7240 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7241
7242 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7243 snarf macros.
7244
7245 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7246 testing example. All uses of SCM_GPROC should be converted.)
7247
7248 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7249 scm_assoc.
7250
7251 * eq.c (scm_equal_p): Turned into a primitive generic.
7252
84edc049
RB
72532003-02-27 Rob Browning <rlb@defaultvalue.org>
7254
7255 * Makefile.am (scmconfig.h): new target -- generate file from
7256 ../config.h.
7257 (modinclude_HEADERS): remove version.h.
7258 (nodist_modinclude_HEADERS): add version.h.
7259
ea5c9285
MD
72602003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7261
b4a1358c
MD
7262 This fixes a serious GC bug, introduced during the latest
7263 reorganization of the GC, which disabled freeing of structs and
7264 GOOPS objects:
7265
7266 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7267 SCM_EOL.
53af8255
MD
7268 (scm_struct_prehistory): Move scm_free_structs to
7269 scm_before_mark_c_hook.
ea5c9285 7270
b4a1358c
MD
7271 * gc-card.c (sweep_card): Check that we haven't swept structs on
7272 this card before. That can happen if scm_i_sweep_all_segments has
7273 been called from some other place than scm_igc.
7274
c35738c1
MD
72752003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7276
231a4ea8
MD
7277 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7278 (since hash tables now adapt their size).
7279
7280 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7281 (current number of prehistory bindings; hashtable code will select
7282 a prime which is greater than this value).
7283
7284 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7285 (current number of initial symbols).
7286
7287 * properties.c (scm_init_properties): Don't specify size of
7288 scm_properties_whash.
7289
7290 * objprop.c (scm_init_objprop): Don't specify size of
7291 scm_object_whash.
7292
7293 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7294
c35738c1
MD
7295 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7296
7297 The following changes introduce the use of resizable hash tables
7298 throughout Guile. It also renames the old *-hash-table* functions
7299 to *-alist-vector* and places them, together with the rest of the
7300 weak vector support, in the module (ice-9 weak-vector). We should
7301 probably introduce a new, better, API for weak references, for
7302 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7303 look like and are used like ordinary pairs.)
7304
7305 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7306 leaf_environment_fold, obarray_remove_all): Use hashtable
7307 accessors.
7308
7309 * gc.c (scm_init_storage): Moved hook initialization to
7310 scm_storage_prehistory.
7311 (scm_storage_prehistory): New function.
7312 (scm_igc): Added commentary about placement of
7313 scm_after_sweep_c_hook.
7314
7315 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7316 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7317 SCM_WVECT_WEAK_VALUE_P.
7318
7319 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7320 functions.
7321 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7322 Removed.
7323 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7324 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7325
7326 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7327 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7328
7329 * modules.c (module-reverse-lookup): Use hashtable accessors.
7330
7331 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7332
7333 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7334 scm_make_weak_value_alist_vector,
7335 scm_make_doubly_weak_alist_vector): New functions.
7336
7337 * weaks.c (scm_init_weaks_builtins): New function.
7338
7339 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7340 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7341 SCM_WVECT_NOSCAN_P): New macros.
7342
7343 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7344 and SCM_WVECT_WEAK_VALUE_P.
7345
7346 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7347 allocate_weak_vector and exported.
7348
0a4c1355
MD
73492003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7350
7351 * hashtab.c: Undid thread safety. (We decided that it's better to
7352 let the user explicitly protect the tables (or not) according what
7353 is suitable for the application.)
7354
87ca11ff
MD
73552003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7356
7357 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7358 thread safe and handle resizing tables.
7359 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7360 SCM_DEFER/ALLOW_INTS.
7361
f59a096e
MD
73622003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7363
7364 * hashtab.c (scm_vector_to_hash_table,
7365 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7366 functions.
7367 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7368 safe and handle resizing tables.
7369
7370 * weaks.c (scm_make_weak_key_hash_table,
7371 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7372 Size argument made optional. Return resizable table if not
7373 specified.
7374
4b612c5b
MD
73752003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7376
7377 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7378 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7379
b3d7f6df
MD
73802003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7381
7382 * debug.c (scm_procedure_source): Handle all objects for which
7383 procedure? is #t. (Thanks to Bill Schottstaedt.)
7384
756414cf
MD
73852003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7386
361d631f
MD
7387 * futures.c (mark_futures): Don't need to mark data of recycled
7388 futures.
7389 (scan_futures, cleanup_undead): Be smarter about marking
7390 futures---avoid unnecessary passes through future lists.
7391
756414cf
MD
7392 * futures.h, futures.c: New files; Introduced recycling of
7393 futures. For fine-grained threading this lifts performance to
7394 another level. We can now use parallelization in inner loops of
7395 Guile programs without impossible overhead.
7396
7397 * threads.h, threads.c: Moved futures to their own file.
7398
7399 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7400 (DOT_X_FILES): Added futures.x.
7401 (DOT_DOC_FILES): Added futures.doc.
7402 (modinclude_HEADERS): Added futures.h.
7403
7404 * threads.c, threads.h (scm_i_create_thread): Renamed from
7405 create_thread and made global.
7406
7407 * futures.c (scm_make_future): New procedure.
7408
7409 * eval.c: #include "libguile/futures.h".
7410
7411 * init.c: #include "futures.h"
7412 (scm_init_guile_1): Call scm_init_futures.
7413
7414 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7415
7416 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7417
7418 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7419 functions.
7420
7421 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7422
b4debead
MD
74232003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7424
7425 * threads.c (create_thread): Don't unwind dynwind chain of parent
7426 thread before creation. Just start the new thread with an empty
7427 dynwind chain.
7428
93f26b7b
MD
74292003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7430
7431 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7432
38d8927c
MD
74332003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7434
41c96c32
MD
7435 * threads.c (scm_timed_wait_condition_variable): Support timed
7436 waiting also for simple condition variables.
7437
38d8927c
MD
7438 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7439 of calling the procedure change-object-class.
7440
9cf5d9b7
MD
74412003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7442
7443 * ramap.c (scm_ramapc): Typo in error message.
7444
bbf8d523
MD
74452003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7446
b46fae00
MD
7447 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7448 slots with instance allocation.
7449
bbf8d523
MD
7450 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7451 class.
7452 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7453
7454 * goops.c (scm_generic_function_methods): Support extended
7455 generic functions.
7456
ebf9b47c
MD
74572002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7458
7459 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7460 Thanks to Neil for pointing this out!
ebf9b47c 7461
14a9ba3f
NJ
74622002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7463
7464 * lang.h: Remove declarations matching definitions removed from
7465 lang.c (just below).
7466
c6a040a8
NJ
74672002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7468
6054d805
NJ
7469 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7470 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7471 and already commented out.
7472
c6a040a8
NJ
7473 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7474 scm_lreadparen): Support reading vectors with Elisp syntax if
7475 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7476 is not currently defined, and there isn't even a configure switch
7477 to enable it yet.)
7478
3742c12f
MV
74792002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7480
7481 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7482 builds work.
7483 (EXTRA_DIST): Added version.h.in.
7484
fb50ef08
MD
74852002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7486
7487 This change makes it possible for one thread to do lazy sweeping
7488 while other threads are running. Now only the mark phase need to
7489 have all threads asleep. We should look further into this issue.
7490 Presently, I've put the locking of scm_i_sweep_mutex at
7491 "conservative" places due to my current lack of knowledge about
7492 the garbage collector. Please feel free to restrict these regions
7493 further to allow for maximal parallelism!
7494
7495 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7496
7497 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7498 scm_gc_register_collectable_memory): Substitute locking of
7499 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7500 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7501 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7502 the single-thread section (which now only contains the mark
7503 phase).
7504 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7505 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7506
7507 * threads.c (gc_section_mutex): Removed.
7508
9ed24633
MD
75092002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7510
0d48aca5
MD
7511 * threads.c (create_thread): Clear parent field in root state in
7512 order not to unnecessarily remember dead threads.
7513
9ed24633
MD
7514 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7515 (scm_trampoline_1, scm_trampoline_2): Use them.
7516
29717c89
MD
75172002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7518
7519 Partial introduction of real plugin interface.
7520
7521 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7522 (EXTRA_DIST): Added threads-plugin.c.
7523
7524 * threads-plugin.h, threads-plugin.c: New files.
7525
7526 * threads.h: #include "libguile/threads-plugin.h".
7527
7528 * threads.c: #include "libguile/threads-plugin.c".
7529
7530 * pthread-threads.c: Temporarily remove debugging functions.
7531
7532 * threads.c, threads.h (scm_yield): Added back.
7533
e29e0b09
MD
75342002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7535
7536 * threads.c (really_launch): Detach before unlocking
7537 thread_admin_mutex in order not to risk being joined.
7538 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7539 thread_admin_mutex locked during GC.
7540
7541 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7542 functions.
7543
0b6843b1 75442002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7545
6da2dfc4
MD
7546 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7547 support for debugging mutex operations.
7548
1b92fb6b
MD
7549 * threads.c (scm_thread): Removed filed joining_threads.
7550 (thread_print): Print thread number as well as address of thread
7551 structure.
0b6843b1
MD
7552 (scm_join_thread): Bugfix.
7553 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7554 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7555 scm_broadcast_condition_variable): Use the low-level API.
7556 (scm_all_threads): Return copy of thread list (to prevent
7557 unintended destruction).
7558 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7559
93cd4dcd
MD
7560 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7561 pthread "native" recursive mutex support.
7562
2ff4f181
MD
75632002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7564
28d52ebb
MD
7565 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7566 Simply lock a thread C API recursive mutex.
7567 (SCM_NONREC_CRITICAL_SECTION_START,
7568 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7569 SCM_REC_CRITICAL_SECTION_END): Removed.
7570
7571 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7572 direct calls to scm_rec_mutex_lock / unlock around the three calls
7573 to scm_m_expand_body.
7574
7575 * eval.c, eval.h (promise_free): New function.
7576 (scm_force): Rewritten; Now thread-safe; Removed
7577 SCM_DEFER/ALLOW_INTS.
7578
7579 * pthread-threads.h: Added partially implemented plugin interface
7580 for recursive mutexes. These are, for now, only intended to be
7581 used internally within the Guile implementation.
7582
7583 * pthread-threads.c: New file.
7584
7585 * threads.c: Conditionally #include "pthread-threads.c".
7586
7587 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7588 thread-safe;
7589
7590 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7591 SCM_GLOBAL_REC_MUTEX): New macros.
7592
7593 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7594 macros---use mutexes instead.
7595
7596 * tags.h (SCM_IM_FUTURE): New tag.
7597
7598 * eval.c (scm_m_future): New primitive macro.
7599 (SCM_CEVAL): Support futures.
7600 (unmemocopy): Support unmemoization of futures.
7601
7602 * print.c (scm_isymnames): Name of future isym.
7603
2ff4f181
MD
7604 * version.c: Unmade some changes to my private copy that got
7605 committed by mistake.
7606
392d2833
MD
76072002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7608
e200ddee
MD
7609 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7610 2002-12-10.
7611
392d2833
MD
7612 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7613
7614 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7615 logical place.
7616
7617 * threads.c (create_thread): Remember root object until the handle
7618 of the new thread is on all_threads list.
7619
7620 * root.c (scm_make_root): Moved copying of fluids until after
7621 creation of root handle so that the fluids are GC protected. Also
7622 removed the critical section.
7623
c4c52ebe
MD
76242002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7625
960c408c
MD
7626 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7627
3cdde9d6 7628 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7629 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7630 (scm_realloc): Serialize call to realloc
7631 (scm_calloc): Same for calloc.
7632 Thanks to Wolfgang Jaehrling!
7633 (Now we have to make sure all calls to malloc/realloc are made
7634 through scm_malloc.)
7635
960c408c
MD
7636 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7637
c4c52ebe
MD
7638 * threads.c (really_launch): Release heap (to prevent deadlock).
7639 (create_thread): Release heap before locking thread admin mutex.
7640
b0dc3d71
MD
76412002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7642
7643 * threads.c (scm_i_thread_invalidate_freelists): New
7644 function.
7645
7646 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7647
7648 * modules.c (scm_export): Inserted a return statement.
7649
06e80f59
HWN
76502002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7651
7652 * modules.c (scm_export): new function
7653
7654 * gc-card.c: add a note about malloc()/free() overhead.
7655
a12611c3
MD
76562002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7657
7658 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7659 in srcdir.
7660
c7fabadf
MD
76612002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7662
7663 These changes remove scm_ints_disabled (which hasn't has any
7664 effect in Guile for quite some time).
7665
7666 * async.c, error.h (scm_ints_disabled): Removed.
7667
7668 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7669 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7670 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7671 (old_ints): Removed.
7672
7673 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7674 critical section.
7675 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7676 SCM_ALLOW_INTS.
7677
9bc4701c
MD
76782002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7679
52340b65
MD
7680 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7681 Removed accidental #if 0 around these functions.
7682
9bc4701c
MD
7683 These changes are the start of support for preemptive
7684 multithreading. Marius and I have agreed that I commit this code
7685 into the repository although it isn't thoroughly tested and surely
7686 introduces many bugs. The bugs should only be exposed when using
7687 threads, though. Signalling and error handling for threads is
7688 very likely broken. Work on making the implementation cleaner and
7689 more efficient is needed.
7690
7691 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7692 (SCM_NONREC_CRITICAL_SECTION_START,
7693 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7694 SCM_REC_CRITICAL_SECTION_END): New macros.
7695 (SCM_CRITICAL_SECTION_START/END): Defined here.
7696
7697 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7698 the three calls to scm_m_expand_body.
7699
7700 * gc.h: #include "libguile/pthread-threads.h";
7701 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7702
7703 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7704 scm_t_key;
7705
7706 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7707 access.
7708
7709 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7710
7711 * gc-freelist.c, threads.c (really_launch): Use
7712 SCM_FREELIST_CREATE.
7713
7714 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7715
7716 * gc.c (scm_i_expensive_validation_check, scm_gc,
7717 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7718 heap administration so that those pieces of code are executed
7719 single-threaded. We might consider rewriting these code sections
7720 in terms of a "call_gc_code_singly_threaded" construct instead of
7721 calling the pair of scm_i_thread_put_to_sleep () and
7722 scm_i_thread_wake_up (). Also, we would want to have as many of
7723 these sections eleminated.
7724
7725 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7726
7727 * inline.h: #include "libguile/threads.h"
7728
7729 * pthread-threads.h: Macros now conform more closely to the
7730 pthreads interface. Some of them now take a second argument.
7731
7732 * threads.c, threads.h: Many changes.
7733
77342002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7735
7736 * Makefile.am (version.h): Changed $^ --> $< in rule for
7737 version.h.
7738
b2cbe8d8
RB
77392002-12-08 Rob Browning <rlb@defaultvalue.org>
7740
7741 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7742 (SCM_MINOR_VERSION): use @--@ substitution now.
7743 (SCM_MICRO_VERSION): use @--@ substitution now.
7744 (scm_effective_version): new function prototype.
7745
7746 * version.c (scm_effective_version): new function, also add
7747 effective-version.
7748
7749 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7750 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7751 SCM_LIBRARY_DIR.
7752 (version.h): generate this here rather than configure.in. This
7753 approach tracks source edits better (i.e. more immediately).
7754 Might be worth considering for other .in files too.
7755
5441c65c
MV
77562002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7757
7758 Reorganized thread package selection. A thread package now only
7759 implements a small set of pthread like functions and Guile
7760 implements the rest on top of that. Guile's implementation is
7761 what the "coop-pthreads" package has been previously. Support for
7762 "coop" threads has been removed until I get time to add it again.
7763
7764 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7765 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7766 null-threads.c, coop-pthreads.c.
7767 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7768 pthread-threads.h.
7769
7770 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7771
7772 * threads.h: Do not include "libguile/coop-defs.h". Include
7773 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7774 (previously deprecated) C level thread API prototypes. They are
7775 now in the thread package specific headers, "null-threads.h" and
7776 "pthread-threads.h".
7777 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7778 New.
7779 (scm_threads_init): Removed.
7780 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7781 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7782 SCM_I_THREAD_SWITCH_COUNT): Define here.
7783 (scm_single_thread_p): Removed.
7784 (scm_call_with_new_thread): Take two args directly instead of list
7785 of two args.
7786 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7787 SCM_SET_THREAD_LOCAL_DATA): Define here.
7788
7789 * threads.c: Merged with "coop-pthreads.c".
7790
7791 * null-threads.h: Implement pthread-like API as a set of macros.
7792
7793 * pthread-threads.h: New, implement pthread-like API by deferring
7794 to pthread itself.
7795
7796 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7797 has been lost in the reorganization.
7798
504d99c5
MD
77992002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7800
7801 The following change makes it possible to move procedure
7802 application dispatch outside inner loops. The motivation was
7803 clean implementation of efficient replacements of R5RS primitives
7804 in SRFI-1.
7805
7806 The semantics is clear: scm_trampoline_N returns an optimized
7807 version of scm_call_N (or NULL if the procedure isn't applicable
7808 on N args).
7809
7810 Applying the optimization to map and for-each increases efficiency
7811 noticeably. For example, (map abs ls) is 8 times faster than
7812 before.
7813
7814 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7815
7816 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7817
7818 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7819 (map, for-each): Handle also application on two args as a special
7820 case; Use trampolines.
7821
7822 Other changes:
7823
7824 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7825 (subr2oless): Removed.
7826 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7827 vector GC protected.
7828
7829 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7830 scm_out_of_range.
7831
63dd3413
DH
78322002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7833
7834 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7835
4ba5f279
MD
78362002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7837
7838 * debug.c (scm_make_iloc): Added missing "return".
7839
56ae231f
MV
78402002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7841
7842 * strports.c (scm_eval_string_in_module): Validate second arg to
7843 be a module. Thanks to Arno Peters!
7844
80b28865
DH
78452002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7846
7847 * .cvsignore: remove goops.c
7848
c88b1456
DH
78492002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7850
7851 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7852 module_variable, scm_module_lookup_closure,
7853 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7854 scm_system_module_env_p): Don't compare SCM values with C
7855 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7856 over SCM_NFALSEP.
7857
a8a19efc
DH
78582002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7859
7860 * eval.h (SCM_MAKE_ILOC): New macro.
7861
7862 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7863 the iloc bitpattern here.
7864
76734914
MD
78652002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7866
7867 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7868 part of the API, otherwise it's difficult to write Guile
7869 extensions using non-blocking I/O => moved #include
7870 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7871
7872 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7873 s_unlock_mutex.
7874
8b5b4a75
MV
78752002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7876
7877 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7878 are defined in configure.in.
7879
7880 * threads.c: Removed SCM_API from function definitions. SCM_API
7881 is only for declarations.
7882
e5a83084
MD
78832002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7884
9be8bb45
MD
7885 * coop-pthreads.h: Added support for thread specific data to the
7886 generic C API for the coop-pthreads case.
7887
e5a83084
MD
7888 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7889 change.
6c214b62 7890 (scm_cond_broadcast): Added missing function.
e5a83084 7891
7edf178e
MV
78922002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7893
7894 * coop.c (coop_next_runnable_thread): Removed, wich should have
7895 happened when GUILE_ISELECT was hard-wired.
7896
7f5b1b77
MV
78972002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7898
7caa1b07
MV
7899 * Makefile.am (libguile_la_SOURCES): Added threads.c
7900 (DOT_DOC_FILES): Added threads.doc.
7901 (DOT_X_FILES): Added threads.x.
7902 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7903 (noinst_HEADERS): Added coop-pthreads.c.
7904 (modinclude_HEADERS): Added coop-pthreads.h.
7905
7906 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7907 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7908
bb11cbf4
MV
7909 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7910 Thanks to Bill Schottstaedt!
7911
1d4cbbed
MV
7912 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7913
7f5b1b77
MV
7914 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7915 SCM_COPT_THREADS is defined.
7916 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7917 is defined.
7918
7919 * coop-pthreads.c: Some harmless renamings of internal stuff.
7920 (create_thread): New, generalized version of
7921 scm_call_with_new_thread.
7922 (scm_call_with_new_thread): Use it.
7923 (scm_spawn_thread): New, use create_thread.
7924
d52f53b1
MV
79252002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7926
7927 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7928 start testing it now.
7929
7930 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7931 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7932 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7933 is defined.
7934
30f920c3
MV
79352002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7936
7937 * scmsigs.c (signal_cell_handlers, install_handler_data,
7938 scm_delq_spine_x, really_install_handler, install_handler): New
7939 scheme for triggering signal handlers, to simplify take_signal.
7940 (take_signal): Simplified, to avoid race conditions.
7941 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7942 hasn't exited yet.
7943
7944 * async.c (scm_async_click): Reset pending_asyncs, handle
7945 signal_asyncs. Don't set cdr of a non-signal async to #f.
7946 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
7947 always. Set pending_asyncs.
7948 (scm_system_async_mark_for_thread): Check that thread has not
7949 exited.
7950 (scm_unmask_signals, decrease_block): Call scm_async_click after
7951 block_asyncs becomes zero.
7952
7953 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
7954 active_asyncs.
7955
7956 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
7957 fields.
7958 * root.c (root_mark): Mark them.
7959 (make_root): Initialize them.
7960
7961 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
7962 USE_COOP_THREADS.
7963 (scm_internal_select): Define one version for USE_COOP_THREADS and
7964 one for USE_NULL_THREADS.
7965 (scm_init_iselect): Likewise.
7966
7967 * inline.h (scm_cell, scm_double_cell): Also allow
7968 USE_COPT_THREADS to not protect the slot initializers.
7969
7970 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
7971 because threads need to be initialized before the stack, but
7972 gsubrs such as scm_timed_condition_variable_wait can only be
7973 created later.
7974
7975 * threads.h: Include "coop-pthreads.h" when requested.
7976 (scm_threads_make_mutex, scm_threads_lock_mutex,
7977 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
7978 not implemented anyway.
7979 (scm_init_thread_procs, scm_try_mutex,
7980 scm_timed_condition_variable_wait,
7981 scm_broadcast_condition_variable, scm_c_thread_exited_p,
7982 scm_thread_exited_p): New prototypes.
7983 (struct timespec): Define if not already defined.
7984 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7985 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7986 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7987 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
7988 deprecated.
7989
7990 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
7991 requested.
7992 (scm_thread_exited_p): New.
7993 (scm_try_mutex, scm_broadcast_condition_variable): Newly
7994 registered procedures.
7995 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
7996 Use the latter as the procedure for "wait-condition-variable",
7997 thus offering a optional timeout parameter to Scheme.
7998 (scm_wait_condition_variable): Implement in terms of
7999 scm_timed_wait_condition_variable.
8000 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8001 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8002 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8003 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8004 scm_make_mutex, etc, and deprecate.
8005 (scm_init_threads): Do not create smobs, leave this to
8006 scm_threads_init. Do not include "threads.x" file.
8007 (scm_init_thread_procs): New, include "threads.x" here.
8008
8009 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8010 scm_null_mutex_lock, scm_null_mutex_unlock,
8011 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8012 scm_null_condvar_wait, scm_null_condvar_signal,
8013 scm_null_condvar_destroy): Removed.
8014 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8015 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8016 scm_cond_destory): Do not define, they are now deprecated and
8017 handled by threads.{h,c}.
8018
8019 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8020 (scm_threads_init): Create smobs here, using the appropriate
8021 sizes.
8022 (block): Removed, now unused.
8023 (scm_c_thread_exited_p): New.
8024 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8025 scm_null_mutex_destroy, scm_null_condvar_init,
8026 scm_null_condvar_wait, scm_null_condvar_signal,
8027 scm_null_condvar_destroy): Removed and updated users to do their
8028 task directly.
8029 (scm_try_mutex, timeval_subtract,
8030 scm_timed_wait_condition_variable,
8031 scm_broadcast_condition_variable): New.
8032 (scm_wait_condition_variable): Removed.
8033
8034 * coop-defs.h (coop_m): Added 'level' field.
8035 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8036 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8037 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8038 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8039 define.
8040 (coop_condition_variable_broadcast): New.
8041
8042 * coop-threads.c (scm_threads_init): Create smobs here, using the
8043 appropriate sizes.
8044 (scm_c_thread_exited_p, scm_try_mutex,
8045 scm_timed_wait_condition_variable,
8046 scm_broadcast_condition_variable): New.
8047 (scm_wait_condition_variable): Removed.
8048
8049 * coop.c (coop_new_mutex_init): Initialize level.
8050 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8051 level.
8052 (coop_condition_variable_signal): Renamed to
8053 coop_condition_variable_broadcast and reimplemented in terms of
8054 that. Thus...
8055 (coop_condition_variable_broadcast): New.
8056
8057 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8058
8059 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8060
087ed40d
MV
80612002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8062
65a23095
MV
8063 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8064 of system headers.
8065
087ed40d
MV
8066 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8067 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8068 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8069
5ec1d2c8
DH
80702002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8071
8072 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8073 scm_definedp to scm_defined_p and deprecated scm_definedp.
8074
100ae50d
DH
80752002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8076
8077 * async.h, async.c (scm_system_async): Fixed deprecation to work
8078 correctly when deprecated features are excluded.
8079
2794cb50
MV
80802002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8081
8082 * async.c (scm_system_async_mark_for_thread): Validate thread
8083 argument.
8084
8085 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8086
8087 * feature.c (scm_init_feature): Don't add 'threads' for
8088 USE_NULL_THREADS.
8089
8090 * inline.h (scm_cell, scm_double_cell): Also allow
8091 USE_NULL_THREADS to not protect the slot initializers.
8092
8093 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8094 "USE_THREAD".
8095
8096 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8097 (modinclude_HEADERS): Added null-threads.h.
8098
8099 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8100 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8101 (scm_init_threads): Use generic type names scm_t_mutex and
8102 scm_t_cond instead of coop_m and coop_c.
8103
8104 * null-threads.c, null-threads.h: New files.
8105
ff810d7a
MV
81062002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8107
8108 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8109 This is to support makes that know about "$<" only in pattern
8110 rules, like Sun's make.
8111
a90bdb73
MV
81122002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8113
8114 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8115 substitution. Thanks to David Allouche!
8116
e71a8bf2
DH
81172002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8118
8119 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8120 !SCM_ENABLE_DEPRECATED.
8121
41f77ff5
MV
81222002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8123
504d99c5 8124 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8125 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8126 otherwise.
8127
8128 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8129 USE_THREADS is defined. Use scm_root otherwise.
8130 (scm_sigaction_for_thread): Ignore THREAD argument when
8131 USE_THREADS is not defined. Also, move THREAD argument defaulting
8132 out of HAVE_SIGACTION section, which was a bug.
8133
6d16b125
MV
81342002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8135
8136 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8137 signal_handlers, not the closure that is used as the async.
8138 The closure is stored in signal_handler_cells, as previously.
8139
acfa1f52
MV
81402002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8141
8142 * root.h (scm_root_state): Added 'block_async' slot.
8143 (scm_active_asyncs): Removed abbrev.
8144 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8145
8146 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8147 abbrev.
8148
8149 * async.h (scm_call_with_blocked_asyncs,
8150 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8151 scm_c_call_with_unblocked_asyncs): New prototypes.
8152 (scm_mask_signals, scm_unmask_signals): Deprecated.
8153 (scm_mask_ints): Turned into a macro.
8154 * async.c (scm_mask_ints): Removed.
8155 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8156 this should not be necessary.
8157 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8158 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8159 deprecation warning and check for errornous use. Set block_asyncs
8160 instead of scm_mask_ints.
8161 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8162 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8163 scm_c_call_with_unblocked_asyncs): New.
8164
8165 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8166 Asyncs are enabled by default.
8167
34010f56
NJ
81682002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8169
8170 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8171 6th element: an input waiting thunk.
8172 (sf_input_waiting): New.
8173
9310d6f2
MV
81742002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8175
8176 * root.c (root_mark): Mark active_asyncs slot.
8177
8178 * async.c (scm_async_click): Set the cdr of a executed handler
8179 cell to SCM_BOOL_F, not SCM_EOL.
8180 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8181 and only if the handler procedure is not already present.
8182 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8183 with SCM_BOOL_F.
8184 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8185
ac48c719
RB
81862002-10-04 Rob Browning <rlb@defaultvalue.org>
8187
1360a142
RB
8188 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8189
8190 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8191 scm_lt_dlopenext, and scm_lt_dlerror.
8192 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8193 and scm_lt_dlerror.
8194 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8195 and scm_lt_dlerror.
8196 (sysdep_dynl_init): switch to scm_lt_dlinit();
8197
8198 * Makefile.am (libguile_la_LIBADD): switch to use
8199 libguile-ltdl.la.
8200
504d99c5 8201 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8202
497092c9
MV
82032002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8204
8205 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8206 * scmsigs.c (got_signal): Removed.
8207 (signal_handler_cells, signal_handler_threads): New.
8208 (take_signal): Queue the cell of the signal for the specified
8209 thread. Reset the signal handler on systems that don't have
8210 sigaction.
8211 (sys_deliver_signals): Removed.
8212 (close_1): New.
8213 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8214 extended to also set the thread of a signal and allocate a cell
8215 for it. Keep the Scheme name "sigaction". Check that signum is
8216 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8217 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8218 (scm_init_scmsigs): Allocate signal_handler_cells and
8219 signal_handler_threads vectors.
8220
8221 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8222 that system asnycs and user asyncs are separated. Reimplemented
8223 system asyncs to work per-thread.
8224
8225 * gc.c (scm_init_gc): Do not use scm_system_async.
8226
8227 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8228 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8229 Removed prototypes.
8230 (scm_i_queue_async_cell): New.
8231
8232 * __scm.h (scm_asyncs_pending_p): Removed.
8233 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8234 scm_asyncs_pending_p.
8235
8236 * async.h (scm_system_async_mark_for_thread): New prototype.
8237
8238 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8239
8240 * root.h (scm_root_state): Added new "active_asyncs" slot.
8241 * root.c (scm_make_root): Initialize it to SCM_EOL.
8242
8243 * coop-defs.h (coop_t): Added new "handle" slot.
8244 * coop-threads.c (all_threads, scm_current_thread,
8245 scm_all_threads, scm_i_thread_root): New.
8246 (scm_threads_init): Add main thread to all_threads.
8247 (scheme_launch_thread): Remove thread from all_threads when it
8248 terminates.
8249 (scm_call_with_new_thread): Initialize handle slot of coop_t
8250 structure and add new thread to all_threads.
8251 (scm_spawn_thread): Likewise.
8252
8253 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8254 * threads.c (scm_current_thread, scm_all_threads): Register as
8255 primitives.
8256
8257 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8258
480fa28d
NJ
82592002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8260
8261 * script.c (scm_compile_shell_switches): Fix bad spelling of
8262 `explicitly' in comment.
8263
82642002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8265
8266 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8267 Refer to provided? in doc string rather than deprecated feature?.
8268
3553e1d1
GH
82692002-09-24 Gary Houston <ghouston@arglist.com>
8270
8271 * inline.h (scm_double_cell): prevent reordering of statements
8272 with any following code (for GCC 3 strict-aliasing).
8273 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8274 the earlier version of the reordering prevention.
8275
4ad0814a
HWN
82762002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8277
8278 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8279
e88e4f2e
HWN
82802002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8281
8282 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8283 protection.
8284
1e71eafb
HWN
82852002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8286
8287 * inline.h: include stdio.h
8288
8289 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8290
61ef9c1f
HWN
82912002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8292
dac04e9f
HWN
8293 * gc-segment.c (scm_i_make_initial_segment): check user settings
8294 for sanity.
8295
8296 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8297 sanity.
dac04e9f
HWN
8298
8299 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8300
ffd72400
HWN
8301 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8302
8303 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8304 these won't ever wrap around with high memory usage. Thanks to
8305 Sven Hartrumpf for finding this.
ffd72400 8306
5bd4a949
HWN
8307 * gc-freelist.c: include <stdio.h>
8308
61ef9c1f
HWN
8309 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8310
ffd0ef3b
MV
83112002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8312
a27e3d14
MV
8313 * vectors.h (SCM_VECTOR_REF): New.
8314
ffd0ef3b
MV
8315 * snarf.h (SCM_DEFINE_PUBLIC): New.
8316
f8a1712b
MV
83172002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8318
8319 * socket.c (scm_addr_vector): Added size of address to arguments.
8320 Use it to avoid accessing a non-existent path in a sockaddr_un.
8321 Changed all callers.
8322
7200a36b
HWN
83232002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8324
1383773b
HWN
8325 * gc.h: remove DOUBLECELL card flags.
8326
8327 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8328 scm_realloc().
8329
8330 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8331 init loop; handle this from scm_init_card_freelist()
8332
8333 * gc-card.c (scm_init_card_freelist): init bit vector here.
8334
7200a36b 8335 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8336 num2float.i.c (FLOAT2NUM): idem
7200a36b 8337
9981de3a
HWN
83382002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8339
8340 * eval.h: prepend libguile/ to include path
8341
19647556
MV
83422002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8343
8344 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8345 years. Thanks to Martin Grabmüller!
19647556 8346
38d1262a
HWN
83472002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8348
8349 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8350 unsigned numbers for computing minimum heap increment. This
8351 prevents weird results when a a negative minimum increment is
8352 computed.
8353
f800ebfb
MV
83542002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8355
8356 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8357 instead of the old tricks.
f800ebfb
MV
8358
8359 * guile-snarf.in: Do not expect the input file to be the first
8360 argument after the optional "-o" option, just pass everything to
8361 the pre-processor without extracting the input file name.
8362
4a5309c9
HWN
83632002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8364
8365 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8366 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8367
f2893a25
HWN
83682002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8369
8370 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8371 Bill Schottstaedt for the bug report
8372
483f518b
MV
83732002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8374
8375 * print.c (scm_iprin1): Print primitives generics always as
8376 "primitive-generic" even when they have no primitive methods yet.
8377
917adc55
GH
83782002-08-17 Gary Houston <ghouston@arglist.com>
8379
8380 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8381 call.
8382
67329a9e
HWN
83832002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8384
85835e59 8385 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8386
8387 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8388 malloc.
8389
8390 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8391 only use SCM_MIN_HEAP_SEG_SIZE.
8392
8393 * ports.c (scm_add_to_port_table): add backwards compatibility
8394 function
8395
8396 * ports.h: use scm_i_ prefix for port table and port table size.
8397
f07c886a
MD
83982002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8399
8400 * vports.c (scm_make_soft_port): Initialize pt variable.
8401
dc61cbc6
MV
84022002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8403
8404 * strports.h (scm_c_eval_string_in_module,
8405 scm_eval_string_in_module): New prototypes.
8406 * strports.c (scm_eval_string_in_module): New, but use
8407 "eval-string" as the Scheme name and make second parameter
8408 optional.
8409 (scm_eval_string): Implement using scm_eval_string_in_module.
8410 (scm_c_eval_string_in_module): New.
8411 Thanks to Ralf Mattes for the suggestion!
8412
da220f27
HWN
84132002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8414
be3ff021
HWN
8415 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8416 message and abort.
8417
8418 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8419
da220f27
HWN
8420 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8421 stead of scm_t_port*. The function now takes a tag argument.
8422
eab1b259
HWN
84232002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8424
8425 * gc.h: add scm_debug_cells_gc_interval to public interface
8426
8427 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8428
8429 * gc.c (scm_i_expensive_validation_check): separate expensive
8430 validation checks from cheap ones.
8431
ba1b2226
HWN
84322002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8433
8434 * read.c (scm_input_error): new function: give meaningful error
8435 messages, and throw read-error
8436
8437 * gc-malloc.c (scm_calloc): add scm_calloc.
8438
39e8f371
HWN
84392002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8440
33138b05
HWN
8441 * tags.h: remove GC bits documentation from the tags table.
8442
39e8f371
HWN
8443 * read.c (INPUT_ERROR): Prepare for file:line:column error
8444 messages for errors in scm_lreadr() and friends.
8445
84462002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8447
8448 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8449 implementation).
8450 (scm_gc_calloc): new function
8451
26e68795 84522002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8453
5f16b897
HWN
8454 * ports.c (scm_new_port_table_entry): init port entry to 0
8455 completely.
402788a9
HWN
8456
8457 * ports.c (scm_new_port_table_entry): change function from
8458 scm_add_to_port_table. This prevents cells with null-pointers from
8459 being exposed to GC.
8460
504d99c5 8461 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8462 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8463
504d99c5 8464 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8465 to gc-stats.
8466
c8a1bdc4
HWN
8467 * numbers.c (big2str): return "0" for 0 iso. ""
8468
c2cbcc57
HWN
8469 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8470 private-gc.h: new file
c8a1bdc4
HWN
8471
8472 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8473 sweeping. More documentation in workbook/newgc.text
8474
aea06b34
MV
84752002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8476
8477 * random.c (rstate_free): Return zero.
8478
35060ae9
DH
84792002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8480
8481 * environments.c (remove_key_from_alist): Removed.
8482
8483 (obarray_remove): Simplified.
8484
6a535440
SJ
84852002-07-24 Stefan Jahn <stefan@lkcc.org>
8486
8487 * continuations.h: ia64: Include <signal.h> before
8488 <sys/ucontext.h>.
8489
bcbd25b7
DH
84902002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8491
8492 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8493
26e68795 84942002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8495
8496 * goops.c (scm_compute_applicable_methods): use
8497 scm_remember_upto_here_1 iso scm_remember_upto_here
8498
8499 * macros.c: include deprecation.h
8500
504d99c5 8501 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8502 macro arg.
504d99c5 8503 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8504
8505 * net_db.c, posix.c, socket.c: variable naming: change ans to
8506 result.
8507
8508 * sort.c (scm_merge_vector_x): accept vector as argument
8509 iso. SCM*. This is needed for full GC correctness.
8510
8511 * gc.h: undo previous undocumented changes related to #ifdef
8512 GENGC.
8513
26e68795 85142002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8515
8516 * *.c: add space after commas everywhere.
8517
8518 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8519 Document cases where SCM_WRITABLE_VELTS() is used.
8520
8521 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8522 SCM_VELTS() return a const pointer
8523 (SCM_VECTOR_SET): add macro.
8524
3063e30a
DH
85252002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8526
8527 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8528 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8529 Deprecated the special kind of built-in dynamic syntax transformer
8530 that was inaccurately named "macro". Note: The built-in syntax
8531 transformers that are named "mmacro" or "memoizing-macro" still
8532 exist, and it is these which come much closer to what one would
8533 call a macro.
8534
4c5f8e8f
NJ
85352002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8536
8537 * eval.c (unmemocopy): Fix for
8538 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8539 with internal definitions and local-eval).
8540
4f6f9ae3
GH
85412002-07-12 Gary Houston <ghouston@arglist.com>
8542
8543 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8544 defined. They don't do anything useful, especially since the
8545 only case where DYNAMIC_LINKING is undefined seems to be
8546 when --with-modules=no is given to configure, which is basically
8547 requesting that the "dynamic linking module" be omitted.
8548
8549 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8550 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8551
8552 * extensions.c (load_extension): check DYNAMIC_LINKING for
8553 scm_dynamic_call.
8554 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8555 scm_init_dynamic_linking.
8556
c21935e6
MV
85572002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8558
8559 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8560 check for Cygwin when including <winsock2.h>, this is already
8561 check for by configure. Thus, revert change from 2002-07-07.
8562
ee95d597
GH
85632002-07-10 Gary Houston <ghouston@arglist.com>
8564
9540b68f 8565 * eq.c: include <string.h>
ee95d597
GH
8566 * dynl.c: docstring editing.
8567
46732b54
GH
85682002-07-09 Gary Houston <ghouston@arglist.com>
8569
8570 * dynl.c (scm_dynamic_call): docstring editing.
8571
c09d12e0
RB
85722002-07-08 Rob Browning <rlb@defaultvalue.org>
8573
8574 * gc_os_dep.c: HURD fixes.
8575
3f6571eb
MV
85762002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8577
8578 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8579
8580 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8581 this should be compiled for BUILD host.
8582 Override default rule for
8583 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8584 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8585 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8586
8587 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8588 <winsock2.h> on Cygwin even when we have it.
8589
bd987b8e
DH
85902002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8591
8592 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8593 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8594 the code. Full number of arguments checking of closures is
8595 mandatory now. However, the option to disable the checking has
8596 most probably not been used anyway.
8597
8505e285
DH
85982002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8599
bd987b8e
DH
8600 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8601 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8602 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8603 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8604 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8605 (scm_source_properties, scm_set_source_properties_x,
8606 scm_source_property): Removed compile time option SCM_RECKLESS to
8607 clean up the code. Full number of arguments checking of closures
8608 is mandatory now. However, the option to disable the checking has
8609 most probably not been used anyway.
8505e285
DH
8610
8611 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8612 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8613
2ee08a28
GH
86142002-06-30 Gary Houston <ghouston@arglist.com>
8615
732b9327
GH
8616 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8617 do anything useful. Added a comment about need for a mutex if
8618 pre-emptive threading is supported.
8619
2ee08a28
GH
8620 * posix.c (scm_convert_exec_args), dynl.c
8621 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8622 allocate_string_pointers. 2) simplified: don't reallocate the
8623 strings, just make an array of pointers 3) avoid memory leaks on
8624 error 4) let the procedure report errors in its own name.
8625 Consequences: 1) the procedures now assume that SCM strings are
8626 nul-terminated, which should always be the case. 2) Since strings
8627 are not reallocated, it's now possible for strings passed to
8628 dynamic-args-call to be mutated.
8629
c136c920
DH
86302002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8631
8632 * __scm.h, eval.c, eval.h: Removed compile time option
8633 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8634 variable positions during memoization is mandatory. However, the
8635 option to disable the caching has most probably not been used
8636 anyway.
8637
e540802f
MV
86382002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8639
8640 * print.c (scm_simple_format): Print missing part of format before
8641 ~% control. Thanks to Daniel Skarda!
8642
4c1ffcdd
MV
86432002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8644
8645 * mkstemp.c: Added exception notice to license statement.
8646
ba1b077b
MV
86472002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8648
8dc434c7
MV
8649 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8650 it is represented as a floating point value so that we can change
8651 its sign.
8652
ba1b077b
MV
8653 From John W. Eaton <jwe@bevo.che.wisc.edu>
8654
8655 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8656
74c58131
TTN
86572002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8658
8659 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8660 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8661
8766d4b5
MV
86622002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8663
8664 * eq.c (real_eqv): New.
8665 (scm_eqv_p): Use it when comparing reals and complexes.
8666
8667 * numbers.c: Include <string.h>, for strncmp.
8668 (mem2complex): Do not create negative NaNs.
8669 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8670 NaN.
8671 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8672
1d8c3cad
MV
86732002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8674
8675 * posix.c (scm_putenv): Handle removing variables explicitely by
8676 calling unsetenv.
8677
8678 From John W. Eaton.
74c58131 8679
1d8c3cad
MV
8680 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8681 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8682 and scm_nan.
8683 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8684 [SCO && ! HAVE_ISINF] (isinf): New function.
8685 (xisinf, xisnan): New functions.
8686 (IS_INF): Delete.
8687 (isfinite): Define in terms of xisinf.
8688 (scm_inf_p, scm_nan_p): New functions.
8689 (guile_Inf, guile_NaN): New file-scope vars.
8690 (guile_ieee_init): New function.
8691 (scm_inf, scm_nan): New functions.
8692 (idbl2str): Handle Inf and NaN. Remove funny label and
8693 corresponding gotos.
8694 (ALLOW_DIVIDE_BY_ZERO): New macro.
8695 (scm_divide): Allow division by zero to occur if
8696 ALLOW_DIVIDE_BY_ZERO is defined.
8697 Handle bignums and ints as special cases.
8698
8699 Additional stuff by me:
8700
8701 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8702 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8703 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8704 NaN. They will provide their own sign.
8705 (scm_divide): Only allow divides by inexact zeros. Dividing by
8706 exact zeros still signals an errors.
74c58131 8707
7a0c65eb
TTN
87082002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8709
87b72063 8710 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8711 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8712 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8713 Thanks to Andreas Rottmann.
8714
5e423a39
GH
87152002-04-20 Gary Houston <ghouston@arglist.com>
8716
8717 * removal of unused fields in root state (thanks to Christopher
8718 Cramer for pointing out the disuse.)
8719 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8720 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8721
5e423a39
GH
8722 * root.c (root_mark): don't mark them.
8723 (scm_make_root): don't set them to #f.
8724 * init.c (scm_init_standard_ports): don't initialise with the
8725 default ports.
8726
9d2cce76
MV
87272002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8728
8729 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8730 cpp_sig_symbols.c.
8731
87322002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8733
8734 * guile-snarf.in: Do not clean input file. This would write to
8735 the $(srcdir) during a VPATH build, which is not allowed. It also
8736 isn't needed since it only works when an output filename has been
8737 specified and in that case we don't need to clean the input file
8738 because the output file will already exist.
8739
6f79b6cc
MV
87402002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8741
8742 * guile-snarf: Install the trap for removing $cleanfile only when
8743 the value of $cleanfile is actually known.
8744
21550b10
RB
87452002-04-10 Rob Browning <rlb@defaultvalue.org>
8746
8747 * .cvsignore: add versiondat.h and *.c.clean.c.
8748
bc76d628
DH
87492002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8750
8751 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8752 function, replaces macro SRCBRKP.
8753
8754 (SRCBRKP): Deprecated.
8755
8756 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8757 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8758 temporary variable.
8759
5132eef0
DH
87602002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8761
8762 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8763 CHECK_EXIT and removed all references to them.
8764
680516ba
DH
87652002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8766
8767 * debug.h (scm_ready_p, debug_print): Removed declarations.
8768
8769 * eval.c (EVALCELLCAR): Removed.
8770
8771 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8772 operation from condition.
8773
e2bd68e0
MV
87742002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8775
8776 * guile-snarf.in: When the output filename is "-", write to
8777 stdout. When no "-o" option is given, use "-" as the output
8778 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8779 output file on error when the output file name is not "-". Define
8780 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8781
8782 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8783
ab1f1094
DH
87842002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8785
8786 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8787 and the corresponding goto statements. Removed redundant code.
8788
42030fb2
DH
87892002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8790
8791 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8792 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8793 Re-enabled handing of rpsubrs and asubrs.
8794
e050d4f8
DH
87952002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8796
8797 * eval.c (SIDEVAL): Removed.
8798
8799 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8800 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8801 argument checking order for set! to locals, variables and symbols.
8802 Improvements to control structure. Removed some uses of arg1 and
8803 arg2 as temporary variables.
8804
a6d344d3
TTN
88052002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8806
8807 * guile-snarf.in: Remove "--compat=1.4" support.
8808 Add "-d" and "-D" support.
8809
8810 (deprecated_list): New var.
8811 (compat_mode_clean_xxx): Delete.
8812 (grep_deprecated): New func.
8813 ("main"): If "-d" or "-D", call `grep_deprecated'.
8814
3939e9df
NJ
88152002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8816
387d418c
NJ
8817 * hooks.h: Change scm_t_c_hookype_t everywhere to
8818 scm_t_c_hook_type.
8819
bb2c02f2 8820 Docstring fixes:
a6d344d3 8821
bb2c02f2
NJ
8822 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8823
8824 * ports.c (scm_sys_make_void_port): Use `@file'.
8825
8826 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8827 than `else'.
8828
8829 * macros.c (scm_makmacro): Don't say that the form replaces its
8830 source, because it doesn't.
8831 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8832
8833 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8834 scm_select, scm_basename), goops.c (scm_method_generic_function),
8835 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8836 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8837 spelling mistakes.
8838
3939e9df
NJ
8839 * debug.c (scm_debug_options), eval.c
8840 (scm_eval_options_interface), read.c (scm_read_options): Change
8841 incorrect @var in docstring to @code.
8842
3b3cc781
MV
88432002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8844
500b0d5b
MV
8845 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8846
3b3cc781
MV
8847 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8848 guile-snarf can remove trailing non-init code.
8849
8850 * guile-snarf.in (modern_snarf): Remove everything following and
8851 including "^:^" from the output.
8852
dff98306
DH
88532002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8854
8855 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8856
8857 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8858
2287fb53
TTN
88592002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8860
8861 * guile-snarf.in: Update copyright.
8862 Rewrite to internalize error handling.
8863 Add "--compat=1.4" handling.
8864 Add commentary.
8865
8866 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8867 (snarfcppopts): New var.
8868 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8869 (.c.doc): Use $(snarfcppopts).
8870
822250a4
TTN
8871 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8872 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8873 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8874 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8875 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8876 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8877 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8878 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8879 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8880 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8881 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8882 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8883 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8884 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8885
b7798e10
DH
88862002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8887
8888 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8889 The next step will be to remove the union 't' and simplify the
8890 code of SCM_CEVAL that way.
8891
04a98cff
NJ
88922002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8893
8894 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8895 rreadfds, rwritefds, rexceptfds): Made static.
8896
8897 * gc.c (terminating), fports.c (terminating): Renamed
8898 scm_i_terminating.
8899
16d98032
MV
89002002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8901
5046250e
MV
8902 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8903 potential overflow problems. Thanks to John W Eaton!
8904
8794207d
MV
8905 * strop.c (string_capitalize_x): Treat characters as unsigned so
8906 that 8-bit chars work. Thanks to David Pirotte!
16d98032 8907
1d15ecd3
DH
89082002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8909
8910 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8911 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8912 proc as temporary variables. Introduced temporary variables with
8913 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8914 by a more explicit predicate in some places.
8915
89162002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
8917
8918 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8919 Added lots of comments regarding the implementation of #@dispatch.
8920 Changed intra-procedure communication to use t.arg1 instead of
8921 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8922 variables. Introduced temporary variables with hopefully
8923 descriptive names for clarification. Replaced SCM_N?IMP by a more
8924 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8925 of computing the expression explicitly. Eliminate now unused
8926 label nontoplevel_cdrxbegin.
8927
8928 * goops.h (SCM_INSTANCE_HASH): New macro.
8929
8930 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8931
1ebf1566
TTN
89322002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8933
8934 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8935 "guile-snarf" moved back from `noinst_SCRIPTS'.
8936
020c890c
NJ
89372002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8938
58d233cc
NJ
8939 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8940 exists when adding a source property other than those that are
8941 handled explicitly, add the new property to the SRCPROPS obj's
8942 plist.
8943
020c890c
NJ
8944 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8945 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
8946
8947 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
8948 debug.status. It isn't needed, and it can overflow the bits
8949 reserved for it (which may lead to a segv or a GC abort).
8950
3f04400d
DH
89512002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8952
8953 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
8954 side-effecting operations from conditions and macro calls.
8955 Replaced SCM_N?IMP by a more explicit predicate in some places.
8956 Minimized the scope of some variables.
8957
97820583
SJ
89582002-03-02 Stefan Jahn <stefan@lkcc.org>
8959
8960 * convert.i.c: Fixed int <-> long conversions which would have
8961 failed if their sizes were different.
8962
38ace99e
DH
89632002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8964
8965 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
8966 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
8967 as temporary variables. Removed side-effecting operations from
8968 conditions and macro calls. Introduced temporary variables with
8969 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8970 by a more explicit predicate in some places. Removed code that
8971 was conditionally compiled if SICP was defined - which it never
8972 is.
8973
e5cb71a0
DH
89742002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8975
8976 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
8977 Removed some uses of t.arg1 and proc as temporary variables.
8978 Removed side-effecting operations from conditions and macro calls.
8979 Introduced temporary variables with hopefully descriptive names
8980 for clarification. Replaced SCM_N?IMP by a more explicit
8981 predicate in some places.
8982
6a0f6ff3
DH
89832002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8984
8985 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
8986 explicit predicate in some places.
8987
8988 (CHECK_EQVISH): Removed.
8989
8990 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
8991 variables. Removed side-effecting operations from conditions and
8992 macro calls. Introduced temporary variables for clarification.
8993 Sorted if-else-if check for the type of the last form in a list by
8994 frequency. Avoided some unnecessary tail-recursion calls.
8995
228a24ef
DH
89962002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8997
8998 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
8999 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9000 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9001 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9002 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9003 naming scheme for types.
9004
9005 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9006 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9007 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9008 (scm_make_environment), eval.c (scm_closure), fports.c
9009 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9010 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9011 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9012 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9013 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9014 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9015 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9016 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9017 scm_alloc_cell to scm_cell.
9018
9019 * environments.c (core_environments_observe), gc.c
9020 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9021 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9022 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9023 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9024 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9025 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9026 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9027 scm_double_cell.
9028
edb810bb
SJ
90292002-02-27 Stefan Jahn <stefan@lkcc.org>
9030
9031 * convert.i.c, convert.c: Better range checking.
9032
9033 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9034
1ebf1566 9035 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9036 Windows (MinGW).
9037
327d4dd3
TTN
90382002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9039
9040 * Makefile.am: Update path to pre-inst-guile automake frag.
9041
89d7a92c 90422002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9043
9044 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9045 features are excluded.
9046
89d7a92c 90472002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9048
9049 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9050
4f2716b6
GH
90512002-02-25 Gary Houston <ghouston@arglist.com>
9052
9053 * convert.c: include <string.h> for convert_i.c.
9054
46151112
RB
90552002-02-24 Rob Browning <rlb@defaultvalue.org>
9056
9057 * .cvsignore: add stamp-h1.
9058
cd328b4f
NJ
90592002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9060
9061 * unif.c (scm_array_to_list): Correct name, which had been
9062 accidentally changed to scm_t_arrayo_list!
9063
c709de7f
MD
90642002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9065
9066 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9067 underflowing scm_mallocated.
9068
c1965d31
MV
90692002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9070
9071 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9072 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9073 Reimplemented using the new scm_gc_malloc, etc., functions and
9074 deprecated.
9075
b606945b
TTN
90762002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9077
9078 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9079 to `noinst_PROGRAMS'.
9080 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9081 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9082
7c686ba8
MV
90832002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9084
9085 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9086 non-zero is returned from a port or smob free function.
9087 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9088 scm_gc_register_collectable_memory,
9089 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9090 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9091
9092 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9093 debug-malloc.c, dynl.c, environments.c, environments.h,
9094 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9095 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9096 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9097 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9098 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9099 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9100 appropriate. Return zero from smob and port free functions.
9101
9102 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9103
9104 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9105 messages while the GC is running.
9106 (scm_c_issue_deprecation_warning_fmt): New.
9107
9108 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9109 it is pointing to the putback buffer.
9110
66adc0a6
TTN
91112002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9112
9113 * gsubr.c (create_gsubr): On "too many args" error,
9114 also display arg count and name. Thanks to Bill Schottstaedt.
9115
0187b4f4
TTN
91162002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9117
9118 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9119
9120 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9121 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9122 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9123
9124 * guile-snarf-docs-texi.in: Bye bye.
9125
402e687c
MV
91262002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9127
9128 * symbols.c (scm_make_symbol): Fix typo in docstring.
9129
9130 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9131 scm_make_symbol): New prototypes.
9132
319b98ed
MV
91332002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9134
9135 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9136 (SCM_SYMBOL_INTERNED_P): New.
9137 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9138 SCM_MAKINUM since hash values can well be bignums.
9139 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9140 This signals a interned symbol.
9141 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9142 scm_make_symbol): New.
0187b4f4 9143
319b98ed
MV
9144 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9145
34472dfe
TTN
91462002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9147
9148 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9149 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9150 Thanks to Dave Love.
34472dfe 9151
1b39c2e3
MV
91522002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9153
9154 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9155 This might help to make unintended clashes less likely.
1b39c2e3
MV
9156 (scm_string_to_symbol): Protect the string until the symbols is
9157 created.
9158
1fa86ca5
SJ
91592002-01-31 Stefan Jahn <stefan@lkcc.org>
9160
9161 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9162 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9163 functions for the deprecated gh interface.
9164
9165 * Makefile.am: Setup rules for new `convert.*' files.
9166
af68e5e5
SJ
91672002-01-28 Stefan Jahn <stefan@lkcc.org>
9168
9169 * symbols.c (scm_c_symbol2str): New function, replacement for
9170 `gh_scm2newsymbol()'.
9171
34472dfe 9172 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9173 replacement for `gh_get_substr()'.
9174
9175 * socket.c: Include `stdint.h' if available for the `uint32_t'
9176 declaration.
9177
504d99c5 9178 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9179 compiler warning).
9180
9181 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9182
c96d76b8 91832002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9184
c96d76b8 9185 Other changes unrelated to Elisp...
34472dfe 9186
c96d76b8
NJ
9187 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9188 "if".
9189 (comments): Fix a few typos.
9190 (scm_for_each): Add parentheses around oddly unparenthesized
9191 if/while conditions.
9192
9193 * read.c (scm_read_opts): Add full stop at end of doc for
9194 `keywords' option.
9195
9196 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9197 instead of gh_symbol2scm.
9198
9199 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9200 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9201
9202 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9203 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9204
9205 First batch of changes for Elisp support...
9206
9207 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9208 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9209 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9210
9211 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9212 conditionalize compilation and initialization of Elisp support
9213 function.
34472dfe 9214
c96d76b8
NJ
9215 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9216 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9217 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9218 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9219 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9220 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9221 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9222 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9223 options.c (change_option_setting, scm_options), posix.c
9224 (environ_list_to_c), print.c (scm_iprlist), throw.c
9225 (scm_exit_status), vectors.c (scm_vector), weaks.c
9226 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9227
9228 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9229 just SCM_FALSEP.
34472dfe 9230
c96d76b8
NJ
9231 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9232 of just SCM_BOOLP.
9233
9234 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9235 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9236 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9237 (scm_m_atfop): Support function aliasing. Support both function
9238 args, which need transformation, and macro args, which do not.
9239 Add explanatory comments.
9240 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9241 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9242 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9243 SCM_NULLP || SCM_NILP instead of checks against (removed)
9244 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9245 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9246
9247 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9248 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9249 these, but I don't want to remove them yet, just in case.
9250 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9251 Elisp nil value.
9252
9253 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9254 against (removed) scm_lisp_nil.
9255 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9256 (SCM_NULL_OR_NIL_P): New.
9257
9258 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9259 SCM_VALIDATE_NULL.
9260
9261 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9262 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9263 value).
9264
9265 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9266 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9267 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9268 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9269
9270 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9271 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9272 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9273 Numbering shifted down accordingly.
9274 (SCM_ELISP_NIL): New IFLAG.
9275
9276 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9277
a392ee15
DH
92782002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9279
9280 * eval.c: Removed outdated references to "everr". Improved some
9281 comments.
9282
9283 (scm_deval_args, deval_args): Renamed scm_deval_args to
9284 deval_args, since it is not part of the interface.
9285
9286 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9287 use references to debug.vect[0] before it exists. Add parentheses
9288 to switch statement.
9289
9290 * goops.h: Added local emacs variables.
9291
24933780
DH
92922002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9293
9294 * eval.[ch] (scm_deval_args): Made static.
9295
9296 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9297 test.
9298
9299 * strings.c (scm_c_string2str): Clarified comment. Replaced
9300 THINKME by FIXME for uniformness. Removed question about whether
9301 arguments need to be protected from garbage collection: Arguments
9302 must be protected as any other variable.
9303
f9450cdb
DH
93042002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9305
9306 * procs.h (SCM_CLOSURE_BODY): New Macro.
9307
9308 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9309 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9310 get_slot_value, set_slot_value), procs.c
9311 (scm_procedure_documentation), sort.c (closureless), stacks.c
9312 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9313 SCM_CLOSURE_BODY.
9314
9315 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9316
5dc64f64
MV
93172001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9318
9319 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9320 use "cp" instead.
9321
197ee3d3
MV
93222001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9323
9324 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9325 everywhere.
9326
9327 * continuations.c (scm_make_continuation): Do not retain the
9328 throw_value when the continuation is invoked.
9329
4d4528e7
SJ
93302001-12-08 Stefan Jahn <stefan@lkcc.org>
9331
9332 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9333 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9334 THINKME's regarding the malloc policy for the missing converter
9335 routines.
9336
98347362
NJ
93372001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9338
9339 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9340 gh_symbol2scm.
9341
1fc8902f
DH
93422001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9343
9344 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9345 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9346
9347 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9348 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9349 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9350 macros.
9351
9352 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9353
9354 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9355 SCM_GC_CELL_* macros when accessing free cells.
9356
4878beec
MV
93572001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9358
9359 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9360 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9361 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9362 * strings.h (SCM_MAKE_STRING_TAG): New.
9363 * procs.h (SCM_MAKE_CCLO_TAG): New.
9364 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9365
9366 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9367 !SCM_ENABLE_DEPRECATED.
9368
9369 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9370 New.
9371
9372 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9373 signal handlers are allowed to divert the flow of control. Call
9374 scm_system_async_mark_from_signal_handler instead of
9375 scm_system_async_mark.
9376
9377
9378 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9379 scm_alloc_double_cell in their place.
34472dfe 9380
4878beec
MV
9381 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9382 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9383 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9384 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9385 scm_deprecated_newcell and scm_deprecated_newcell2.
9386
9387 gc.c (scm_tc16_allocated): Only define when including deprecated
9388 features.
9389 (scm_debug_newcell, scm_debug_newcell2): Removed.
9390 (scm_init_storage): Do not initialize scm_tc16_allocated.
9391 (scm_init_gc): Do it here.
9392 (allocated_mark): New, from old code.
9393 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9394
4878beec 9395 * inline.c, inline.h: New files.
34472dfe 9396 * Makefile.am: Added them in all the right places.
4878beec 9397
34472dfe 9398 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9399
9400 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9401 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9402 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9403 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9404 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9405 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9406 scm_alloc_double_cell, respectively.
9407
d2bc7fae
MV
94082001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9409
9410 * modules.c (scm_c_use_module): Adapt to changes to
9411 `process-use-modules'.
9412
5eec27e9
DH
94132001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9414
9415 * numbers.c (scm_divide): Fix more division by zero errors.
9416
8978878f
GH
94172001-11-21 Gary Houston <ghouston@arglist.com>
9418
9419 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9420 obsolete. autogen.sh says:
9421 invalid unused variable name: `OMIT_DEPENDENCIES'
9422
164826d3
DH
94232001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9424
9425 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9426 reporting the bug.
9427
84aff7a7
MV
94282001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9429
9430 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9431 Thanks to Eric Gillespie, Jr!
34472dfe 9432
6063dc1d
SJ
94332001-11-21 Stefan Jahn <stefan@lkcc.org>
9434
34472dfe
TTN
9435 * win32-socket.c (getservent, setservent, endservent,
9436 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9437 Appropriate replacements for M$-Windows.
9438
9439 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9440 these definitions for GUILE_DEBUG.
9441
9442 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9443 M$-Windows compiler. Include some pieces of code (protoent and
9444 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9445 native M$-Windows compiler.
9446
351982f6
MV
94472001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9448
9449 * modules.c (scm_c_export): Do nothing when the first argument is
9450 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9451
849038b5
TTN
94522001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9453
9454 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9455 also include `buildstamp'.
9456
5c790b44
RB
94572001-11-18 Rob Browning <rlb@defaultvalue.org>
9458
9459 * version.c
9460 (s_scm_major_version): use SCM_MAJOR_VERSION.
9461 (s_scm_minor_version): use SCM_MINOR_VERSION.
9462 (s_scm_micro_version): use SCM_MICRO_VERSION.
9463 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9464 SCM_MICRO_VERSION.
9465
9466 * version.h.in
9467 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9468 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9469 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9470
694a9bb3
NJ
94712001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9472
9473 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9474 Rewrite docstrings without reference to substring-move-left/right,
9475 since the latter no longer exist.
9476
302c12b4
DH
94772001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9478
9479 * eval.c: Removed bogus comment about acros.
9480
9481 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9482 Minimize scope of local variable. Eliminate dependency on
9483 macro DEBUG_EXTENSIONS.
9484
9485 (s_splicing): New error message string.
9486
9487 (scm_m_body): Issue 'bad body' message rather than 'missing
9488 expression' message.
9489
9490 (scm_m_quote): Eliminate unnecessary copying.
9491
9492 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9493 checking of the body to scm_m_body.
9494
9495 (scm_m_do): Move comment to function header. Rename arg1 to
9496 binding. Made the code a bit easier to read.
9497
9498 (evalcar): Removed.
9499
9500 (iqq): Added a comment. Changed the depth parameter to
9501 unsigned. Use size_t for vector lengths. Make sure vector object
9502 is gc protected as long as its contents are read. Add some syntax
9503 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9504 control structure a bit.
9505
9506 (scm_m_delay): Added comment about the implementation of
9507 scm_m_delay.
9508
9509 (scm_m_define): Add comment about guile's currying define
9510 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9511 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9512
9513 (scm_m_letrec1): Removed. Part of the functionality is taken
9514 over by the new function 'transform_bindings'.
9515
9516 (transform_bindings): New function. Takes over some of the
9517 functionality of removed function 'scm_m_letrec1', namely to split
9518 a list of bindings into a reversed list of variables and a list of
9519 initializers.
9520
9521 (scm_m_letrec): Call 'transform_bindings'.
9522
9523 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9524 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9525 test. Use 'transform_bindings'. Fixed scoping error with named
9526 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9527 Jerram for suggesting the fix). Cleaned up the control structure
9528 a bit.
9529
9530 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9531 unnecessary consing. Eliminated unnecessary
9532 SCM_DEFER/ALLOW_INTS.
9533
9534 (SCM_CEVAL): Un-obfuscated some loops.
9535
cecb4a5e
NJ
95362001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9537
8f85c0c6
NJ
9538 * gc.h (scm_unhash_name): Old declaration removed.
9539
9540 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9541 @code{primitive-eval}.
9542
9543 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9544 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9545 Change @deffnx lines in docstrings to say {Scheme Procedure}
9546 rather than primitive or procedure.
9547
9548 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9549 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9550 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9551 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9552 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9553 (scm_string_split, scm_string_ci_to_symbol), strings.c
9554 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9555 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9556 Docstring fixes and improvements reflecting edits that have been
9557 made in the reference manual source.
9558
9559 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9560 scm_object_property, scm_set_object_property_x): Remove invalid
9561 @deffnx lines for corresponding procedure property primitives.
9562
cecb4a5e
NJ
9563 These changes add a @deffnx C function declaration and function
9564 index entries for each Guile primitive to the copy of the doc
9565 snarf output that is used for reference manual synchronization.
9566 Online help is unchanged.
849038b5 9567
cecb4a5e
NJ
9568 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9569 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9570 name to SCM_SNARF_DOCS.
849038b5 9571
cecb4a5e
NJ
9572 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9573 snarf-check-and-output-texi.
9574
9575 * Makefile.am (guile-procedures.texi): New rule.
9576 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9577 Changed so that the last stage of doc snarfing is now performed
9578 twice, once to produce guile-procedures.txt for online help, and
9579 once to produce guile.texi for reference manual synchronization.
9580
ddea3325
DH
95812001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9582
9583 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9584 safely usable as a single statement followed by a ';', for example
9585 in an if statement.
9586
9587 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9588
72dd0a03
NJ
95892001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9590
9591 * random.c (scm_random_solid_sphere_x,
9592 scm_random_hollow_sphere_x): Correct "shere" typos.
9593
9594 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9595
9596 * version.c (scm_version): Update docstring to include
9597 `micro-version'.
9598
6558eda6
MV
95992001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9600
409b8588
MV
9601 * modules.c (scm_c_export): Call va_end after collecting the
9602 symbols.
9603
adb8c0f2
MV
9604 * strop.h, strop.c (scm_substring_move_left_x,
9605 scm_substring_move_right_x): Removed.
9606
6558eda6
MV
9607 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9608 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9609 configure does.
9610
5d8fc640
MV
96112001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9612
9613 * numbers.c: Document macros to define when including
9614 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9615 now rely on SIZEOF_ macros that have been figured out at
9616 configure time.
9617
9618 * num2integral.i.c: Adapt to new interface.
9619 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9620 target type by casting it and checking whether it is still the
9621 same. Do not try to handle bignums for integral types that are
9622 smaller than fixnums. When handling bignums, collect the
9623 magnituse first into a unsigned type, and correctly check for
9624 overflow.
9625 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9626 only -MIN_VALUE can still be negative of all negative numbers (in
9627 twos-complement).
9628
849038b5 9629 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9630
9631 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9632 HAVE_LONG_LONG depending on whether their size is non-zero.
9633
d6b8cf11
TTN
96342001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9635
9636 * strop.c (scm_string_null_p): Docfix; nfc.
9637 Thanks to Scott Lenser.
9638
9401323e
NJ
96392001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9640
9641 * extensions.c (scm_load_extension): Canonicalize docstring
9642 whitespace.
9643
9644 * unif.c (scm_uniform_array_write), ports.c
9645 (scm_current_output_port, scm_force_output), dynwind.c
9646 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9647 filesys.c (scm_open, scm_lstat), struct.c
9648 (scm_make_struct_layout), random.c (scm_random,
9649 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9650 (scm_i_index): Remove superfluous whitespace from end of docstring
9651 lines.
9652
9653 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9654 strings.c (scm_make_string), variable.c (scm_make_variable,
9655 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9656 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9657 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9658 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9659 newline at end of docstrings.
9660
9661 * modules.c (scm_set_current_module): Add missing newline to
9662 docstring.
9663
b4e15479
SJ
96642001-11-07 Stefan Jahn <stefan@lkcc.org>
9665
9666 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9667 and makes them available through Guile. That is because the
9668 Winsock-API does not store its errors in `errno' and thus cannot
9669 return error messages via `strerror (errno)'.
9670
9671 * socket.c (scm_init_socket): Initialize `win32-socket' part
9672 here under M$-Windows.
9673
d6b8cf11 9674 * numbers.h: Added missing declaration of
b4e15479
SJ
9675 `scm_sys_check_number_conversions()'.
9676
9677 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9678 and use in `(strerror)' and `(system-error)'.
9679
d6b8cf11 9680 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9681 `win32-socket.[ch]' to extra source and header files.
9682
7ab89df1
MV
96832001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9684
9685 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9686 a call to turn-on-debugging when --debug has been given instead of
9687 turning it on directly. Also, handle new `--no-debug' option,
9688 which might suppress the call to turn-on-debugging.
9689
0233bfc1
SJ
96902001-11-05 Stefan Jahn <stefan@lkcc.org>
9691
9692 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9693
8f99e3f3
SJ
96942001-11-04 Stefan Jahn <stefan@lkcc.org>
9695
9696 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9697 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9698 correctly and allows a clean build on Win32.
9699
d6b8cf11 9700 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9701 into FOO.
9702
9703 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9704 import macros for external libraries (libcrypt, libqthreads,
9705 libreadline and libregex).
9706
9707 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9708
9709 * posix.c (flock): Added support for flock() in M$-Windows.
9710
9711 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9712 of __SCM_IMPORT__.
9713
9714 * fports.c (getflags): Differentiate reading and writing pipes
9715 descriptors.
9716
9717 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9718 M$-Windows.
9719
9720 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9721 conditionalized error code if `ETIMEDOUT' is not available.
9722 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9723 timeout'.
9724
9725 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9726 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9727 each inclusion of `num2integral.i.c'.
9728 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9729
4e21fa60
MV
97302001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9731
9732 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9733 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9734
08112c95
MD
97352001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9736
7663c008
MD
9737 * print.c (scm_iprin1): Mark print state as revealed when
9738 dispatching to generic write or display.
9739
08112c95
MD
9740 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9741
f712d833
MV
97422001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9743
9744 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9745
f712d833
MV
9746 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9747 and win32-dirent.h to extra source and header files. These
9748 include the uname() and the POSIX dirent interface implementation
9749 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9750 linkers which do not allow unresolved symbols inside shared
9751 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9752 dependency.
9753
d6b8cf11
TTN
9754 * __scm.h: Defined SCM_API. This macro gets prepended to all
9755 function and data definitions which should be exported or imported
f712d833
MV
9756 in the resulting dynamic link library in the Win32 port.
9757
9758 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9759 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9760 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9761 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9762 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9763 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9764 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 9765 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
9766 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9767 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9768 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9769 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9770 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9771 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9772 vports.h, weaks.h:
9773 Prefixed each each exported symbol with SCM_API.
9774
d6b8cf11 9775 * continuations.c: Added comment about the use of the extern
f712d833
MV
9776 declarations of {get,set}context() functions used in the ia64 port.
9777
9778 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9779 is meant to be a `unsigned long *'.
9780
9781 * filesys.c: Include `direct.h' if possible. Use local
9782 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9783 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9784 able to differentiate between sockets and other file descriptors.
9785 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9786 `scm_dirname()'.
9787
9788 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9789 statement block in `scm_fport_buffer_add()'.
9790 Some corrections in `getflags()'.
d6b8cf11 9791
f712d833
MV
9792 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9793
9794 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9795 build on Win32. Disable preloaded symbols on Win2 platforms.
9796
9797 * ioext.c, ports.c: Include `io.h' is possible.
9798
9799 * mkstemp.c: Include `process.h' is possible.
9800
9801 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9802 too.
9803 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9804
9805 * posix.c: Remove unnecessary dirent includes and defines. Include
9806 local `win32-uname.h' for MinGW. Extern declaration of
9807 `mkstemp()' for systems where it does not exists. Make
9808 `getlogin()' available on M$-Windows.
9809
9810 * scmsigs.c: Made `usleep()' avalable on MinGW.
9811
9812 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9813
9814 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9815
9816 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9817
d245ce23
MD
98182001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9819
9820 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9821 Don't apply scm_uniform_vector_length on arrays.
9822
8ea46249
DH
98232001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9824
9825 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9826 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9827 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9828 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9829 scm_list_<n> over scm_cons[2]?.
9830
9831 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9832 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9833 SCM_C[AD][AD]R instead of explicit form.
9834
9835 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9836 comparison parameters.
9837
9838 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9839 !SCM_NULLP instead of SCM_NIMP.
9840
9841 (scm_m_case): Don't copy the form. Renamed proc to clause and
9842 minimized its scope. Renamed x to clauses. Removed side
9843 effecting operation from macro call.
9844
9845 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9846 minimized its scope. Renamed x to clauses. Minimized the scope
9847 of variable 'len'. Make sure the else clause is treated specially
9848 even in case of '=>' occurences. Don't change the else to #t in
9849 order to be able to distinguish this case in the evaluator. Leave
9850 type checking of the recipient to the evaluator.
9851
9852 (scm_c_improper_memq): Made the comment somewhat clearer.
9853
9854 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9855 test for SCM_IM_LET at the place of the formal parameters.
9856 Simplified the formal parameter checking.
9857
9858 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9859 Renamed arg1 to binding and minimized its scope. Eliminated
9860 unnecessary consing.
9861
9862 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9863 variable 'len'.
9864
9865 (build_binding_list): New static function.
9866
9867 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9868 Further, split up the 'letrec' unmemoizing code to the
9869 corresponding parts for 'do', 'let' and 'letrec', adding comments
9870 to each form. Cleanup the handling of the do form (This removes
9871 some *real* code :-).
9872
9873 (SCM_CEVAL): Removed side effecting operation from macro call.
9874 Handle the 'else clause of the 'cond form specially - the symbol
9875 'else is not replaced with #t any more.
9876
8186c4f5
GH
98772001-10-14 Gary Houston <ghouston@arglist.com>
9878
9879 * version.c (scm_version): use sprintf instead of snprintf,
9880 for portability. thanks to Bill Schottstaedt.
9881
89759084
MD
98822001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9883
9884 * read.c (scm_lreadr): When user-defined hash procedure returns
9885 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9886 an exception. (This prevents parsing of uniform vectors from
9887 interfering with parsing of numbers.)
9888
9c7ce563
MV
98892001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9890
9891 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9892 PTRDIFF_MIN. Thanks to Ken Raeburn.
9893
98942001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9895
9896 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9897
9898 * eval.c (scm_m_atbind): First try to find the variable without
9899 defining it locally; when it has not been found, define it
9900 locally.
9901
9902 * modules.c (module_variable): Pass over variables that exist but
9903 are unbound.
9904
99052001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9906
9907 * backtrace.c (display_backtrace_file_and_line): Only use
9908 scm_basename when POSIX support is compiled in. Thanks to Chris
9909 Cramer.
9910
1fe5e088
DH
99112001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9912
9913 * numbers.c (mem2uinteger): Return number read so far when coming
9914 across a hexdigit after having read a # or if not reading a hex
9915 value. This will enable the calling code to correctly handle
9916 forms like 1e2. (The background is, that the exponent markers d,
9917 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9918 providing this patch.
9919
9920 (mem2complex): Fix erroneous double-negation. Now, numbers like
9921 1-i will be read correctly.
9922
68665a97
MD
99232001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9924
9925 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9926
9927 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9928
d5cf5324
DH
99292001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9930
9931 * print.c (scm_print_state_vtable, print_state_pool):
9932 Initialize. These variables are now registered as gc roots.
9933
9934 (scm_current_pstate): Update documentation.
9935
9936 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9937 scm_prin1, scm_init_print): print_state_pool is registered as a
9938 gc root and thus does not need to be protected by a surrounding
9939 pair any more.
9940
9941 (make_print_state): The car of print_state_pool no longer holds
9942 the scm_print_state_vtable.
9943
9944 (scm_current_pstate, scm_make_print_state, print_circref,
9945 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
9946 SCM_N<foo>.
9947
9948 (scm_prin1): When building lists, prefer scm_list_<n> over
9949 scm_cons[2]?.
9950
9951 (scm_iprlist): Removed a redundant SCM_IMP test.
9952
9953 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
9954
37c56aec
DH
99552001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9956
9957 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
9958
9959 (scm_memcons, scm_mem_to_proc): When building lists, prefer
9960 scm_list_<n> over scm_cons[2]?.
9961
9962 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
9963
9964 (scm_procedure_name): Use SCM_CADR instead of explicit form.
9965
9966 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
9967 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
9968 for some reason his patch didn't make it into the cvs.
9969
79d34f68
DH
99702001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
9971
9972 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
9973 little bit - should even be somewhat more accurate now.
9974
5e137c65
RB
99752001-10-08 Rob Browning <rlb@defaultvalue.org>
9976
9977 * gc.c: support ia64 register backing store.
9978 (SCM_MARK_BACKING_STORE): new macro.
9979
9980 * continuations.h: support ia64 register backing store.
9981 (struct scm_t_contregs): add ia64 register backing store.
9982
9983 * continuations.c: support ia64 register backing store.
9984 (continuation_mark): mark ia64 register backing store.
9985 (continuation_free): free ia64 register backing store.
9986 (scm_make_continuation): capture ia64 register backing store.
9987 (copy_stack_and_call): copy ia64 register backing store.
9988
ee083ac2
DH
99892001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9990
9991 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
9992 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
9993 instead of SCM_NIMP to test for that case.
9994
9995 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
9996 scm_t_bits instead of long.
9997
71dcdbf9
MV
99982001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9999
10000 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10001 SCM_T_SIGNED_BITS_MIN): New.
10002 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10003 Use them to make these macros computable by the preprocessor.
10004
10005 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10006 whether the integral type fits in a fixnum, not the compiler.
10007 This removes a spurious compiler warning. Also, honor the
10008 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10009 needed for `long long's.
10010
10011 * numbers.c: Define NO_PREPRO_MAGOC when including
10012 num2integral.c.i for `long long' and `signed long long'.
10013
152812c0
MD
100142001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10015
10016 These changes fixes a race condition in the Guile coop - pthread
10017 compatibility code.
d6b8cf11 10018
152812c0
MD
10019 * coop.c (mother_awake_p): New variable.
10020 (coop_create): Set mother_awake_p before creating or signalling
10021 mother; wait until mother is going to sleep before returning.
10022 (mother): Reset mother_awake_p before going to sleep.
10023
11d49f54
DH
100242001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10025
10026 * options.c (protected_objects, scm_init_options): The content of
10027 protected_objects is now protected from garbage collection using
10028 scm_gc_register_root instead of scm_permanent_object.
10029
10030 (get_option_setting): New static function that computes an option
10031 setting as it was formerly done in the function scm_options.
10032
10033 (get_documented_option_setting): New static function that
10034 returns option documentation as it was formerly done in the
10035 function scm_options. Note that documentation C strings are no
10036 longer precomputed into SCM objects. Instead, they are converted
10037 into SCM strings every time get_documented_option_setting is
10038 called.
10039
10040 (change_option_setting): New static functions that modifies the
10041 option setting as it was formerly done in the function
10042 scm_options. The function is now exception safe, i. e. won't
10043 cause a memory leak when interrupted. Further, only non-immediate
10044 option values are added to the protection list.
10045
10046 (scm_options): This function now has only the purpose to dispatch
10047 to to get_option_setting, get_documented_option_setting or
10048 change_option_setting, depending on the arguments given to
10049 scm_options.
10050
10051 (scm_init_opts): Don't convert documentation C strings into SCM
10052 strings. Further, don't protect any object values: They _must_
10053 be immediate values, otherwise there is no guarantee that they
10054 have not been collected before anyway.
10055
10056 * options.[ch] (scm_t_option): Made type unsigned, name into a
10057 constant char* and val into a scm_t_bits type.
10058
10059 (scm_options, scm_init_opts): The number of options is guaranteed
10060 to be larger or equal to zero. Thus, the type is changed to
10061 unsigned.
10062
3dbacabc
DH
100632001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10064
10065 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10066 testing an unsigned value for being >= 0.
10067
14282d0f
DH
100682001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10069
10070 * numbers.h: Removed old comment about using SCM_CAR to access
10071 non-pair cells.
10072
10073 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10074 the return value is signed. Thanks to Brian Crowder for the bug
10075 report.
10076
10077 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10078 values. With this patch, SCM_SRS can be safely used for other
10079 types than scm_t_signed_bits. However, it should still better be
10080 an internal macro and thus be renamed to SCM_I_SRS.
10081
10082 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10083
2dbec7b5
GH
100842001-10-03 Gary Houston <ghouston@arglist.com>
10085
10086 * continuations.h, unif.h: in the descriptions of the bit patterns
10087 of the heap cells, make bit 0 the least significant.
10088
cf4ee841
TTN
100892001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10090
10091 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10092 Thanks to Golubev I. N.
10093
4a151b3d
GH
100942001-09-25 Gary Houston <ghouston@arglist.com>
10095
10096 * ports.c (scm_drain_input): extended the docstring. thanks to
10097 Alex Schroeder and Thien-Thi Nguyen.
10098
581ded70
MD
100992001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10100
10101 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10102 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10103 macros. (The NUM names might soon change.)
10104
10105 * numbers.h: Added missing declarations.
10106
5437598b
MD
101072001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10108
10109 * Makefile.am: Distribute num2float.i.c.
10110
10111 * num2float.i.c: New file, multiply included by numbers.c, used
10112 to "templatize" the float <-> num conversion routines.
10113
10114 * numbers.c: New functions: scm_num2float, scm_float2num,
10115 scm_num2double, scm_double2num.
10116
0b073f0f
RB
101172001-09-21 Rob Browning <rlb@defaultvalue.org>
10118
10119 * .cvsignore: really add version.h
10120
10121 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10122 Otherwise it fails on the alpha. However, we might rather choose
10123 this size conditionally.
10124
10125 * numbers.c (scm_gcd): change "k" to a long from an int.
10126 Otherwise it fails on the alpha. However, we might rather choose
10127 this size conditionally.
10128
10129 * error.c (scm_wta): coerce char* to intptr_t before int
10130 assignment.
10131
10132 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10133 int.
10134
10135 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10136
2830fd91
MD
101372001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10138
10139 * numbers.c (scm_integer_expt): Accept inexact integer in second
10140 argument. (Thanks to Bill Schottstaedt.)
10141
c13f0a90
RB
101422001-09-20 Rob Browning <rlb@defaultvalue.org>
10143
10144 * .cvsignore: add version.h
10145
10146 * versiondat.h.in: removed (obsolete).
10147
10148 * version.h.in: renamed from version.h.
10149 (SCM_GUILE_MAJOR_VERSION): new public macro.
10150 (SCM_GUILE_MINOR_VERSION): new public macro.
10151 (SCM_GUILE_MICRO_VERSION): new public macro.
10152
10153 * version.h: renamed to version.h.in.
10154
10155 * version.c
10156 (scm_major_version): support integer *_VERSION macros.
10157 (scm_minor_version): support integer *_VERSION macros.
10158 (scm_micro_version): support integer *_VERSION macros.
10159 (scm_version): support integer *_VERSION macros.
10160
147c18a0
MD
101612001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10162
10163 * error.c, error.h: Made error keys globally accessible.
10164 Applications might want to test for these or use them in a direct
10165 call to scm_error.
10166
10167 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10168 routines are passed an inexact. This change in behavior is
10169 motivated by concordance with R5RS: It is more common that a
10170 primitive doesn't want to accept an inexact for an exact.
10171
662c5539
DH
101722001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10173
10174 The following patch partially undoes my patch from 2001-06-30,
10175 where I added the function scm_gc_mark_cell_conservatively. The
10176 function is buggy, since it breaks guile during conservative
10177 marking if a pointer on the stack points directly into the list of
10178 free cells on the heap: With conservative cell marking this will
10179 cause the whole free list to be scanned and marked - boom!
10180
10181 * gc.c (allocated_mark, MARK, heap_segment,
10182 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10183 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10184 scm_gc_mark_cell_conservatively and update the corresponding
10185 comments and uses accordingly. Thanks to Christopher Cramer for
10186 the patch. (Minor corrections by me.)
10187
6c1b7628
GH
101882001-09-15 Gary Houston <ghouston@arglist.com>
10189
10190 * root.h (scm_root_state): removed the continuation_stack and
10191 continuation_stack_ptr members, which have no apparent purpose.
10192 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10193 removed.
662c5539 10194
6c1b7628
GH
10195 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10196 (scm_igc): remove all references to contination_stack and
10197 continuation_stack_ptr, avoiding allocation of a vector and
10198 useless processing during gc.
10199
455c0ac8
DH
102002001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10201
10202 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10203
10204 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10205
10206 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10207
10208 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10209
10210 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10211 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10212
22ba637b
DH
102132001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10214
10215 * guardians.c (mark_dependencies_in_tconc,
10216 whine_about_self_centered_zombies, scm_init_guardians): Register
10217 the static global variable `self_centered_zombies' via
10218 scm_gc_register_root, to make some cdr-ing unnecessary.
10219
c3c4d801
DH
102202001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10221
10222 * backtrace.c (display_backtrace_file,
10223 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10224 values, use SCM_FALSEP when comparing SCM values against #f.
10225 Thanks to Rob Browning for the bug report.
10226
b00418df
DH
102272001-09-12 Martin Baulig <martin@home-of-linux.org>
10228
10229 * strings.[ch] (scm_str2string): New function.
10230
a0d34a0b
MV
102312001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10232
10233 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10234 when computing nm, even if it's negative.
10235 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10236 (scm_must_realloc): Likewise.
10237
b10586f0
ML
102382001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10239
10240 * numbers.c (scm_sys_check_number_conversions): new function,
10241 defined if Guile is compiled in debugging mode. currently checks
10242 `scm_num2ulong', should check much much more.
10243
10244 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10245 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10246
8c494e99
DH
102472001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10248
10249 * __scm.h: Added new section about compile time selectable
10250 features.
10251
10252 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10253 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10254 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10255 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10256 Removed.
10257
10258 * deprecation.c (scm_include_deprecated_features): Simplified.
10259
10260 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10261 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10262
10263 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10264 Extract side-effecting operations from macros.
10265
10266 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10267 scm_top_level_lookup_closure_var and scm_system_transformer.
10268
10269 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10270
10271 (heap_segment): Use CELL_P instead of SCM_CELLP.
10272
10273 * init.c (start_stack): Don't initialize
10274 scm_top_level_lookup_closure_var and scm_system_transformer.
10275
10276 * modules.c (scm_set_current_module): Don't access
10277 scm_top_level_lookup_closure_var and scm_system_transformer.
10278
10279 (scm_sym2var): Don't call scm_variable_set_name_hint.
10280
10281 (scm_post_boot_init_modules): Removed deprecated initializations.
10282
10283 * print.c (scm_ipruk): Don't access cell contents of non cells.
10284
10285 * strings.c (scm_string_set_x): All strings are writable.
10286
10287 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10288 type. There is only one string type now.
10289
10290 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10291
10292 * tags.h: Remove comments about two different string types.
10293
10294 (SCM_CELLP, SCM_NCELLP): Deprecated.
10295
10296 * variable.c (make_variable): Remove code variant for vcells.
10297
10298 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10299 SCM_VARIABLE_LOC): Remove code variant for vcells.
10300
10301 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10302 SCM_ENABLE_DEPRECATED with the logic reversed.
10303
10304 * dynl.c (moddata, registered_mods), dynl.[ch]
10305 (scm_register_module_xxx, scm_registered_modules,
10306 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10307 (*top-level-lookup-closure*), eval.[ch]
10308 (scm_top_level_lookup_closure_var, scm_system_transformer,
10309 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10310 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10311 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10312 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10313 scm_unprotect_object), modules.c (root_module_lookup_closure,
10314 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10315 beautify_user_module_x_var, try_module_autoload_var,
10316 scm_module_full_name), modules.[ch] (scm_the_root_module,
10317 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10318 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10319 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10320 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10321 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10322 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10323 scm_make_shared_substring), tags.h (scm_tc7_substring,
10324 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10325 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10326 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10327 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10328 Removed.
10329
10330 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10331 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10332 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10333 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10334 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10335 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10336 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10337 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10338 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10339 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10340 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10341 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10342 (setzone, scm_strftime, scm_strptime), vports.c
10343 (scm_make_soft_port): Remove calls to
10344 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10345 gone, all strings are 0-terminated anyway.
10346
10347 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10348 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10349 double inclusion of the same headers to the SCM_<filename>_H
10350 format.
10351
10352 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10353 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10354 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10355 any more.
10356
10357 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10358 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10359 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10360 !SCM_<foo> over SCM_N<foo>.
10361
dee01b01
DH
103622001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10363
10364 * Makefile.am: Remove references to symbols-deprecated.c.
10365
10366 * symbols.c (scm_init_symbols): Don't initialize deprecated
10367 symbol functions.
10368
10369 * symbols-deprecated.c: Removed.
10370
10371 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10372 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10373 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10374 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10375 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10376 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10377 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10378 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10379 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10380 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10381 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10382 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10383 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10384 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10385 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10386 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10387 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10388 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10389 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10390 scm_intern0, scm_sysintern, scm_sysintern0,
10391 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10392 scm_string_to_obarray_symbol, scm_intern_symbol,
10393 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10394 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10395 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10396 vectors.[ch] (scm_vector_set_length_x): Removed.
10397
10398 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10399 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10400 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10401 Renamed the macros that are defined to inhibit double inclusion of
10402 the same headers to the SCM_<filename>_H format.
10403
10404 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10405 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10406 SCM_N<foo>.
10407
b29058ff
DH
104082001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10409
10410 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10411 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10412 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10413 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10414 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10415 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10416 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10417 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10418 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10419 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10420 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10421 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10422
10423 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10424 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10425 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10426 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10427 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10428 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10429 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10430 double inclusion of the same headers to the SCM_<filename>_H
10431 format.
10432
10433 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10434 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10435 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10436 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10437 !SCM_<foo> over SCM_N<foo>.
10438
0527e687
DH
104392001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10440
10441 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10442 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10443 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10444 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10445 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10446 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10447 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10448 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10449 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10450 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10451 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10452 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10453 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10454 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10455 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10456 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10457 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10458 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10459 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10460 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10461 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10462 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10463 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10464 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10465 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10466 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10467 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10468 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10469 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10470 the macros that are defined to inhibit double inclusion of the
10471 same headers to the SCM_<filename>_H format.
10472
fada26b2
MV
104732001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10474
10475 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10476 "scm_t_portable" with "scm_port_table" which was an artifact from
10477 the great "scm_*_t -> scm_t_" renaming.
10478
e4d1c1ea
TTN
104792001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10480
10481 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10482 used; nfc. Thanks to Bill Schottstaedt.
10483
10484 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10485 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10486 Thanks to Chris Cramer.
10487
b573e744
MV
104882001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10489
10490 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10491
10492 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10493 dynamic scope.
10494 * dynwind.h (scm_swap_bindings): Declare.
10495 * dynwind.c (scm_swap_bindings): Make non-static.
10496
8a3e715b
ML
104972001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10498
10499 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10500 doing exactly nothing about them). thanks Neil!
10501
cf504ee0
NJ
105022001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10503
10504 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10505
43b83b54
TTN
105062001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10507
10508 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10509 (proto) in the case when either `GUILE_DEBUG' or
10510 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10511
10512 (map_free_list): Fix typo: Ref `f' correctly.
10513
10514 Thanks to Chris Cramer.
10515
ab4cd34b
RB
105162001-08-15 Rob Browning <rlb@defaultvalue.org>
10517
10518 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10519 variables.
10520 (libpath.h): change libguileversion to libguileinterface.
10521
b754e3d1
MV
105222001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10523
10524 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10525 ChangeLog-2000. Thanks to Daniel Skarda!
10526
8b1d12c7
ML
105272001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10528
10529 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10530 do it from the Makefile.
10531
10532 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10533 are of a reasonable size.
10534
baffb19f
NJ
105352001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10536
10537 * stacks.c (scm_make_stack): Improve docstring by explaining use
10538 of cutting args.
10539
c1151355
MV
105402001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10541
10542 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10543 scm_char_whitespace_p, scm_char_upper_case_p,
10544 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10545 characters to fulfill isascii in addition to the primary
10546 predicate.
10547
3c9a524f
DH
105482001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10549
10550 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10551 scm_istr2flo, scm_istring2number): Removed.
10552
10553 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10554 SCM_SLOPPY_<foo>.
10555
10556 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10557 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10558 Added.
10559
10560 (scm_string_to_number): Use new number parser.
10561
10562 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10563 handles complex numbers.
10564
10565 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10566 SCM_<foo>_H.
10567
10568 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10569 SCM_N<pred>.
10570
10571 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10572
10573 (scm_i_mem2number): Added.
10574
10575 (scm_exact_to_inexact): Changed signature.
10576
10577 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10578 here instead of within scm_i_mem2number. Call scm_i_mem2number
10579 instead of scm_istr2int and scm_istring2number.
10580
01f11e02
DH
105812001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10582
10583 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10584 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10585 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10586 !SCM_<pred> over SCM_N<pred>.
10587
10588 (scm_eval_body): Remove side effecting code from macro call.
10589
10590 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10591 SCM_NIMP test.
10592
6cf69537
DH
105932001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10594
10595 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10596
54866b6c
MV
105972001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10598
10599 Removed vcell slot from structs.
43b83b54 10600
54866b6c
MV
10601 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10602 subsequent indices.
10603
10604 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10605 zero. Use scm_vtable_index_layout instead of "0" when accessing
10606 said slot.
10607 (scm_init_struct): Remove vcell slot layout code from
10608 required_vtable_fields.
10609
10610 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10611
10612 * goops.c (build_class_class_slots): Removed vcell slot
10613 definition.
10614
10615 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10616 Removed vcell slot layout code.
10617 (scm_si_vcell): Removed.
10618
5b54c4da
MV
106192001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10620
a0f5718e 10621 "Glocs" have been removed.
43b83b54 10622
a0f5718e
MV
10623 * tags.h: Update tag system docs.
10624 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10625 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10626 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10627 or SCM_NCONSP, respectively.
10628
10629 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10630 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10631 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10632
10633 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10634 tell glocs from structs.
43b83b54 10635
a0f5718e
MV
10636 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10637
10638 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10639 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10640 instead of with glocs.
10641 (EVALCAR): Do not test for glocs.
10642 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10643 condition.
10644 (scm_unmemocar): Do not handle glocs.
10645 (scm_m_atfop): Memoize as a variable, not as a gloc.
10646 (scm_eval_args, scm_deval_args): Do not handle glocs.
10647 (scm_ceval, scm_deval): Likewise.
43b83b54 10648
a0f5718e
MV
10649 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10650 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10651 Removed.
10652
10653 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10654
10655 * dynwind.c (scm_swap_bindings): Likewise.
10656 (scm_dowinds): Updated to recognize lists of variables instead of
10657 lists of glocs.
10658
10659 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10660
43b83b54 10661
5b54c4da
MV
10662 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10663 where it is needed.
43b83b54 10664
3c3db128
GH
106652001-07-25 Gary Houston <ghouston@arglist.com>
10666
10667 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10668 docstrings to reflect the n-ary implementation.
10669
dd29a169
MV
106702001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10671
10672 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10673 value of a variable, not the plain "return" statement.
10674
f5fe6c2f
MV
106752001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10676
10677 * eval.c: Allow variables in memoized code (in addition to glocs).
10678 (scm_lookupcar): Handle variables in lost races. Replace symbol
10679 with variable directly, do not make a gloc.
10680 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10681 like glocs.
10682 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10683 the main switch.
10684
ee0c7345
MV
106852001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10686
6d9ad98a
MV
10687 * variable.c (scm_i_variable_print): Use "value" instead of
10688 "binding" since a binding is the mapping between symbols and
10689 variables, not between variables and their values.
10690
ee0c7345
MV
10691 * tags.h (scm_tc7_variable): New.
10692 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10693 * print.c (scm_iprin1): Likewise.
10694
10695 * variable.h (scm_tc16_variable): Removed.
10696 (SCM_VARIABLEP): Test for new tc7 code.
10697 (scm_i_variable_print): New.
10698 * variable.c (scm_tc16_variable): Removed.
10699 (variable_print): Renamed to scm_i_variable_print and made
10700 non-static.
10701 (variable_equal_p): Removed.
10702 (make_variable): Construct a tc7 object instead of a smob.
10703 (scm_init_variable): Do not register smob.
43b83b54 10704
f3805ebb
MV
107052001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10706
10707 * tags.h: Include inttypes.h when we have it.
10708
107092001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10710
10711 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10712 is taken by the new SCM_IM_CALL_WITH_VALUES.
10713 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10714
6a1677a3
GH
107152001-07-22 Gary Houston <ghouston@arglist.com>
10716
10717 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10718 SCM_MAKINUM to convert regoff_t value to SCM.
10719
1bed8c28
GH
107202001-07-21 Gary Houston <ghouston@arglist.com>
10721
10722 * scmsigs.c: include sys/time.h for itimer stuff.
10723
e658215a
RB
107242001-07-19 Rob Browning <rlb@defaultvalue.org>
10725
10726 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10727
10728 * c-tokenize.lex: add option %nounput to quiet warning.
10729 Add prototype for yylex to quiet warning.
10730
10731 * scmconfig.h.in: add flags for setitimer and getitimer.
10732
10733 * scmsigs.h (scm_init_scmsigs): new prototype.
10734 (scm_init_scmsigs): new prototype.
10735
10736 * scmsigs.c (s_scm_setitimer): new function.
10737 (s_scm_setitimer): new function.
10738
58ade102
MG
107392001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10740
10741 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10742 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10743 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10744 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10745 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10746 guile-func-name-check.in, guile-snarf-docs-texi.in,
10747 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10748 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10749 objprop.c, objprop.h, options.c, options.h, random.h,
10750 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10751 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10752 version.c, version.h: Updated copyright notice.
10753
6b80d352
DH
107542001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10755
10756 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10757 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10758 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10759 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10760 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10761 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10762 sym_environment, scm_sym_change_class): New static variables to
10763 hold predefined symbols.
10764
10765 (build_class_class_slots): Build the list using scm_list_n
10766 instead of cons. Also, slots are already created as lists, thus
10767 making a call to maplist unnecessary.
10768
10769 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10770 scm_class_direct_subclasses, scm_class_direct_methods,
10771 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10772 scm_method_procedure, create_standard_classes, purgatory): Use
10773 predefined symbols.
10774
10775 (build_slots_list, compute_getters_n_setters,
10776 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10777 get_slot_value_using_name, set_slot_value_using_name,
10778 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10779 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10780 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10781
10782 (scm_sys_prep_layout_x): Minimize variable scopes.
10783
10784 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10785 scm_sys_fast_slot_set_x): Fix signedness.
10786
10787 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10788 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10789 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10790 when converting to and from SCM values.
10791
10792 (scm_enable_primitive_generic_x): Add rest argument checking.
10793
10794 (map, filter_cpl, maplist, scm_sys_initialize_object,
10795 scm_sys_prep_layout_x, slot_definition_using_name,
10796 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10797 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10798 predicates over SCM_N?IMP tests.
10799
10800 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10801 checking.
10802
10803 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10804 alias.
10805
63bcad19
DH
108062001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10807
10808 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10809
10810 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10811
10812 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10813
10814 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10815
4d6aae71
ML
108162001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10817
10818 * strings.c (s_scm_string): fix arg position in assert.
10819
4b8ec619
GH
108202001-07-11 Gary Houston <ghouston@arglist.com>
10821
10822 * strports.c (st_write): use memcpy, not strncpy. thanks to
10823 Dale P. Smith.
10824
dbb640bd
TTN
108252001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10826
10827 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10828 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10829 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10830 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10831 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10832 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10833 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10834 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10835 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10836 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10837 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10838 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10839 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10840 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10841 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10842 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10843 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10844 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10845 weaks.c, weaks.h: Remove "face-lift" comment.
10846
fd6c6321
RB
108472001-07-08 Rob Browning <rlb@defaultvalue.org>
10848
10849 * .cvsignore: add stamp-h.in.
10850
f91e4547
MG
108512001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10852
10853 * hooks.c (scm_make_hook, scm_add_hook_x),
10854 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10855 value info to the docstrings.
10856
7beabedb
MG
108572001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10858
10859 Some more compatibility patches for Windows.
dbb640bd 10860
7beabedb
MG
10861 * posix.c (getlogin): getlogin() implementation for Windows.
10862
10863 * backtrace.c, ioext.c: Include <stdio.h>.
10864
10865 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10866 exist.
10867
10868 * cpp_sig_symbols.in: Added SIGBREAK.
10869
0d0560d0
MV
108702001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10871
10872 * strports.c (scm_read_0str, scm_eval_0str): Call
10873 scm_c_read_string and scm_c_eval_string respectively, not
10874 themselves. Thanks to Dale P. Smith!
10875
9a97e362
DH
108762001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10877
10878 * unif.c (scm_array_set_x): The variable args does not
10879 necessarily have to be a list. Further, got rid of a redundant
10880 SCM_NIMP test.
10881
592996c9
DH
108822001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10883
10884 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10885 last.
10886
10887 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 10888 init_heap_seg): Fixed signedness.
592996c9
DH
10889
10890 (init_heap_seg): Replaced strange for-loop with a while loop.
10891
10892 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10893
10894 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10895
10896 The following patch adds conservative marking for the elements of
10897 free or allocated cells.
10898
10899 * gc.c (allocated_mark, heap_segment): New static functions.
10900
10901 (which_seg): Deleted, since the functionality is now provided by
10902 function heap_segment.
10903
10904 (map_free_list): Use heap_segment instead of which_seg.
10905
10906 (MARK): If cell debugging is disabled, mark free cells
10907 conservatively.
10908
10909 (scm_mark_locations, scm_cellp): Extracted the search for the
10910 heap segment of a SCM value into function heap_segment.
10911
10912 (scm_init_storage): Allocated cells must be marked
10913 conservatively.
10914
10915 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10916
10917 The following patch changes the representation of weak vectors to
10918 double cells instead of using an extension of the vector's
10919 allocated memory.
10920
10921 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10922 the result of SCM_WVECT_GC_CHAIN.
10923
10924 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10925
10926 * weaks.c (allocate_weak_vector): New static function. It does
10927 not patch any previously created vector object during the
10928 construction of a weak vector, and thus doesn't need to switch
10929 off interrupts during vector creation.
10930
10931 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10932 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10933 Use allocate_weak_vector to provide the new weak vector object.
10934
10935 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10936 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10937 now stored in the double cell.
10938
10939 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10940 Use SCM_WVECT_TYPE.
10941
10942 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10943 using an entry of the double cell.
10944
4dadf664
TTN
109452001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
10946
10947 * stamp-h.in: bye bye
10948
02202352
MV
109492001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
10950
10951 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
10952 scm_eval_0str.
10953
10954 * load.c, load.h (scm_c_primitive_load,
10955 scm_c_primitive_load_path): New.
10956
10957 * strports.c, strports.h (scm_c_read_string): Renamed from
10958 scm_read_0str. Also, added "const" qualifier to argument.
10959 (scm_c_eval_string): Renamed from scm_eval_0str.
10960 (scm_read_0str, scm_eval_0str): Deprecated.
10961
df1ad0d1
MG
109622001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10963
10964 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
10965 SCM_LIST1.
10966
1afff620
KN
109672001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
10968
10969 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
10970 scm_list_n): New functions.
10971 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
10972 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
10973 (lots of files): Use the new functions.
4dadf664 10974
1afff620
KN
10975 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
10976
10977 * strings.c: #include "libguile/deprecation.h".
10978
b858464a
MG
109792001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10980
10981 * read.c (scm_lreadr): When reading a hash token, check for a
10982 user-defined hash procedure first, so that overriding the builtin
10983 hash characters is possible (this was needed for implementing
10984 SRFI-4's read synax `f32(...)').
4dadf664 10985
b858464a
MG
10986 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
10987 because the latter is unsigned now and breaks comparisons like
10988 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 10989
d95c0b76
NJ
109902001-06-26 Neil Jerram <neil@ossau.uklinux.net>
10991
10992 * eval.h, eval.c (scm_call_4): New function.
10993
10994 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
10995 directly rather than dispatching to them via scm_ithrow and a lazy
10996 catch.
4dadf664 10997
d95c0b76
NJ
10998 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
10999 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11000 for trap handler procedures.
11001
11002 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11003 procedures not being #f.
11004
30e3be5a
ML
110052001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11006
11007 * Makefile.am (c-tokenize.c): add rule to generate it.
11008 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11009
11010 filter-doc-snarfage.c: remove.
11011
82893676
MG
110122001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11013
11014 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11015
11016 The following set of changes makes compiling Guile under various
11017 Windows compilers easier. Compilation under GNU systems should
11018 not be affected at all.
11019
11020 Thanks to Stefan Jahn for all necessary information, patches and
11021 testing.
4dadf664 11022
82893676
MG
11023 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11024 getpgrp, ttyname, primitive-fork and some header inclusion for
11025 Windows.
11026
11027 * random.c: Define M_PI, if not predefined and use __int64 for
11028 LONG64 under Windows.
11029
11030 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11031 Windows and conditionalize some signal names.
11032
4dadf664 11033 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11034 Include socket library header under Windows.
11035
11036 * stime.c (CLKTCK): Add cast to int, to make it compile under
11037 Windows.
11038
11039 * ports.c (truncate): New function, compiled only under Windows.
11040
11041 * net_db.c: Do not declare errno under Windows.
11042
11043 * iselect.h, inet_aton.c: Include socket library headers under
11044 Windows.
11045
11046 * guile.c (inner_main): Under Windows, initialize socket library
11047 and initialize gdb_interface data structures.
11048
11049 * gdb_interface.h: Under Windows, gdb_interface cannot be
11050 initialized statically. Initialize at runtime instead.
11051
11052 * fports.c (write_all): ssize_t -> size_t.
11053 (fport_print): Conditionalize call to ttyname().
11054 (getflags): New function, compiled only under Windows.
11055
11056 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11057 primitives chown, link, fcntl.
11058 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11059 as path seperator.
11060
11061 * backtrace.c: Include <io.h> under Windows.
11062
11063 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11064
11065 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11066 declaration.
11067
fdc28395
KN
110682001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11069
11070 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11071 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11072 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11073 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11074 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11075 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11076 (scm_dynamic_wind, scm_dowinds), environments.c
11077 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11078 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11079 goops.c (GETVAR, purgatory, make_class_from_template,
11080 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11081 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11082 (scm_primitive_load), modules.c (scm_resolve_module,
11083 scm_c_define_module, scm_c_use_module, scm_c_export,
11084 module_variable, scm_eval_closure_lookup, scm_sym2var,
11085 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11086 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11087 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11088 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11089 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11090 (scm_object_to_string, scm_call_with_output_string,
11091 scm_call_with_input_string), throw.c (scm_body_thunk,
11092 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11093 scm_make_shared_array), vports.c (sf_flush, sf_write,
11094 sf_fill_input, sf_close): Use one of the above functions.
11095 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11096
36284627
DH
110972001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11098
11099 * filesys.c (scm_close), ports.c (scm_close_port,
11100 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11101 instead of SCM_NEGATE_BOOL.
11102
11103 * filesys.c (scm_stat): Clean up type dispatch.
11104
11105 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11106 scm_output_port_p): Get rid of redundant IM type check.
11107
11108 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11109 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11110 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11111 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11112 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11113 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11114 scm_addr_vector), stime.c (scm_strftime), strings.c
11115 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11116 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11117 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11118 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11119 instead of scm_makfromstr.
11120
11121 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11122 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11123 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11124 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11125 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11126 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11127 !SCM_<pred> over SCM_N<pred>.
11128
11129 * strings.[ch] (scm_makfromstr): Deprecated.
11130
11131 (scm_mem2string): New function, replaces scm_makfromstr.
11132
11133 * strings.c (scm_substring), strop.c (string_copy,
11134 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11135 (scm_symbol_to_string): Fix gc problem.
11136
11137 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11138 SCM_<foo>_H.
11139
11140 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11141 warning about comparing signed and unsigned values. This fix is
11142 not optimal, since it won't work reliably if sizeof (c_start) >
11143 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11144 solution is to define this macro as an inline function, thus
11145 allowing to specifiy the types of c_start and c_end.
11146
13dcb666
DH
111472001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11148
11149 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11150 scm_t_debug_frame*.
11151
11152 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11153 Rename <foo>H to SCM_<foo>_H.
11154
11155 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11156 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11157
11158 (narrow_stack): Make i unsigned. Don't use side-effecting
11159 operations in conditions.
11160
11161 (narrow_stack, scm_make_stack, scm_stack_id,
11162 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11163
11164 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11165 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11166 more.
11167
11168 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11169 signedness.
11170
ea2c3968 11171 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11172
11173 * stacks.h (SCM_FRAMEP): Fix type check.
11174
ac13d9d2
ML
111752001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11176
ee0c0e03
ML
11177 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11178 c-tokenize.c when doing maintainer-clean.
11179
ac13d9d2
ML
11180 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11181
11182 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11183 simplify.
11184
11185 * eval.c: all hash signs are in column 0.
11186
11187 * Makefile.am (guile_filter_doc_snarfage): build using
11188 c-tokenize.c, not filter-doc-snarfage.c.
11189 rearrange snarfing dependencies a bit.
11190
11191 * c-tokenize.lex: new file.
11192
16be44e5
MV
111932001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11194
11195 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11196 scm_t_srcpropso_plist. See the big type renaming.
11197 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11198 Thanks to Seth Alves!
4dadf664 11199
16be44e5
MV
11200 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11201 they aren't defined already.
11202
5843e5c9
DH
112032001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11204
11205 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11206 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11207 problem.
11208
11209 * backtrace.c (display_expression, scm_set_print_params_x,
11210 display_application, display_frame, scm_backtrace), numbers.c
11211 (scm_istring2number), objects.c (scm_class_of,
11212 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11213 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11214
11215 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11216 always positive.
11217
11218 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11219 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11220
11221 * objects.c (scm_class_of): Type fix.
11222
11223 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11224 eliminated goto.
11225
11226 * pairs.h (scm_error_pair_access): The function can return if
11227 called recursively.
11228
6b41a313
MG
112292001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11230
11231 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11232
11233 * gdbint.c, init.c: Removed inclusion of tag.h.
11234
11235 * tag.h, tag.c: Removed files.
11236
11237 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11238
fbbdb121
GH
112392001-06-20 Gary Houston <ghouston@arglist.com>
11240
11241 * deprecation.c, extensions.c, rw.c: include string.h.
11242
72c17ed0
GH
112432001-06-19 Gary Houston <ghouston@arglist.com>
11244
11245 * filter-doc-snarfage.c (process): added ungetc in
11246 MULTILINE_COOKIE case since otherwise it fails when there's no
11247 space between the '(' and the quote of the following string
11248 (gcc 3.0).
11249
4ff9f825
MV
112502001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11251
4927dd28
MV
11252 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11253
b629af45
MV
112542001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11255
11256 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11257 extension takes place.
11258 * strings.h (SCM_STRING_LENGTH): Likewise.
11259 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11260
4ff9f825
MV
11261 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11262 it.
11263
11264 * tags.h: Include <stdint.h> when we have it.
11265 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11266 available. Else use "unsigned long".
11267 (scm_signed_bits_t): New.
11268
11269 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11270 (SCM_INUM): Cast result to scm_signed_bits_t.
11271
58bee6a8
TTN
112722001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11273
11274 * mkstemp.c: Update path to #include file scmconfig.h.
11275 Thanks to Golubev I. N.
11276
00d8d838
DH
112772001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11278
11279 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11280
ea2c3968 11281 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11282 the macro definition.
11283
11284 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11285 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11286 instead of SCM_INST_TYPE.
11287
11288 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11289 the object is a struct before accessing its struct flags.
11290
11291 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11292
495c67e5
GH
112932001-06-10 Gary Houston <ghouston@arglist.com>
11294
11295 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11296 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11297 work reliably anymore. try it from boot-9.scm instead.
11298
6a9003d3
MV
112992001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11300
11301 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11302 Thanks to Matthias Köppe!
58bee6a8 11303
47bcd646
ML
113042001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11305
a88ff5b6
ML
11306 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11307 space-happy C preprocessors.
11308
47bcd646 11309 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11310 inside cookies. thanks to Matthias Köppe!
47bcd646 11311
bab246f3
DH
113122001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11313
11314 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11315 keywords. Fix gc protection.
11316
11317 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11318 operations in macro calls.
11319
11320 * pairs.c (scm_error_pair_access): Avoid recursion.
11321
11322 Thanks to Matthias Koeppe for reporting the bugs that correspond
11323 to the following set of patches.
11324
11325 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11326 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11327 bitvector base address using SCM_BITVECTOR_BASE.
11328
11329 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11330 unsigned long*.
11331
dcb410ec
DH
113322001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11333
11334 * goops.c (SCM_CLASS_REDEF): Removed.
11335
11336 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11337 SCM_<foo>_H.
11338
11339 Thanks to Matthias Koeppe for reporting the bugs that correspond
11340 to the following set of patches.
11341
11342 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11343 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11344 scm_sys_allocate_instance, clear_method_cache,
11345 scm_sys_invalidate_method_cache_x, scm_make,
11346 create_standard_classes, scm_make_port_classes, scm_make_class,
11347 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11348
11349 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11350
11351 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11352
11353 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11354 UNARY_ELTS_CODE): Remove bogus break statement.
11355
11356 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11357 Don't access bit vectors elements as SCM objects.
11358
11359 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11360 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11361 Don't assign to an unpacked value.
11362
e81d98ec
DH
113632001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11364
11365 * __scm.h (SCM_NORETURN): Moved here from error.h.
11366
11367 (SCM_UNUSED): New macro.
11368
11369 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11370
11371 * backtrace.c (display_error_handler), continuations.c
11372 (continuation_print), debug.c (debugobj_print), dynwind.c
11373 (guards_print), environments.c (observer_print,
11374 core_environments_finalize, leaf_environment_cell,
11375 leaf_environment_print, eval_environment_print,
11376 eval_environment_observer, import_environment_define,
11377 import_environment_undefine, import_environment_print,
11378 import_environment_observer, export_environment_define,
11379 export_environment_undefine, export_environment_print,
11380 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11381 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11382 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11383 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11384 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11385 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11386 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11387 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11388 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11389 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11390 set_slot_value, test_slot_existence, scm_change_object_class,
11391 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11392 default_setter), guardians.c (guardian_print, guardian_gc_init,
11393 guardian_zombify, whine_about_self_centered_zombies), guile.c
11394 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11395 mallocs.c (malloc_print), numbers.c (scm_print_real,
11396 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11397 end_input_default, scm_port_print, fill_input_void_port,
11398 write_void_port), root.c (root_print), smob.c (scm_mark0,
11399 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11400 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11401 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11402 (scm_struct_free_0, scm_struct_free_standard,
11403 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11404 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11405 scm_handle_by_throw, scm_ithrow), weaks.c
11406 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11407 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11408 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11409
11410 * error.h (SCM_NORETURN): Moved to __scm.h.
11411
11412 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11413 Renamed <foo>H to SCM_<foo>_H.
11414
11415 * gc.c (debug_cells_gc_interval): New static variable.
11416
11417 (scm_assert_cell_valid): If selected by the user, perform
11418 additional garbage collections.
11419
11420 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11421 if additional garbage collections are desired.
11422
11423 (mark_gc_async): If additional garbage collections are selected
11424 by the user, don't call the after-gc-hook. Instead require the
11425 user to run the hook manually.
11426
11427 * pairs.c (scm_error_pair_access): New function. Only compiled
11428 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11429
11430 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11431
11432 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11433 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11434 is a real pair object. (Glocs are also accepted, but that may
11435 change.) If not, abort with an error message.
11436
17fa3fcf
DH
114372001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11438
11439 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11440
11441 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11442 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11443
feeedafb
MV
114442001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11445
11446 * extensions.c (scm_c_register_extension): Allow NULL as library
11447 name.
11448 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11449
feeedafb
MV
11450 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11451 non-pointers are being compared. Thanks to Alexander Klimov!
11452
4bcdfe46
GH
114532001-06-04 Gary Houston <ghouston@arglist.com>
11454
11455 * rw.c (scm_write_string_partial): new procedure implementing
11456 write-string/partial in (ice-9 rw).
11457 * rw.h: declare scm_write_string_partial.
58bee6a8 11458
f480396b
MV
114592001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11460
feeedafb
MV
11461 * keywords.c (keyword_print): Substract 1 from length of symbol
11462 name, accounting for the silly dash.
11463
11464 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11465 Do not emit deprecation warning.
11466
f480396b
MV
11467 Added exception notice to all files.
11468
11469 * dynl.c: Include "deprecation.h".
11470
c794483c
MV
114712001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11472
11473 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11474 scm_clear_registered_modules): Deprecated.
11475
9454d8d5
RB
114762001-06-02 Rob Browning <rlb@cs.utexas.edu>
11477
11478 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11479 guile-snarf-docs-texi.
11480
11481 * fports.c: HAVE_ST_BLKSIZE changed to
11482 HAVE_STRUCT_STAT_ST_BLKSIZE.
11483 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11484 HAVE_STRUCT_STAT_ST_BLKSIZE.
11485
11486 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11487 HAVE_STRUCT_STAT_ST_RDEV.
11488 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11489 HAVE_STRUCT_STAT_ST_BLKSIZE.
11490 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11491 HAVE_STRUCT_STAT_ST_BLOCKS.
11492
114f9bab
MV
114932001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11494
b0c16cd9
MV
11495 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11496 of scm_eval_x to allow module changes between the forms in the
11497 string. Set/restore module using scm_c_call_with_current_module.
11498
114f9bab
MV
11499 * mkstemp.c: New file, slightly modified from libiberties
11500 mkstemps.c.
11501
c99f9605
ML
115022001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11503
11504 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11505 filter-doc-snarfage.c: new files.
11506
11507 * Makefile.am: add stuff to [build,] use and distribute
11508 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11509
11510 * guile-snarf.in: grok the new snarf output.
11511
11512 * snarf.h: make the output both texttools- and `read'-friendly.
11513
47bcd646
ML
11514 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11515 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11516
7eb5d7b2
MV
115172001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11518
11519 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11520 error for unsupported format controls and for superflous
ec2667f0 11521 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11522
11523 * print.h, print.c (scm_print_symbol_name): Factored out of
11524 scm_iprin1.
11525 (scm_iprin1): Call it.
58bee6a8 11526
7eb5d7b2
MV
11527 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11528 weird names are printed correctly.
11529
11530 * print.c (scm_print_symbol_name): Symbols whose name starts with
11531 `#' or `:' or ends with `:' are considered weird.
11532
609c3d30
MG
115332001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11534
11535 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11536 and /.
11537
115382001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11539
11540 * debug.h: Removed prototype for scm_eval_string.
11541
8d09eb04
MG
115422001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11543
11544 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11545 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11546
11547 Change strncpy to memcpy to allow embedded NUL characters in
11548 symbol prefix.
11549
dd85ce47
ML
115502001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11551
fde50407
ML
11552 * hooks.c (scm_create_hook): deprecated.
11553 (make_hook): deleted.
11554 (scm_make_hook): all the hook creation code is now here.
11555
11556 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11557 a hook, make it permanent, and do a `scm_c_define' on it.
11558
dd85ce47
ML
11559 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11560
11561 * socket.c (s_scm_inet_pton): fix docstring quoting.
11562 (s_scm_inet_ntop): ditto.
11563
11564 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11565
11566 * hashtab.c (scm_internal_hash_fold): fix argument position in
11567 SCM_ASSERT.
11568
11569 * environments.c (s_scm_import_environment_set_imports_x): fix
11570 argument position in SCM_ASSERT.
11571
11572 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11573 (s_scm_make_iloc): ditto.
11574
729dbac3
DH
115752001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11576
11577 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11578
11579 * eval.c (promise_print): Read the promise's value as an object.
11580
11581 (SCM_CEVAL): Don't perform side-effecting operations in macro
11582 parameters.
11583
11584 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11585 conditional expression.
11586
11587 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11588 initializer.
11589
11590 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11591 text, removed redundant computation of effective_length and fixed
11592 the overflow check.
11593
11594 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11595 values.
11596
11597 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11598
11599 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11600
11601 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11602 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11603
11604 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11605
11606 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11607 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11608 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11609 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11610
11611 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11612
11613 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11614
ea2c3968 11615 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11616
11617 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11618 problem.
11619
11620 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11621 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11622 Read SCM objects rather than scm_bits_t values.
11623
11624 * tags.h (SCM_VOIDP_TEST): Removed.
11625
11626 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11627 value of 2 now corresponds to the former 1, the current 1
11628 corresponds to the former situation that SCM_VOIDP_TEST was
11629 defined.
11630
58bee6a8
TTN
11631 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11632 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11633 typedef struct scm_unused_struct { } * SCM;
11634 Thanks to Han-Wen Nienhuys for the suggestion.
11635
11636 * unif.c (scm_array_set_x): Fix typing problem, and use
11637 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11638 dealing with uniform vectors.
11639
6b1b030e
ML
116402001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11641
11642 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11643 (scm_igc): mark from them, too (precisely, not conservatively!).
11644
11645 * root.h (scm_gc_registered_roots): new object in
11646 scm_sys_protects.
11647
11648 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11649 `scm_protect_object'. shouldn't call it at all, though, it seems.
11650
11651 * gc.c (scm_[un]protect_object): deprecated.
11652 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11653 (scm_gc_[un]register_root[s]): new.
11654
11655 * gc.h: add prototypes for scm_gc_[un]protect_object,
11656 scm_gc_[un]register_root[s].
11657
c014a02e
ML
116582001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11659
11660 revert the controversial part of the 2001-05-24 changes.
11661
0120801d
MV
116622001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11663
f4e0611e
MV
11664 * modules.c (scm_env_module): Exported to Scheme.
11665
0120801d 11666 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11667
0120801d 11668 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11669
0120801d
MV
11670 * backtrace.c: Include "libguile/filesys.h".
11671 (sym_base, display_backtrace_get_file_line,
11672 display_backtrace_file, display_backtrace_file_and_line): New.
11673 (display_frame): Call display_backtrace_file_and_line if that is
11674 requested.
11675 (display_backtrace_body): Call scm_display_backtrace_file if
11676 requested.
11677
11678 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11679 Prototypes removed since there's no definition for these
11680 functions.
11681
880a7d13
MG
116822001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11683
11684 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11685 Changed use of scm_array->scm_array_t and
11686 scm_array_dim->scm_array_dim_t to enable build with
11687 --disable-deprecated.
11688
1be6b49c
ML
116892001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11690
11691 The purpose of this set of changes is to regularize Guile's usage
11692 of ANSI C integral types, with the following ideas in mind:
11693
d69c867a
ML
11694 - SCM does not nesessarily have to be long.
11695 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11696 - long is not nesessarily the same size as int.
11697
11698 The changes are incomplete and possibly buggy. Please test on
11699 something exotic.
11700
11701 * validate.h
11702 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11703 new macros.
11704
11705 * unif.h: type renaming:
11706 scm_array -> scm_array_t
11707 scm_array_dim -> scm_array_dim_t
11708 the old names are deprecated, all in-Guile uses changed.
11709
11710 * tags.h (scm_ubits_t): new typedef, representing unsigned
11711 scm_bits_t.
11712
11713 * stacks.h: type renaming:
11714 scm_info_frame -> scm_info_frame_t
11715 scm_stack -> scm_stack_t
11716 the old names are deprecated, all in-Guile uses changed.
11717
11718 * srcprop.h: type renaming:
11719 scm_srcprops -> scm_srcprops_t
11720 scm_srcprops_chunk -> scm_srcprops_chunk_t
11721 the old names are deprecated, all in-Guile uses changed.
11722
11723 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11724 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11725 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11726 vectors.c, vports.c, weaks.c:
11727 various int/size_t -> size_t/scm_bits_t changes.
11728
11729 * random.h: type renaming:
11730 scm_rstate -> scm_rstate_t
11731 scm_rng -> scm_rng_t
11732 scm_i_rstate -> scm_i_rstate_t
11733 the old names are deprecated, all in-Guile uses changed.
11734
11735 * procs.h: type renaming:
11736 scm_subr_entry -> scm_subr_entry_t
11737 the old name is deprecated, all in-Guile uses changed.
11738
11739 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11740 type renaming:
11741 scm_option -> scm_option_t
11742 the old name is deprecated, all in-Guile uses changed.
11743
11744 * objects.c: various long -> scm_bits_t changes.
11745 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11746
11747 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11748 SCM_I_FIXNUM_BIT.
11749
11750 * num2integral.i.c: new file, multiply included by numbers.c, used
11751 to "templatize" the various integral <-> num conversion routines.
11752
11753 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11754 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11755 deprecated.
11756 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11757 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11758 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11759 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11760 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11761 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11762 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11763 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11764 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11765 scm_num2size): new functions.
11766
d69c867a 11767 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
11768
11769 * load.c: change int -> size_t in various places (where the
11770 variable is used to store a string length).
11771 (search-path): call scm_done_free, not scm_done_malloc.
11772
11773 * list.c (scm_ilength): return a scm_bits_t, not long.
11774 some other {int,long} -> scm_bits_t changes.
11775
11776 * hashtab.c: various [u]int -> scm_bits_t changes.
11777 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11778 (scm_ihashx): n: uint -> scm_bits_t
11779 use scm_bits2num instead of scm_ulong2num.
11780
11781 * gsubr.c: various int -> scm_bits_t changes.
11782
11783 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11784
d69c867a 11785 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
11786
11787 * gh.h (gh_str2scm): len: int -> size_t
11788 (gh_{get,set}_substr): start: int -> scm_bits_t,
11789 len: int -> size_t
11790 (gh_<num>2scm): n: int -> scm_bits_t
11791 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11792 (gh_length): return scm_bits_t, not unsigned long.
11793
11794 * gc.[hc]: various small changes relating to many things stopping
11795 being long and starting being scm_[u]bits_t instead.
11796 scm_mallocated should no longer wrap around.
11797
11798 * fports.h: type renaming:
11799 scm_fport -> scm_fport_t
11800 the old name is deprecated, all in-Guile uses changed.
11801
11802 * fports.c (fport_fill_input): count: int -> scm_bits_t
11803 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11804
11805 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11806 those prototypes, as the functions they prototype don't exist.
11807
11808 * fports.c (default_buffer_size): int -> size_t
11809 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11810 default_size: int -> size_t
11811 (scm_setvbuf): csize: int -> scm_bits_t
11812
11813 * fluids.c (n_fluids): int -> scm_bits_t
11814 (grow_fluids): old_length, i: int -> scm_bits_t
11815 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11816 scm_bits_t
11817 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11818
11819 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11820 the new and shiny SCM_NUM2INT.
11821
11822 * extensions.c: extension -> extension_t (and made a typedef).
11823
11824 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11825 there are no nasty surprises if/when the various deeply magic tag
11826 bits move somewhere else.
11827
11828 * eval.c: changed the locals used to store results of SCM_IFRAME,
11829 scm_ilength and such to be of type scm_bits_t (and not int/long).
11830 (iqq): depth, edepth: int -> scm_bits_t
11831 (scm_eval_stack): int -> scm_bits_t
11832 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11833 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11834 i: int -> scm_bits_t
11835
11836 * environments.c: changed the many calls to scm_ulong2num to
11837 scm_ubits2num.
11838 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11839
11840 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11841
11842 * debug.h: type renaming:
11843 scm_debug_info -> scm_debug_info_t
11844 scm_debug_frame -> scm_debug_frame_t
11845 the old names are deprecated, all in-Guile uses changed.
11846 (scm_debug_eframe_size): int -> scm_bits_t
11847
11848 * debug.c (scm_init_debug): use scm_c_define instead of the
11849 deprecated scm_define.
11850
11851 * continuations.h: type renaming:
11852 scm_contregs -> scm_contregs_t
11853 the old name is deprecated, all in-Guile uses changed.
11854 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11855 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11856
11857 * continuations.c (scm_make_continuation): change the type of
d69c867a 11858 stack_size from long to scm_bits_t.
1be6b49c
ML
11859
11860 * ports.h: type renaming:
11861 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11862 scm_port -> scm_port_t
11863 scm_ptob_descriptor -> scm_ptob_descriptor_t
11864 the old names are deprecated, all in-Guile uses changed.
11865 (scm_port_t.entry): int -> scm_bits_t.
11866 (scm_port_t.line_number): int -> long.
11867 (scm_port_t.putback_buf_size): int -> size_t.
11868
11869 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 11870 global namespace and have little value beside that).
1be6b49c
ML
11871 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11872 SCM handle).
11873 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 11874 exist (for size_t & ptrdiff_t).
1be6b49c
ML
11875 (scm_sizet): deprecated.
11876
11877 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11878
a6219f22
MV
118792001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11880
11881 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11882 SCM_VARIABLE_INIT since that it what it used to be.
11883
11884 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 11885 ANSIsh. Thanks to Matthias Köppe!
a6219f22 11886
311b6a3c
MV
118872001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11888
9dfc4faa
MV
11889 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11890 needed for weak-key hashtables.
11891
11892 * procs.c (scm_make_subr_with_generic): Add missing last argument
11893 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11894
11895 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11896 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
11897
11898 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11899
2fc933fe
MV
119002001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11901
57ae112d
MV
11902 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11903 `duplicate_string'. Do not use an indirect cell, store symbol
11904 directly in collision list of hash table.
11905 (duplicate_string): Removed.
58bee6a8 11906
57ae112d
MV
11907 * init.c (scm_init_guile_1): Call scm_init_extensions.
11908
11909 * Makefile.am: Add "extensions.c" and related files in all the
11910 right places.
11911
11912 * extensions.h, extension.c: New files.
11913
11914 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11915
2fc933fe
MV
11916 * modules.h (scm_system_module_env_p): Move out of deprecated
11917 section.
11918
11919 * rw.h (scm_init_rw): Added prototype.
11920
11921 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11922 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11923 New functions. They replace scm_make_gsubr and
11924 scm_make_gsubr_with_generic. The `make' variants only create the
11925 gsubr object, while the `define' variants also put it into the
11926 current module. Changed all callers.
11927 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11928
11929 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11930 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11931 functions. They replace scm_make_subr, scm_make_subr_opt and
11932 scm_make_subr_with_generic. The `make' variants only create the
11933 subr object, while the `define' variants also put it into the
11934 current module. Changed all callers.
11935 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11936 Deprecated.
11937
11938 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11939 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11940 the comments above.
58bee6a8 11941
18928596
NJ
119422001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11943
11944 * throw.c (scm_lazy_catch): Slight docstring clarification.
11945
21a13beb
MV
119462001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
11947
e2b6ddc6
MV
11948 * throw.c: Lazy-catch handlers are no longer allowed to return.
11949 Fixed comments throughout.
11950 (scm_ithrow): Signal an error when a lazy-catch handler returns.
11951 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
11952 recognized as such.
11953
21a13beb
MV
11954 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
11955 refered to s_scm_minor_version previously.
11956
11957 * modules.h, modules.c: Moved around a lot of code so that
11958 deprecated features appear at the bottom.
11959 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
11960 module_prefix, make_modules_in_var, beautify_user_module_x_var,
11961 scm_the_root_module, scm_make_module, scm_ensure_user_module,
11962 scm_load_scheme_module): Deprecated.
11963 (scm_system_module_env_p): Return SCM_BOOL_T directly for
11964 environments corresponding to the root module.
11965 (convert_module_name, scm_c_resolve_module,
11966 scm_c_call_with_current_module, scm_c_define_module,
11967 scm_c_use_module, scm_c_export): New.
11968 (the_root_module): New static variant of scm_the_root_module. Use
11969 it everywhere instead of scm_the_root_module.
58bee6a8 11970
21a13beb
MV
11971 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
11972 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
11973 (scm_c_with_fluid): New.
11974 (scm_with_fluids): Use scm_c_with_fluids instead of
11975 scm_internal_with_fluids.
58bee6a8 11976
21a13beb
MV
11977 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
11978 `scm_init_goops'. Do not explicitly create/switch modules.
11979 Return SCM_UNSPECIFIED.
11980 (scm_init_goops): Only register `%init-goops-builtins' procedure.
11981 (scm_load_goops): Use scm_c_resolve_module instead of
11982 scm_resolve_module.
58bee6a8 11983
21a13beb
MV
11984 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
11985 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
11986 `scm_init_rw' prior to loading the startup files.
11987
11988 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
11989 scm_init_rdelim. Do not explicitly create/switch modules.
11990 Return SCM_UNSPECIFIED.
11991 (scm_init_rdelim): Only register `%init-rdelim-builtins'
11992 procedure.
58bee6a8 11993
21a13beb
MV
11994 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
11995 explicitly create/switch modules. Return SCM_UNSPECIFIED.
11996 (scm_init_rw): Only register `%init-rw-builtins' procedure.
11997
11998 * script.c (scm_shell): Evaluate the compiled switches in the
11999 current module, not in the root module.
12000
120012001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12002
12003 * fluids.c (scm_c_with_fluids): Rename from
12004 scm_internal_with_fluids.
12005 (scm_internal_with_fluids): Deprecated.
12006 (scm_c_with_fluid): New.
12007
09cb9e73
DH
120082001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12009
12010 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12011
12012 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12013 accessed with SCM_C[AD]R.
12014
12015 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12016
c81ea65d
RB
120172001-05-16 Rob Browning <rlb@cs.utexas.edu>
12018
12019 * version.c (s_scm_major_version): doc fixes.
12020 (s_scm_minor_version): doc fixes.
12021 (s_scm_minor_version): new function.
12022
12023 * version.h (scm_init_version): new function.
12024
12025 * versiondat.h.in: add GUILE_MICRO_VERSION.
12026
887dfa7d
DH
120272001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12028
12029 * deprecation.c (scm_init_deprecation): Renamed
12030 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12031
78930a69
MV
120322001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12033
12034 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12035 dependent on cpp_cnvt.awk
12036
39cde5c5
MG
120372001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12038
12039 * script.c (scm_compile_shell_switches): New command line option
12040 `--use-srfi' for loading a list of SRFIs on startup.
12041 (scm_shell_usage): Added `--use-srfi' to help message.
12042
f3f9dcbc
MV
120432001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12044
78930a69 12045 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12046
f3f9dcbc
MV
12047 The concept of vcells has been removed from Guile. With it,
12048 explicit obarrays and associated operations are gone. Use
12049 hashtables instead of obarrays.
887dfa7d 12050
f3f9dcbc
MV
12051 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12052 result as variable instead of vcell. Glocs no longer point to a
12053 vcell but to a variable. Use scm_c_define instead of
12054 scm_sysintern and treat the result as a variable (which it is),
12055 not a vcell.
887dfa7d 12056
f3f9dcbc
MV
12057 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12058 SCM_DEFVARIABLEP): Deprecated.
12059 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12060 (variable_print): Do not print name of variable.
12061 (variable_equalp): Compare values, not vcells.
12062 (anonymous_variable_sym): Removed.
12063 (make_vcell_variable): Removed.
12064 (make_variable): New, as replacement.
12065 (scm_make_variable, scm_make_undefined_variable): Do not take name
12066 hint parameter.
12067 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12068 error in that case.
12069 (scm_builtin_variable): Deprecated.
12070
12071 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12072 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12073 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12074 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12075 scm_string_to_obarray_symbol, scm_intern_symbol,
12076 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12077 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12078 Deprecated and moved to "symbols-deprecated.c".
12079 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12080 (scm_init_symbols): Call scm_init_symbols_deprecated.
12081 * symbols-deprecated.c: New file.
12082 * Makefile.am: Added symbols-deprecated.c and related files in all
12083 the right places.
887dfa7d 12084
f3f9dcbc
MV
12085 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12086 SCM_GLOBAL_VCELL_INIT): Deprecated.
12087 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12088 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12089
f3f9dcbc
MV
12090 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12091 SCM_GLOC_SYM.
12092
12093 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12094 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12095 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12096 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12097 Changed according to the `throughout' comments.
12098
12099 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12100 to `int'.
12101 (scm_module_type): Removed.
12102 (the_root_module): Renamed to the_root_module_var. Now points to
12103 a variable instead of a vcell. Updated all uses.
12104 (scm_the_root_module): Return SCM_BOOL_F when module systems
12105 hasn't been booted yet.
12106 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12107 (scm_post_boot_init_modules): Made static.
12108 (scm_set_current_module): Call scm_post_boot_init_modules on first
12109 call.
12110 (make_modules_in, beautify_user_module_x, resolve_module,
12111 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12112 suffix. Now point to variables instead of vcells. Updated all
12113 uses.
12114 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12115 and return SCM_BOOL_F in that case.
12116 (scm_module_transformer): Likewise.
12117 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12118 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12119 (scm_eval_closure_lookup): Do not allow new definitions when
12120 `interface' flag is set.
12121 (scm_standard_interface_eval_closure): New.
12122 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12123 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12124 scm_c_lookup, scm_c_module_define, scm_c_define,
12125 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12126 scm_modules_prehistory): New.
12127 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12128 instead of scm_intern0.
887dfa7d 12129
f3f9dcbc
MV
12130 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12131 symbol.
12132
12133 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12134 hashtable operations to maintain the keywords, not obarray ones.
12135
12136 * init.c (scm_load_startup_files): Do not call
12137 scm_post_boot_init_modules. This is done by
12138 scm_set_current_module now.
12139 (scm_init_guile_1): Call scm_modules_prehistory. Call
12140 scm_init_variable early on.
12141
12142 * goops.c (s_scm_sys_goops_loaded): Get
12143 var_compute_applicable_methods from scm_sym2var, not from a direct
12144 invocation of scm_goops_lookup_closure.
12145
12146 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12147
12148 * gc.c: Added simple debugging hack to mark phase of GC: When
12149 activated, do not tail-call scm_gc_mark. This gives nice
12150 backtraces.
12151 (scm_unhash_name): Removed.
12152
12153 * feature.c (features): Renamed to features_var. Now points to a
12154 variable instead of a vcell. Updated all uses.
12155
12156 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12157 `scm_current_module_lookup_closure' which will do the right thing
12158 when the module system hasn't been booted yet.
12159 (SCM_GLOC_SYM): Removed.
12160 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12161 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12162
f3f9dcbc
MV
12163 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12164 instead of with vcells. Do not overwrite `var' with the result of
12165 the lookup, use the new `real_var' instead. Remove `var2' in
12166 exchange (which was only used with threads).
12167 (sym_three_question_marks): New.
12168 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12169 `SCM_GLOC_SYM'.
12170 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12171 (scm_m_atfop): Expect the function definition to be a variable
12172 instead of a vcell.
12173 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12174 symbol instead.
12175 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12176 (scm_eval_args): Use more explicit code in the gloc branch of the
12177 atrocious struct ambiguity test. The optimizer will sort this
12178 out.
12179 (scm_deval_args): Likewise.
12180 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12181 remember the symbol instead. Added some comments where
12182 scm_tc3_cons_gloc really exclusively refers to structs.
12183 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12184 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12185 of scm_sysintern in general.
12186
12187 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12188 explicit magic.
12189
12190 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12191 pairs. Put the variable directly in the gloc.
12192 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12193 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12194
12195 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12196
12197 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12198 scm_the_last_stack_fluid_var. It now points to a variable instead
12199 of a vcell. Updated all uses.
12200 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12201 instead of a vcell. Updated all uses.
12202
12203 * _scm.h: Include "variables.h" and "modules.h" since almost
12204 everybody needs them now.
12205
12206 * root.h (scm_symhash, scm_symhash_vars): Removed.
12207 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12208
7c33806a
DH
122092001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12210
12211 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12212 scm_listofnull.
7c33806a
DH
12213
12214 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12215 like the SCM_NEWCELL macro counterparts.
12216
12217 (scm_init_storage, scm_init_gc): Moved initialization of
12218 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12219
12220 (scm_init_storage): Moved initialization of scm_undefineds and
12221 scm_listofnull to eval.c, initializion of scm_nullstr to
12222 strings.c, initializion of scm_nullvect to vectors.c.
12223
12224 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12225 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12226
12227 * init.c (scm_init_guile_1): Reordered some initializations and
12228 added dependcy information comments.
12229
12230 * load.c (scm_init_load): Use scm_nullstr.
12231
12232 * strings.c (scm_init_strings): Initialize scm_nullstr.
12233
12234 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12235
11bbab47
MV
122362001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12237
12238 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12239 multiple lines. Thanks to Matthias Köppe!
11bbab47 12240
5cd06d5e
DH
122412001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12242
12243 * deprecation.c: Fixed copyright date.
12244
12245 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12246 DEPRECATION_H to SCM_DEPRECATION_H.
12247
32bac999
TTN
122482001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12249
12250 * guile-doc-snarf.in: Update copyright.
12251 Fix relative path bug. Thanks to Sergey Poznyakoff.
12252
c9dcc5ae
MV
122532001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12254
12255 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12256 accept open ports. Thanks to Quetzalcoatl Bradley!
12257
7c582ec9
MG
122582001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12259
12260 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12261 has 779 primitives on startup.
12262
284ab601
MV
122632001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12264
12265 * eval.c (scm_i_eval): Copy expression before passing it to
12266 SCM_XEVAL. The copy operation was removed unintendedly during my
12267 change on 2001-03-25.
12268
910d1e40
ML
122692001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12270
9a5fa6e9 12271 from Matthias Köppe (thanks!):
910d1e40
ML
12272
12273 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12274 portable.
12275
12276 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12277 docstring.
12278
56e55ac7
DH
122792001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12280
12281 * gc.c (scm_init_gc): Added FIXME comment.
12282
12283 * hooks.c: Since hooks don't have a name any more, it is not
12284 necessary to include objprop.h.
12285
12286 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12287
12288 (symbol_name, scm_make_hook_with_name): Removed.
12289
12290 (scm_create_hook): Don't set the hook's name property.
12291
12292 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12293
12294 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12295
12296 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12297
12298 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12299 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12300 FLOBUFLEN and define it unconditionally.
12301
d204b24c
MV
123022001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12303
438201b4
MV
12304 * gh_data.c (gh_lookup): Call gh_module_lookup with
12305 `scm_current_module ()', not `#f'.
12306 (gh_module_lookup): Expect a module instead of an obarray as first
12307 argument and do lookup in that module.
56e55ac7 12308
d204b24c
MV
12309 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12310 arrays. The length of array is already determined differently and
12311 scm_uniform_vector_length does not work on arrays.
12312
26c1d549
MV
123132001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12314
fe7c2f88
MV
12315 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12316 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12317
26c1d549
MV
12318 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12319 they are not used. Changed `wrong type' error into `wrong num
12320 args' error. Changed all callers.
56e55ac7 12321
26c1d549
MV
12322 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12323 arguments are supplied.
12324
1c938eb8
TTN
123252001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12326
12327 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12328 describe `regexp/notbol' and `regexp/noteol' execution flags.
12329
3a6379f7
TTN
12330 * strop.c (scm_substring_move_x): Doc fix; nfc.
12331
c10ecc4c
MV
123322001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12333
12334 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12335 (scm_set_object_procedure_x): Use it to check argument. Fix
12336 docstring.
12337
12338 * evalext.c (scm_definedp): Fix docstring.
12339
a57a0b1e
GH
123402001-05-05 Gary Houston <ghouston@arglist.com>
12341
12342 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12343 support.
12344
7a095584
NJ
123452001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12346
12347 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12348 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12349 Change R4RS references to R5RS.
12350
12351 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12352 docstring source are correctly reproduced in the output (ii)
12353 we don't anymore get occasional trailing quotes. Also reorganized
12354 and commented the code a little.
12355
12356 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12357 fixes.
12358
dd2a6f3a
MG
123592001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12360
12361 * strop.c (scm_string_split): New procedure.
12362
12363 * strop.h (scm_string_split): Added prototype.
12364
00120130
GH
123652001-05-04 Gary Houston <ghouston@arglist.com>
12366
12367 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12368 Dale P. Smith.
12369
b65e6bfe
MV
123702001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12371
12372 * rw.c: Include "modules.h" and "strports.h".
12373
12374 * net_db.h (scm_gethost): Added prototype.
12375
12376 * deprecation.h, deprecation.c: New.
12377 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12378 (DOT_X_FILES): Added "deprecation.x".
12379 (modinclude_HEADERS): Added "deprecation.h".
12380
12381 * init.c: Include "deprecation.h".
12382 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12383
b65e6bfe
MV
123842001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12385
12386 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12387 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12388 New.
12389
b0e5fd8c
GH
123902001-04-29 Gary Houston <ghouston@arglist.com>
12391
12392 * rw.c: new file, implementing C part of module (ice-9 rw).
12393 (scm_read_string_x_partial): moved from ioext.c
12394 (scm_init_rw): new proc.
12395 * rw.h: new file.
12396 init.c: include rw.h and call scm_init_rw.
12397 Makefile.am: include rw.c and rw.h.
12398
0b2da99c
RB
123992001-04-28 Rob Browning <rlb@cs.utexas.edu>
12400
12401 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12402 know what's supposed to happen to it.
12403
12404 * list.h (scm_list_star): deprecation expired - removed.
12405
12406 * numbers.h (scm_dblproc): deprecation expired - removed.
12407 (SCM_UNEGFIXABLE): deprecation expired - removed.
12408 (SCM_FLOBUFLEN): deprecation expired - removed.
12409 (SCM_INEXP): deprecation expired - removed.
12410 (SCM_CPLXP): deprecation expired - removed.
12411 (SCM_REAL): deprecation expired - removed.
12412 (SCM_IMAG): deprecation expired - removed.
12413 (SCM_REALPART): deprecation expired - removed.
12414 (scm_makdbl): deprecation expired - removed.
12415 (SCM_SINGP): deprecation expired - removed.
12416 (SCM_NUM2DBL): deprecation expired - removed.
12417 (SCM_NO_BIGDIG): deprecation expired - removed.
12418
12419 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12420 (scm_tc_dblr): deprecation expired - removed.
12421 (scm_tc_dblc): deprecation expired - removed.
12422 (scm_tc16_flo): deprecation expired - removed.
12423 (scm_tc_flo): deprecation expired - removed.
12424
12425 * tag.h (scm_tag): deprecation expired - removed.
12426
12427 * tag.c: (scm_tag): deprecation expired - removed.
12428
12429 * ioext.c: (scm_fseek): deprecation expired - removed.
12430
12431 * ioext.h (scm_fseek): deprecation expired - removed.
12432
12433 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12434
12435 * gh.h (gh_int2scmb): deprecation expired - removed.
12436
e3334972
NJ
124372001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12438
12439 * stacks.c (scm_make_stack): Fix typo in docstring.
12440
a0f979ac
RB
124412001-04-27 Rob Browning <rlb@cs.utexas.edu>
12442
12443 * error.c (scm_sysmissing): deprecation expired - removed.
12444
12445 * error.h (scm_sysmissing): deprecation expired - removed.
12446
12447 * gc.c
12448 (scm_init_gc): gc-thunk deprecation expired - removed.
12449 (scm_gc_vcell): deprecation expired - removed.
12450 (gc_async_thunk): scm_gc_vcell related code removed.
12451
12452 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12453
12454 * strings.h
12455 (SCM_NSTRINGP): deprecation expired - removed.
12456 (SCM_NRWSTRINGP): deprecation expired - removed.
12457
12458 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12459
12460 * chars.h
12461 (SCM_ICHRP): deprecation expired - removed.
12462 (SCM_ICHR): deprecation expired - removed.
12463 (SCM_MAKICHR): deprecation expired - removed.
12464
12465 * ports.h
12466 (SCM_INPORTP): deprecation expired - removed.
12467 (SCM_OUTPORTP): deprecation expired - removed.
12468
253081cf
MV
124692001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12470
12471 * modules.c (scm_module_type): New.
12472 (scm_post_boot_init_modules): Initialize from Scheme value.
12473 (the_module, scm_current_module, scm_init_modules): the_module is
12474 now a C only fluid.
12475 (scm_current_module): Export to Scheme.
12476 (scm_set_current_module): Do not call out to Scheme, do all the
12477 work in C. Export procedure to Scheme. Only accept modules, `#f'
12478 is no longer valid as the current module. Only set
12479 scm_top_level_lookup_closure_var and scm_system_transformer when
12480 they are not deprecated.
12481 (scm_module_transformer, scm_current_module_transformer): New.
12482
12483 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12484 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12485
253081cf
MV
12486 * gh_data.c: Removed FIXME comment about gh_lookup returning
12487 SCM_UNDEFINED. That's the right thing to do.
12488
12489 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12490 into the conditionally compiled sections.
12491 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12492 scm_current_module_transformer instead of scm_system_transformer.
12493 * init.c (start_stack): Move initialization of
12494 scm_system_transformer to the deprecated section.
1c938eb8 12495
1f7f9ed4
NJ
124962001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12497
12498 * throw.c (scm_throw): Correct docstring.
12499
66c73b76
GH
125002001-04-22 Gary Houston <ghouston@arglist.com>
12501
eefae538
GH
12502 * socket.c: attempted to improve the docstrings slightly.
12503
66c73b76
GH
12504 * net_db.c: remove bogus "close" declaration.
12505 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12506 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12507 moved to socket.c.
12508 * net_db.h: declarations moved too.
12509
12510 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12511 long.
12512 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12513 (VALIDATE_INET6): new macro.
12514 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12515 inet-pton and inet-ntop.
12516 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12517 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12518
7a7f7c53
DH
125192001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12520
12521 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12522 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12523
12524 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12525 when compiled in debug mode.
12526
12527 (scm_gc_sweep): Only call smob's free function if it is defined.
12528
12529 * print.c (scm_iprin1): No need to check for validity of smob
12530 type or existence of print function.
12531
12532 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12533 Resizing will not work well with preemptive threading.
12534
12535 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12536
12537 (scm_make_smob_type): Extracted initialization of smob
12538 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12539 of the critical section.
12540
12541 (scm_smob_prehistory): Initialize all smob descriptors. By
12542 default, don't assign a smob free function: Most smob types don't
12543 need one.
12544
12545 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12546
e1368a8d
GH
125472001-04-21 Gary Houston <ghouston@arglist.com>
12548
12549 * socket.c (FLIP_NET_HOST_128): new macro.
12550 (scm_fill_sockaddr): use new macro.
12551 (scm_addr_vector): completed IPv6 address support. added const
12552 to the address parameter.
12553
5a525b84
GH
125542001-04-20 Gary Houston <ghouston@arglist.com>
12555
12556 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12557 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12558 is defined.
12559 (scm_addr_vector): use a switch instead of multiple if statements.
12560 Add support for IPv6 (incomplete) .
e1368a8d 12561 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12562
1a551638
DH
125632001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12564
12565 * struct.c (scm_free_structs): Only pairs may be accessed with
12566 SCM_C[AD]R.
12567
c07b3fef
MD
125682001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12569
a9d861e3
MD
12570 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12571
c07b3fef
MD
12572 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12573 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12574 parentheses in order to get the correct associativity.
12575
af7546eb
DH
125762001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12577
12578 * unif.c (scm_array_to_list): Added missing handling of arrays of
12579 bytes. Thanks to Masao Uebayashi for the bug report.
12580
4daecfee
DH
125812001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12582
12583 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12584 consistently.
12585
726d810a
DH
125862001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12587
12588 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12589
12590 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12591 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12592 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12593 SCM_CLOSURE_FORMALS.
12594
12595 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12596 (scm_i_procedure_arity): Prefer stronger predicates like
12597 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12598
12599 * macros.c (macro_print): Extracted macro printing code from
12600 print.c and simplified it.
12601
12602 (scm_macro_type): Use SCM_MACRO_TYPE;
12603
12604 (scm_init_macros): Use macro_print for printing macros.
12605
12606 * print.c (scm_print_opts): Improved option documentation.
12607
12608 (scm_iprin1): Extracted printing of macros to macros.c.
12609 Simplified printing of ordinary closures.
12610
12611 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12612 Martin Grabmueller for the bug report.
12613
e038c042
DH
126142001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12615
12616 This patch eliminates some further applications of SCM_C[AD]R to
12617 non pair cells.
12618
12619 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12620 never been applied to real pairs.
12621
12622 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12623
12624 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12625
12626 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12627 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12628 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12629
12630 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12631 Added.
12632
12633 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12634 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12635
12636 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12637 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12638 SCM_SET{AND,OR}_CAR.
12639
3453619b
GH
126402001-04-17 Gary Houston <ghouston@arglist.com>
12641
12642 * some initial support for IPv6:
1c938eb8 12643
3453619b
GH
12644 * socket.c (scm_fill_sockaddr): improve the argument validation.
12645 don't allocate memory until all args are checked. instead of
12646 unconditional memset of soka, try setting sin_len to 0 if
12647 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12648 (scm_socket, scm_connect): extend docstrings for IPv6.
12649 (scm_init_socket): intern AF_INET6 and PF_INET6.
12650
216eedfc
DH
126512001-04-17 Niibe Yutaka <gniibe@m17n.org>
12652
12653 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12654 matches SCM_DEFER_INTS at the beginning of the function.
12655
12656 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12657
12658 * gc.c (scm_igc): Unconditionally call
12659 SCM_CRITICAL_SECTION_START/END.
12660
12661 * fluids.c (next_fluid_num): Unconditionally call
12662 SCM_CRITICAL_SECTION_START/END.
12663 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12664
12665 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12666 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12667 Removed.
12668
12669 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12670 Defined as nothing for the case of !defined(USE_THREADS).
12671 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12672 Removed.
12673 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12674 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12675 LINE.
12676 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12677 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12678 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12679 SCM_CRITICAL_SECTION_START/END.
12680 (SCM_REALLOW_INTS: Bug fix. Don't call
12681 SCM_THREAD_SWITCHING_CODE.
12682 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12683 SCM_THREAD_SWITCHING_CODE directly.
12684 (SCM_ENTER_A_SECTION): Unconditionally use
12685 SCM_CRITICAL_SECTION_START/END. (was:
12686 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12687
126882001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12689
12690 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12691 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12692 allowed to explicitly set this macro via the CFLAGS variable
12693 during make.
12694
12695 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12696 (SCM_THREAD_CRITICAL_SECTION_START,
12697 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12698 SCM_THREAD_CRITICAL_SECTION_START/END to
12699 SCM_CRITICAL_SECTION_START/END.
12700
f22ed5a0
KN
127012001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12702
12703 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12704 instead of bzero.
1c938eb8 12705
f22ed5a0 12706 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12707 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12708
12709 Thanks to NIIBE Yutaka.
12710
508ded1c
MD
127112001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12712
a087ba81
MD
12713 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12714 goops module should be registered in order to work for an
12715 application which uses libguile statically linked.)
508ded1c 12716
e4b265d8
DH
127172001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12718
12719 * numbers.[ch] (scm_num2long, scm_num2long_long,
12720 scm_num2ulong_long, scm_num2ulong): Argument position is an
12721 unsigned integer.
12722
12723 * environments.c (eval_environment_folder,
12724 import_environment_folder), gh_data.c (gh_scm2longs,
12725 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12726 for integers and pointers, respectively.
12727
12728 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12729 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12730 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12731 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12732
12733 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12734 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12735 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12736 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12737 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12738 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12739
89d04205
NJ
127402001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12741
12742 * strings.c (scm_read_only_string_p): Update docstring to reflect
12743 current (non-)usage of "read only" strings.
40f83c3e
NJ
12744 (scm_make_shared_substring): Clarify docstring by changing
12745 "semantics" to "arguments".
89d04205 12746
4d66be54
MG
127472001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12748
12749 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12750 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12751 improvements.
12752
1e6808ea
MG
127532001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12754
12755 The following changes make the documentation more consistent.
1c938eb8 12756
1e6808ea
MG
12757 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12758 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12759 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12760 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12761 ... @end lisp.
12762
12763 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12764 (scm_array_dimensions, scm_make_shared_array),
12765 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12766 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12767 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12768 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12769 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12770 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12771 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12772 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12773 @example ... @end example to @lisp ... @end lisp.
12774
12775 * weaks.c (scm_weak_vector): Corrected docstring.
12776
12777 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12778 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12779 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12780 (scm_hashx_set_x, scm_hashx_get_handle),
12781 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12782 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12783 vectors.c (scm_vector_fill_x), strings.c
12784 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12785 objprop.c (scm_set_object_properties_x):
12786 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12787 strports.c (scm_call_with_input_string), ports.c
12788 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12789 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12790 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12791 (scm_make_weak_vector,scm_weak_vector_p),
12792 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12793 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12794 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12795 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12796 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12797 Made parameter names match documentation by renaming parameters
12798 and/or fixing docstrings.
1c938eb8 12799
1e6808ea
MG
12800 * numbers.c (scm_ash): Corrected Texinfo markup.
12801
12802 * strop.c (scm_string_index, scm_string_rindex),
12803 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12804
12805 * vports.c (scm_make_soft_port), unif.c
12806 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12807 (scm_dimensions_to_uniform_array, scm_transpose_array),
12808 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12809 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12810 (scm_array_to_list, scm_list_to_uniform_array),
12811 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12812 (scm_open_input_string, scm_open_output_string),
12813 (scm_get_output_string), strop.c (scm_string_copy),
12814 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12815 (scm_get_internal_real_time, scm_times),
12816 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12817 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12818 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12819 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12820 simpos.c (scm_system), random.c (scm_random_uniform),
12821 (scm_random_normal, scm_random_exp), ramap.c
12822 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12823 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12824 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12825 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12826 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12827 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12828 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12829 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12830 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12831 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12832 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12833 (scm_integer_expt, scm_bit_extract, scm_logcount),
12834 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12835 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12836 (scm_interaction_environment), macros.c (scm_makacro),
12837 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12838 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12839 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12840 (scm_fluid_ref), filesys.c (scm_open_fdes),
12841 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12842 Docstring correction: `Returns' -> `Return'
12843
1c938eb8
TTN
12844 * gc.c (scm_set_debug_cell_accesses_x):
12845 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
12846 * fluids.c (scm_fluid_p): Added texinfo markup.
12847
12848 * error.c (scm_strerror): Made docstring more precise.
12849
12850 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12851 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12852 (scm_symbol_p, scm_symbol_to_string), strorder.c
12853 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12854 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12855 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12856 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12857 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12858
9a6976cd
DH
128592001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12860
12861 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12862 mode, as suggested by Michael Livshin.
12863
463b2219
ML
128642001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12865
12866 * backtrace.c (display_backtrace_body): since the `print_state'
12867 variable is not used (instead its data field is used directly as
12868 `pstate'), protect it from the hungry compiler optimizations.
12869 thanks to Bill Schottstaedt for the report.
12870
61045190
DH
128712001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12872
12873 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12874 It is only defined and used if guile is compiled with
12875 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12876 let cells with a free_cell type tag be visible outside of the
12877 garbage collector when in debug mode.
12878
12879 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12880
12881 (scm_assert_cell_valid): Use a local static variable to avoid
12882 recursion.
12883
12884 (MARK): Only check for rogue cell pointers in debug mode. Use
12885 scm_cellp for this purpose and place all checks for rogue pointers
12886 into that function. Further, since due to conservative scanning
12887 we may encounter free cells during marking, don't use the standard
12888 cell type accessor macro to determine the cell type.
12889
12890 (scm_cellp): Check if the cell pointer actually points into a
12891 card header.
12892
12893 (scm_init_gc): Initalize scm_tc16_allocated.
12894
12895 * gc.h (GCH): Renamed to SCM_GC_H.
12896
12897 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12898 might be unnecessary, but I feel better this way :-)
12899
12900 (SCM_GC_CELL_TYPE): New macro.
12901
12902 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12903 in guile, and it is unlikely that they will be applied to real
12904 pairs anyway.
12905
12906 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12907
12908 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12909 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12910
12911 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12912 make sure that in debug mode no free cell will ever be visible
12913 outside of the garbage collector.
12914
85d6df6a
DH
129152001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12916
12917 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12918 values.
12919
12920 * async.c (scm_system_async), variable.c (scm_make_variable,
12921 scm_make_undefined_variable): Use scm_cons to create a pair.
12922
12923 * debug.c (scm_reverse_lookup): Perform proper type checking.
12924 Remove suspicious use of SCM_SLOPPY_CONSP.
12925
12926 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12927 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12928 the corresponding optimization.
12929
12930 * eval.c (iqq): Use proper type check.
12931
12932 (scm_m_expand_body): Remove redundant type checks.
12933
12934 (promise_print): Don't access promise cells as pairs.
12935
12936 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12937 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12938 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12939 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12940 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12941
12942 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12943 (scm_iprin1): Use new macro predicate and accessors.
12944
12945 * eval.h (scm_tc16_macro): Removed declaration. It is declared
12946 in macros.h.
12947
12948 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
12949 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
12950 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
12951 SCM_VARIABLE_H. Even the macros that are used to inhibit
12952 including a header file twice should be in the SCM_ namespace.
12953
12954 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
12955 properties.c (scm_primitive_property_ref,
12956 scm_primitive_property_del_x): Prefer stronger predicates like
12957 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12958
12959 * gc.c (MARK): Use proper macros to access procedure-with-setter
12960 cell elements and closure cell elements.
12961
12962 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
12963 access free cells as pairs.
12964
12965 (scm_unprotect_object): scm_hashq_get_handle returns #f if
12966 no hashtab entry is found.
12967
12968 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
12969 SCM_CLR_PORT_OPEN_FLAG.
12970
12971 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
12972 use SCM_SET_C[AD]R for uninitialized cells.
12973
12974 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
12975 If the hashtable has no slots, return #f instead of '(). This
12976 unifies the return value with most assoc-functions.
12977
12978 (scm_hash_fn_ref): Use proper type check.
12979
12980 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
12981 Removed references to non-existing functions from documentation.
12982
12983 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
12984 access keyword cell elements.
12985
12986 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
12987 macros.
12988
12989 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
12990
12991 * print.c (scm_iprlist): Added comment. Improved loop
12992 conditions.
12993
12994 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
12995 pairs.
12996
12997 * smob.c (scm_markcdr): Don't access smob cells as pairs.
12998
12999 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13000
13001 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13002 cells as pairs.
13003
13004 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13005 scm_variable_set_x): Use proper macros to access variable cell
13006 elements.
13007
13008 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13009
13010 * variable.h (SCM_VARVCELL): Don't access variable cells as
13011 pairs.
13012
13013 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13014 added FIXME comment, removed register specifier.
13015
1b27e91a
KN
130162001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13017
13018 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13019 * init.c (scm_init_guile_1): Don't init goopscore module.
13020
16c634ec
MV
130212001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13022
13023 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13024
91344ceb
MG
130252001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13026
13027 * strop.c (scm_string_to_list): Fixed docstring markup.
13028 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13029 (scm_string_downcase, scm_string_capitalize_x),
13030 (scm_string_capitalize): Rewrote and corrected docstrings.
13031 (scm_string_ci_to_symbol): Made docstring more explicit.
13032
07576812
MV
130332001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13034
13035 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13036 eval.c can use it.
13037 (scm_call_with_values): Removed.
13038 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13039 so that it can be exported.
13040 (scm_call_with_values): Removed.
1c938eb8 13041
07576812
MV
13042 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13043 * eval.c: Include "libguile/values.h"
13044 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13045 New.
13046 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13047 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13048 New delcarations to support above change.
13049
13050 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13051 errors with last change.
1c938eb8 13052
07576812
MV
130532001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13054
13055 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13056 scm_i_eval): Moved the application of the system transformer from
13057 scm_i_eval to scm_primitive_eval.
13058
a17bb5fd
NJ
130592001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13060
a6be01a4
NJ
13061 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13062
a17bb5fd
NJ
13063 * strop.c (scm_string_index): Fix docstring line break
13064 regression.
13065
13066 * list.c (scm_cons_star): Fix docstring typo.
13067
be54b15d
DH
130682001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13069
13070 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13071 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13072 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13073 scm_make_string, scm_string_append), strports.c (st_resize_port,
13074 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13075 scm_makstr with calls to scm_allocate_string.
13076
13077 * strings.[ch] (scm_allocate_string): New function.
13078
13079 * strings.[ch] (scm_makstr): Deprecated.
13080
789ecc05
GH
130812001-03-18 Gary Houston <ghouston@arglist.com>
13082
6d163216
GH
13083 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13084 NULL. rewrote the docstring.
13085 (scm_mkstemp): new procedure implementing "mkstemp!".
13086 * posix.h: declare scm_mkstemp.
13087
789ecc05
GH
13088 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13089 normally it would be found in netdb.h.
13090
c6c79933
GH
130912001-03-17 Gary Houston <ghouston@arglist.com>
13092
e9e225e5
GH
13093 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13094 warning when HAVE_ARRAYS is not defined. move len too.
13095
13096 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13097 (EXTRA_DOT_X_FILES): let configure set the value.
13098 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13099
c6c79933
GH
13100 * gc.c (scm_must_malloc): changed the comment explaining when
13101 scm_must variants of malloc/free etc., should be used, based on
13102 explanation from Dirk Herrmann.
13103 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13104 string with procedure name. use scm_must_malloc instead of malloc.
13105 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13106 of malloc/free.
13107 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13108 scm_ungetc): use scm_must variants of malloc/realloc/free.
13109 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13110
b3fcac34
DH
131112001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13112
13113 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13114 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13115 scm_wrong_type_arg instead.
13116
13117 (SCM_WNA): Deprecated.
13118
13119 * error.[ch] (scm_wta): Deprecated.
13120
13121 * numbers.c (s_i_log): Minor comment fix.
13122
13123 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13124 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13125 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13126 wrong-num-args or misc errors.
13127
13128 * unif.c (scm_make_shared_array, scm_transpose_array,
13129 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13130 Validate the rest argument (note: this is only done when guile is
13131 built with SCM_DEBUG_REST_ARGUMENT=1)
13132
13133 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13134 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13135
13136 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13137 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13138
68baa7e7
DH
131392001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13140
13141 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13142 instead of scm_wrong_num_args.
13143
13144 * coop-threads.c: Don't include libguile/strings.h. (Was only
13145 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13146
13147 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13148 wrong-num-args errors.
13149
9f40cd87
DH
131502001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13151
13152 * error.[ch] (scm_error_num_args_subr): New function.
13153
5352393c
MG
131542001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13155
13156 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13157 (scm_length, scm_append, scm_reverse, scm_list_ref),
13158 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13159 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13160 (scm_delete1_x), gc.c (scm_map_free_list),
13161 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13162 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13163 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13164 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13165 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13166 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13167 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13168
13169 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13170 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13171 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13172 symbols.c (scm_symbol_interned_p), numbers.c
13173 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13174 markup.
13175
a9205f07
KN
131762001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13177
13178 * snarf.h (SCM_CONST_LONG): Deprecated.
13179 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13180
6d583887
MV
131812001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13182
13183 * numbers.c (scm_num2ulong): Check that a bignum is positive
13184 before looking at the magnitude. Correctly check for overflow
13185 during conversion.
13186 (scm_num2long_long): Likewise.
13187 (scm_num2ulong_long): New.
13188 (ULONG_LONG_MAX): Define if not already defined.
13189 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13190
e87a03fc
MG
131912001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13192
13193 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13194
13195 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13196 (SCM_OPOUTSTRPORTP): New predicate macros.
13197 (scm_open_input_string, scm_open_output_string),
13198 (scm_get_output_string): New prototypes.
1c938eb8 13199
e87a03fc
MG
13200 * strports.c (scm_open_input_string, scm_open_output_string),
13201 (scm_get_output_string): New procedures (SRFI-6 compliant).
13202 Made scm_tc16_strport non-static.
13203
160bb34a
DH
132042001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13205
13206 * macros.h (SCM_ASSYNT): Removed unused object argument from
13207 signature.
13208
13209 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13210 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13211 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13212 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13213 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13214 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13215 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13216 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13217 scm_m_atdispatch): Removed unused object argument from call to
13218 SCM_ASSYNT.
13219
80dee77b
DH
132202001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13221
13222 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13223 const int* to reflect that the input array of integers remains
13224 unchanged. Thanks to Brett Viren for the hint.
13225
d3dd80ab
MG
132262001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13227
13228 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13229 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13230 in various places.
13231 (gh_scm2newstr, gh_symbol2newstr): Change call to
13232 scm_must_malloc() to malloc(), because user-free()able memory is
13233 allocated.
13234
13235 * gc.c: Added declaration of `scm_debug_check_freelist'.
13236
26a3038d
MG
132372001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13238
13239 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13240
1f3908c4
KN
132412001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13242
13243 * strports.c (scm_object_to_string): New procedure.
13244 (scm_strprint_obj): Deprecated.
13245 * strports.h: Reflect the changes.
13246
e11208ca
DH
132472001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13248
13249 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13250
13251 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13252 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13253 SCM_ASSYNT to check for correct argument types. Either use some
13254 SCM_VALIDATE_* macro or an explicit test.
13255
13256 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13257 misc-errors.
13258
13259 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13260 instead of calling scm_wta.
13261
67e8151b
MG
132622001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13263
13264 * load.c (scm_primitive_load, scm_primitive_load_path),
13265 (scm_sys_search_load_path): Corrected docstrings (file ->
13266 filename).
13267
13268 * eval.c (scm_force): Added texinfo markup to docstring.
13269 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13270
13271 * debug-malloc.c: Reinserted #include <stdio.h>.
13272
e0c08f17
KN
132732001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13274
e39c3de4
KN
13275 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13276
e0c08f17
KN
13277 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13278 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13279 Use SCM_LISTn instead of scm_listify.
13280
e6e2e95a
MD
132812001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13282
13283 * _scm.h: Removed #include <errno.h>.
13284
13285 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13286 errno variable (can be a macro on some systems, for example when
13287 using linux libc with threads).
13288
13289 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13290 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13291 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13292 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13293
97d0e20b
GH
132942001-03-10 Gary Houston <ghouston@arglist.com>
13295
13296 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13297 not already defined.
13298
e75341b3
MD
132992001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13300
13301 * coop.c: Inserted #include <stdio.h>.
13302
13303 * iselect.c: Reinserted #include <stdio.h>.
13304
74355186
MV
133052001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13306
13307 * posix.c: Replaced `#define' of __USE_XOPEN right before
13308 including unistd.h with a define of _GNU_SOURCE at the very top of
13309 the file.
13310
783e7774
KN
133112001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13312
13313 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13314 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13315 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13316 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13317 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13318 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13319 print.c, procprop.c, procs.c, properties.c, ramap.c,
13320 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13321 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13322 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13323 Remove #include <stdio.h>
783e7774
KN
13324 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13325
13326 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13327
9a677c37
MG
133282001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13329
13330 * posix.c (scm_gethostname): Set initial name length to 256 for
13331 Solaris.
13332
94e6d793
MG
133332001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13334
13335 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13336 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13337 (scm_sethostname, scm_gethostname): New prototypes.
13338
13339 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13340 <sys/file.h>, if present.
13341 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13342 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13343 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13344 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13345 (scm_sethostname, scm_gethostname): New procedures.
13346
650a1cf9
NJ
133472001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13348
13349 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13350 not optional (ii) "recommend" spelling correction.
13351
9636b49c
MD
133522001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13353
5e4a4d09
MD
13354 * ramap.c (racp): Removed optimization which caused array copying
13355 to fail if the two arrays shared storage. Re-inserted the IVDEP
13356 macros removed in the change of 2000-03-09. (Don't really have a
13357 complete grasp of what they are for, but they seem to be necessary
13358 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13359
9636b49c
MD
13360 * hash.c (scm_string_hash): Don't downcase characters.
13361
04a4d666
MD
133622001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13363
9636b49c 13364 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13365 size from 277 --> 1009.
13366
13367 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13368 function.
13369
13370 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13371
04a4d666
MD
13372 * validate.h: Code formatting.
13373
66418d34
KN
133742001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13375
13376 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13377 (*.doc): Add dependency on guile-snarf.awk.in.
13378
13379 * guile-snarf.awk.in: Neglect spaces at the end of
13380 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13381 middle of docstrings. (To avoid the problem with gcc-2.96.)
13382
2ade72d7
DH
133832001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13384
13385 * coop-threads.c (scm_call_with_new_thread), load.c
13386 (scm_primitive_load, scm_sys_search_load_path), random.c
13387 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13388 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13389 (potentially) issue a scm-misc-error or wrong-num-args error
13390 message.
13391
13392 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13393 about the expected type with the wrong-type-arg error message.
13394
13395 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13396 a C level bug that can't be fixed from scheme anyway.
13397
586d7da2
MD
133982001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13399
13400 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13401 Duplicate bindings are OK in a let* since a let* is semantically
13402 equivalent to a nested set of let:s.
13403
1dd05fd8
MG
134042001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13405
13406 * print.c (scm_print_options): Fixed texinfo in docstring.
13407
13408 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13409 the underlying functions getservent, getprotoent or getnetent
13410 return NULL instead of signalling an error.
13411
439006bf
GH
134122001-03-04 Gary Houston <ghouston@arglist.com>
13413
13414 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13415 taking an unexpectedly large filename for an AF_UNIX socket from
13416 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13417
439006bf
GH
13418 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13419 former and adjusted the latter.
13420 (scm_socket, scm_socketpair): cosmetic changes.
13421 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13422 size_t as socklen_t substitute. don't restrict args/return values
13423 to INUM: allow full range of int or size_t.
13424 (scm_fill_sockaddr): check arguments before allocating memory, to
13425 avoid leakage. use malloc, not scm_must_malloc.
13426 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13427 substitute. free the sockaddr structure before throwing an error.
13428 (scm_init_add_buffer): procedure removed, together with its static
13429 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13430 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13431 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13432 scm_sendto): use a local buffer instead of scm_addr_buffer.
13433 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13434 not size_t.
13435 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13436 call to detect whether recvfrom could be bothered to set the address.
13437 (scm_init_socket): don't call scm_init_addr_buffer.
13438
276dd677
DH
134392001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13440
13441 * debug.c (scm_procedure_source, scm_procedure_environment),
13442 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13443 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13444 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13445 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13446 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13447 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13448 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13449 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13450 scm_array_to_list, scm_array_prototype), validate.h
13451 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13452 scm_misc_error or scm_wrong_type_arg instead.
13453
13454 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13455
5e03762c
MD
134562001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13457
13458 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13459 (scm_sys_tag_body): Added.
13460
db4b4ca6
DH
134612001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13462
13463 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13464 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13465 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13466 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13467 options.c (scm_options), ports.c (scm_remove_from_port_table),
13468 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13469 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13470 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13471 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13472 instead.
13473
87e7741d
MD
134742001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13475
13476 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13477
d19b0aac
MV
134782001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13479
13480 * eval.c (scm_s_duplicate_bindings): New error message.
13481 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13482
2fd945df
MV
134832001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13484
13485 * eval.h (SCM_EVALIM2): New macro. Use it when a
13486 immediate, literal constant should be evaluated.
13487 * eval.c (scm_s_duplicate_formals): New error message string.
13488 (scm_c_improper_memq): New function.
13489 (scm_m_lambda): Check for duplicate arguments.
13490 (scm_ceval, scm_deval): When executing a body: only cons a new
13491 toplevel environment frame when it is different from the
13492 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13493 check for empty combinations; use SCM_EVALIM2 for the same reason
13494 in the non-toplevel loop.
13495 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13496 New labels with the meaning of their non-"nontoplevel" partners,
13497 but they are used when it is known that the body is not evaluated at
13498 top-level.
13499 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13500 reporting for empty combinations.
13501
9e6fc585
KN
135022001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13503
13504 * Remove dump facilities.
13505 * dump.c, dump.h: Removed.
13506 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13507 * init.c: Remove #include "libguile/dump.h".
13508 (scm_init_guile_1): Remove scm_init_dump.
13509 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13510 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13511 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13512 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13513
13514 * keywords.c: Remove #include "libguile/dump.h".
13515 (keyword_dump, keyword_undump): Removed.
13516 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13517
eae54bf0
MG
135182001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13519
13520 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13521 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13522 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13523 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13524 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13525 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13526 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13527 to @code{} as the texinfo manual recommends, converted the
13528 examples to use a @lisp{}-environment.
13529
13530 * strports.c (scm_eval_string): Cleaned up the docstring.
13531
13532 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13533 markup.
13534
13535 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13536 (scm_number_to_string, scm_string_to_number, scm_number_p)
13537 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13538 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13539 (scm_ash): Added texinfo markup and removed obsolete @refill.
13540 (scm_gr_p): Corrected comment.
13541 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13542 docstring) comments.
13543 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13544 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13545 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13546 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13547 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13548 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13549 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13550 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13551
23deee81
DH
135522001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13553
13554 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13555 (Obviously nobody compiles with SCM_RECKLESS defined...)
13556
13557 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13558
6fe692e9
MD
135592001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13560
13561 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13562
13563 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13564
27c37006
NJ
135652001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13566
13567 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13568 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13569 since use of `z' suggests that the arguments may be complex.
13570
13571 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13572 typos.
13573
2069af38
NJ
135742001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13575
13576 * dump.c (scm_binary_write, scm_binary_read), eval.c
13577 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13578 scm_guardian_greedy_p, scm_make_guardian), fports.c
13579 (scm_file_port_p): Minor docstring fixes.
13580
b42ff180
MV
135812001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13582
2069af38 13583 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13584
13585 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13586 scm_i_eval.
13587 (make_class_from_template): Do not bother to set the current
13588 module around the call to DEFVAR, scm_eval takes care of that.
13589 (scm_init_goops): Make scm_module_goops and
13590 scm_goops_lookup_closure permanent objects.
1c938eb8 13591
97ea55f8
MV
13592 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13593 top level, create a fresh top-level environment for each
13594 expression instead of mutating the exisint frame. This is
13595 important when that frame is closed over.
13596
b42ff180
MV
13597 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13598 SCM_DIGSPERLONG instead of DIGSPERLONG.
13599
09f2ab1e
MV
136002001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13601
13602 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13603 before applying arrow procedure in `cond' and before applying
13604 receiver procedure in call-with-current-continuation.
13605 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13606 macro. The argument is expanded more than one time.
13607
13608 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13609 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13610
136112001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13612
13613 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13614 notice and license.
13615
7090240c
MG
136162001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13617
13618 * variable.c (scm_make_variable, scm_make_undefined_variable)
13619 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13620 (scm_variable_bound_p), values.c (scm_values)
13621 (scm_call_with_values), unif.c (scm_bit_count)
13622 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13623 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13624 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13625 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13626 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13627 (scm_copy_random_state, scm_random), print.c (scm_newline)
13628 (scm_write_char, scm_simple_format), debug-malloc.c
13629 (scm_malloc_stats), environments.c (scm_environment_p)
13630 (scm_environment_bound_p, scm_environment_ref)
13631 (scm_environment_fold, scm_environment_define)
13632 (scm_environment_undefine, scm_environment_set_x)
13633 (scm_environment_cell, scm_environment_observe)
13634 (scm_environment_observe_weak, scm_environment_unobserve)
13635 (scm_make_eval_environment, scm_eval_environment_p)
13636 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13637 (scm_eval_environment_imported)
13638 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13639 (scm_import_environment_p, scm_import_environment_imports)
13640 (scm_import_environment_set_imports_x, scm_make_export_environment)
13641 (scm_export_environment_p, scm_export_environment_private)
13642 (scm_export_environment_set_private_x)
13643 (scm_export_environment_signature)
13644 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13645 Added texinfo markup.
13646
13647 * ports.c (scm_drain_input): Lowercased argument to @var.
13648 (scm_current_input_port, scm_current_output_port): Filled in
13649 missing explanation.
13650 (scm_current_load_port, scm_set_current_output_port)
13651 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13652 Added texinfo markup.
13653
13654 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13655 (scm_release_arbiter): Added texinfo markup to docstrings.
13656 Changed `Returns' to `Return'.
13657 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13658
25703850
NJ
136592001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13660
13661 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13662 by doubling them to `@@'.
13663
73c0fdce
MG
136642001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13665
13666 * numbers.c (scm_lognot), random.c (scm_random,
13667 scm_random_normal, scm_random_solid_sphere_x,
13668 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13669 scm_random_exp), dynwind.c
13670 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13671
73c0fdce
MG
13672 * goops.c (scm_sys_initialize_object, scm_instance_p,
13673 scm_class_name, scm_class_precedence_list, scm_class_slots,
13674 scm_class_environment, scm_generic_function_name,
13675 scm_generic_function_methods, scm_method_generic_function,
13676 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13677 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13678 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13679 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13680 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13681 scm_class_direct_supers, scm_class_direct_slots,
13682 scm_class_direct_subclasses, scm_class_direct_methods,
13683 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13684 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13685 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13686 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13687 scm_memoized_environment, scm_procedure_name,
13688 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13689 objects.c
13690 (scm_class_of, scm_entity_p, scm_operator_p,
13691 scm_set_object_procedure_x, scm_object_procedure,
13692 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13693 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13694 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13695 scm_hook_to_list), lang.c
13696 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13697 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13698 (scm_print_options, scm_port_with_print_state,
13699 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13700 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13701 scm_make_procedure_with_setter, scm_procedure), throw.c
13702 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13703 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13704 scm_stack_ref, scm_stack_length, scm_frame_p,
13705 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13706 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13707 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13708 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13709 (scm_dirname, scm_basename), dynwind.c
13710 (scm_wind_chain), read.c (scm_read_options, scm_read,
13711 scm_read_hash_extend), gc.c
13712 (scm_unhash_name), eval.c (scm_eval_options_interface,
13713 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13714 (scm_display_error, scm_set_print_params_x,
13715 scm_display_application, scm_display_backtrace, scm_backtrace),
13716 async.c (scm_async, scm_system_async, scm_async_mark,
13717 scm_system_async_mark, scm_run_asyncs, scm_noop,
13718 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13719 scm_mask_signals): Added docstrings.
13720
e228a203
KN
137212001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13722
13723 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13724 address of car/cdr. (Thanks to Dirk Herrmann)
13725 Use scm_sizet to obtain the length of strings.
13726 (Thanks to Matthias Koeppe)
13727
1552a59d
MV
137282001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13729
13730 * symbols.c (scm_mem2symbol): Put a empty statement after the
13731 next_symbol label. This is mandated by ANSI, appearantly.
13732
3178f751
MV
137332001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13734
13735 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13736 sense to compile for a specific kernel version. Do not include
13737 <asm/signal.h> while defining __KERNEL__. This hack should no
13738 longer be needed and caused problems.
13739
7af4defe
MV
137402001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13741
13742 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13743 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13744 can not deal with immediates.
13745
5d6bb349
KN
137462001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13747
13748 * list.c (scm_list_copy): Validate the first argument.
13749
ec9709f0
MV
137502001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13751
13752 Fix evaluator so that top-level expressions are correctly
13753 evaluated with respect to the module system.
1c938eb8 13754
ec9709f0
MV
13755 * modules.h. modules.c (scm_current_module_lookup_closure): New
13756 function.
13757
13758 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13759 prototypes.
13760 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13761 names to better reflect their meaning.
13762
13763 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13764 evaluated at top-level and synronize lookup closure before
13765 executing every subform.
13766 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13767 (scm_eval_x, scm_eval): Reimplement in terms of
13768 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 13769
ec9709f0
MV
137702001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13771
13772 * macros.c (scm_macro_name, scm_macro_transformer): Use
13773 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13774 Thanks!
13775
42417394
KN
137762001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13777
13778 * dump.c (scm_store_bytes): Store data size before data.
13779 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13780 * dump.h (scm_restore_bytes): Updated.
13781
bf942687
KN
137822001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13783
13784 * dump.c: Use double cells for update schedule.
13785
1be4270a
KN
137862001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13787
13788 * ports.c (scm_unread_char): Take an optional argument.
13789
548728ea
MV
137902001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13791
13792 * modules.h (scm_selected_module, scm_current_module): Renamed
13793 scm_selected_module to scm_current_module to synchronize Scheme
13794 and C names.
13795 (scm_select_module, scm_set_current_module): Likewise. Changed
13796 all uses.
1c938eb8 13797
548728ea
MV
13798 * ports.c (scm_port_for_each): Make a snapshot of the port table
13799 before iterating over it. The table might change while the user
13800 code is running. With the snapshot, the user can depend on the
c5408bc3 13801 fact that each port that existed at the start of the iteration is
548728ea
MV
13802 encountered exactly once. (ice-9 popen) depends on this.
13803
cb0d8be2
DH
138042001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13805
13806 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13807
13808 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13809 range checking for the size parameter. Thanks to Martin
13810 Grabmueller for the hint.
13811
13812 (scm_makstr): Reordered string initialization to make interrupt
13813 deferring unnecessary.
13814
13815 * vectors.c (scm_make_vector): Fixed range checking.
13816
e382fdbe
DH
138172001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13818
13819 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13820
13821 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13822 checking of the size parameter for type correctness and valid
13823 range. Thanks to Rob Browning for reporting the problem. Instead
13824 of deferring interrupts, scm_remember_upto_here_1 is used.
13825
bf8f0922
KN
138262001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13827
13828 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13829 (scm_dump_cell_update): Removed.
13830 (scm_dump_update): Renamed from scm_dump_object_update.
13831 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13832 a pointer instead of returning a value.
13833 * keywords.c (keyword_undump): Updated.
13834
914cceec
KN
138352001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13836
13837 * dump.c, dump.h: Modified a lot.
5f17c66f 13838 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
13839 (scm_dump_mark): Removed.
13840 (scm_restore_cell_object, scm_store_cell_object): New functions.
13841
13842 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13843 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13844 New slots: dump, undump.
13845 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13846 Updated.
13847
13848 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13849 (keyword_undump): Renamed from keyword_alloc.
13850 (scm_init_keywords): Set keyword_dump and keyword_undump.
13851
ecf470a2
ML
138522001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13853
13854 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13855 the deprecated SCM_DOUBLE_CELLP.
13856
13857 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13858
03416a99
KN
138592001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13860
13861 * dump.c, dump.h: New files.
13862 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13863 * init.c: #include "libguile/dump.h".
13864 (scm_init_guile_1): Call scm_init_dump.
13865 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13866 dump_dealloc, dump_store, undump_alloc, undump_restore,
13867 undump_init.
13868 * smob.c (scm_make_smob_type): Init the new slots.
13869 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13870 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13871
13872 * keywords.c: #include "libguile/dump.h".
13873 (keyword_dealloc, keyword_alloc): New functions.
13874 (scm_init_keywords): Set smob_dump and smob_undump.
13875
00ffa0e7
KN
138762001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13877
13878 * vectors.c (scm_c_make_vector): New function.
13879 * vectors.h (scm_c_make_vector): Declared.
13880 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13881 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13882 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13883 (scm_make_method_cache, scm_i_vector2list,
13884 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13885 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13886 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13887 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13888 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13889 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13890 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13891 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13892
13893 * hashtab.c (scm_c_make_hash_table): New function.
13894 * hashtab.h (scm_c_make_hash_table): Declared.
13895 * environments.c (scm_make_leaf_environment,
13896 scm_make_eval_environment), gc.c (scm_init_storage),
13897 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13898 Use scm_c_make_hash_table.
13899
b8446ce8
MD
139002001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13901
13902 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13903
e3239868
DH
139042001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13905
13906 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13907 end of docstring.
13908
13909 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13910 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13911 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13912 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13913 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13914 scm_source_property, scm_set_source_property_x), sort.c
13915 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13916 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13917 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13918 docstrings.
13919
41ee56dd
MD
139202001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13921
13922 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13923 really get that arg.
13924
b6311c08
KN
139252001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13926
13927 * goops.c (s_scm_get_keyword): Bug fix.
13928
a49af0c0
DH
139292001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13930
13931 The following patch was sent by Martin Grabmueller. It makes sure
13932 that in case of parameter errors the correct function name is
13933 shown, and that parameter types are only checked once.
13934
13935 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13936 string_capitalize_x): New functions. Each one performs the core
13937 functionality of the corresponding scm_* function.
13938
13939 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13940 scm_string_downcase_x, scm_string_downcase,
13941 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13942 parameter checking wrappers of the above functions.
13943
13070bd3
DH
139442001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13945
13946 * continuations.c, dynl.c, keywords.c, load.c: Include
13947 strings.h. Thanks to Bill Schottstaedt for the bug report.
13948
2f2b390c
DH
139492001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13950
13951 * backtrace.c (display_header): Make sure that line and column
13952 information is shown independent of whether the port the code was
13953 read from had an associated filename. Thanks to Martin
13954 Grabmueller for providing this patch.
13955
efa40607
DH
139562001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13957
13958 * fports.[ch] (scm_file_port_p): New primitive.
13959
a98bddfd
DH
139602001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13961
13962 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
13963 These are now defined in fports.c, strports.c and vports.c.
13964
13965 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
13966 vports.c (scm_tc16_sfport): Made variables (were macros defined in
13967 tags.h).
13968
13969 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
13970 (scm_make_sfptob): Made static. These return a type code now.
13971
13972 fports.c (scm_init_fports), strports.c (scm_init_strports),
13973 vports.c (scm_init_vports): Create the corresponding port types.
13974
13975 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
13976 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
13977
13978 * init.c (scm_init_guile_1): Make sure strports are initialized
13979 before gdbint.
13980
13981 * ports.[ch] (scm_make_port_type): Changed the return type to
13982 scm_bits_t.
13983
13984 * ports.c (scm_ports_prehistory): Don't create any port types
13985 here.
13986
13987 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
13988 against scm_tc16_fport directly.
13989
0419a528
DH
139902001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13991
13992 * srcprop.c (scm_set_source_property_x): Fix to handle
13993 (set-source-property! <obj> 'copy <datum>) correctly.
13994
6d36532c
GH
139952001-01-24 Gary Houston <ghouston@arglist.com>
13996
13997 * filesys.c (scm_link): docstring fix.
13998 * fports.h (scm_setfileno): obsolete declaration removed.
13999 * posix.c: bogus popen declaration removed.
14000
14001 * rdelim.c: new file, split from ioext.c.
14002 * rdelim.h: new file, split from ioext.h
14003 * Makefile.am: add rdelim.c and related files.
14004 * init.c: call scm_init_rdelim. include rdelim.h.
14005
3ba5a6c2
DH
140062001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14007
14008 This patch was sent by Martin Grabmueller and makes sure that
14009 parameter errors are reported correctly by the lexicographic
14010 ordering predicates.
14011
14012 * strorder.c (string_less_p, string_ci_less_p): New functions.
14013
14014 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14015 functionality into string_less_p, string_ci_less_p respectively.
14016 The remaining code is just a wrapper to do the parameter
14017 checking.
14018
14019 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14020 parameters and call string_less_p instead of scm_string_less_p.
14021
14022 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14023 Check the parameters and call string_less_ci_p instead of
14024 scm_string_ci_less_p.
14025
e40a4095
DH
140262001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14027
ed6a2db9
DH
14028 This patch modifies scm_display_error to perform parameter
14029 checking. Thanks to Neil Jerram for the bug report.
14030
e40a4095
DH
14031 * backtrace.[ch] (scm_i_display_error): New function.
14032
14033 * backtrace.c (scm_display_error): Added parameter check and
14034 extracted the core functionality into function
14035 scm_i_display_error.
14036
14037 * throw.c (handler_message): Call scm_i_display_error to display
14038 the error message.
14039
f1e06a96
MD
140402001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14041
14042 * eval.c (SCM_APPLY): Added # args check for application of
14043 procedures with arity 3. (Thanks to Anders Holst.)
14044
30ea841d
DH
140452001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14046
14047 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14048
14049 (SCM_OPDIRP): Deprecated.
14050
14051 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14052 SCM_OPN.
14053
14054 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14055 Instead, give an explicit error message in case the directory is
14056 closed.
14057
14058 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14059 instead of SCM_OPENP and SCM_CLOSEDP.
14060
14061 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14062
312ae976
DH
140632001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14064
14065 * eval.c (inner_eval, scm_eval): Move all real functionality into
14066 inner_eval. Avoid to copy the expression twice by inlining some
14067 code from scm_i_eval.
14068
4567ed78
DH
140692001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14070
14071 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14072 now has to be the last clause, as required by R5RS. Thanks to
14073 Martin Grabmueller for the patch.
14074
10288a09
GH
140752001-01-18 Gary Houston <ghouston@arglist.com>
14076
14077 * ioext.c: further simplify scm_read_string_x_partial by defining
14078 a macro SCM_EBLOCK.
14079
8f379a8f
DH
140802001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14081
14082 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14083
5c75b29f
DH
140842001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14085
14086 * __scm.h: Added comment about architecture and compiler
14087 properties that are required by guile.
14088
14089 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14090 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14091
14092 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14093
14094 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14095
14096 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14097 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14098
ac0c002c
DH
140992001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14100
14101 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14102 to the names in limits.h.
14103
14104 * numbers.c (abs_most_negative_fixnum): Added.
14105
14106 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14107 fixnum-min) special case.
14108
14109 (scm_big_and): Fix for negative first parameter.
14110
14111 (scm_bit_extract): Fix for fixnum paramters.
14112 Thanks to Rob Browning for the bug report.
14113
14114 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14115
debe0dc2
DH
141162001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14117
14118 * symbols.c (scm_symbol_bound_p): Fixed comment.
14119 Thanks to Chris Cramer.
14120
8a39e3fc
DH
141212001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14122
14123 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14124 Thanks to Bill Schottstaedt.
14125
322ec19d
ML
141262001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14127
9a5fa6e9 14128 from Matthias Köppe:
1c938eb8 14129
322ec19d
ML
14130 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14131 casts its result, so doesn't yield an lvalue per ANSI C.
14132
14133 * goops.c (s_scm_sys_set_object_setter_x): use
14134 SCM_SET_ENTITY_SETTER.
14135 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14136
14137 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14138 its result, so doesn't yield an lvalue per ANSI C.
14139 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14140 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14141 SCM_GC_SET_CARD_FLAGS.
14142 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14143
14144 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14145
60d02d09
GH
141462001-01-08 Gary Houston <ghouston@arglist.com>
14147
14148 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14149 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14150 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14151 changes.
14152 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14153 for fdes. if current input port is used, check that it's a file
14154 port.
14155
c2da2648
GH
141562001-01-06 Gary Houston <ghouston@arglist.com>
14157
14158 * ioext.c (scm_read_string_x_partial): new procedure, implements
14159 read-string!/partial.
14160 * ports.c (scm_take_from_input_buffers): new procedure used by
14161 scm_read_string_x_partial.
14162 (scm_drain_input): use scm_take_from_input_buffers.
14163
4651d663
MV
141642001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14165
14166 * validate.h (SCM_VALIDATE_NUMBER): New.
14167
c0a5d888
ML
141682001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14169
14170 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14171 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14172 SET_DESTROYED): new defines/macros.
14173 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14174 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14175 (guardian_print): print more info.
14176 (guardian_apply): check if the guardian is destroyed, and throw an
14177 error if so. take one more optional argument `throw_p'.
14178 (scm_guard): depending on the value of `throw_p', return a boolean
14179 result.
14180 (scm_get_one_zombie): remove redundant property test.
14181 (guardian_t): represent the various (currently 3, I hope nothing
14182 more gets added) boolean fields as bit flags.
14183 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14184 (scm_destroy_guardian_x): new procedure.
14185
14186 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14187 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14188
0c6d2191
GH
141892001-01-01 Gary Houston <ghouston@arglist.com>
14190
14191 * fports.c (fport_write): bugfix: handle short writes for
14192 unbuffered ports too. optimize the buffered case by minimizing
14193 the number of write/flush calls.
14194 (write_all): new helper procedure.
14195
a51fe247 14196The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14197
14198;; Local Variables:
14199;; coding: utf-8
14200;; End: