(scm_gc_unprotect_object): abort if called during GC.
[bpt/guile.git] / libguile / ChangeLog
1 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
2
3 * gc.c (scm_gc_unprotect_object): abort if called during GC.
4
5 2004-09-24 Marius Vollmer <mvo@zagadka.de>
6
7 * Makefile.am (EXTRA_DIST): Added gettext.h.
8
9 * smob.c, smob.h (scm_assert_smob_type): New.
10
11 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS, ):
12 Include GUILE_CFLAGS.
13 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
14 now.
15 (libpath.h): Put GUILE_CFLAGS in the build-info.
16
17 2004-09-23 Marius Vollmer <mvo@zagadka.de>
18
19 * print.h (scm_print_state): Added highlight_objects.
20 * print.c (make_print_state, scm_free_print_state): Initialize it
21 to SCM_EOL.
22 (scm_iprin1): Wrap output in '{...}' when object is contained in
23 highlight_objects.
24
25 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
26 scm_backtrace_with_highlights): New. Set highlight_objects of
27 printstate.
28
29 * error.c (scm_error_scm): Document new meaning of data/rest
30 argument for out-of-range and wrong-type-arg errors.
31 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
32 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
33 exception so that it gets highlighted in the backtrace.
34 Don't talk about "argument" when not giving a position.
35
36 * throw.c (handler_message): The rest argument is the fourth
37 argument, not everything after the third. Call
38 scm_display_backtrace_with_highlights, passing the rest argument
39 when appropriate.
40
41 2004-09-22 Marius Vollmer <mvo@zagadka.de>
42
43 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
44 <bruno@clisp.org>:
45
46 * i18n.c: Handle --disable-nls (thanks Bruno).
47
48 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
49 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
50
51 * i18n.c (scm_i_to_lc_category): New name and export. Support all
52 LC categories.
53
54 * posix.c (s_scm_setlocale): Use it.
55
56 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
57 scm_bind_textdomain_codeset): Make wrappers similar to C function
58 they wrap.
59
60 * i18n.h: New file.
61 * i18n.c: New file.
62 * gettext.h: New file, taken from GNU gettext.
63 * init.c: Include libguile/i18n.h.
64 (scm_init_guile_1): Add call to scm_init_i18n().
65 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
66 (DOT_X_FILES): Add i18n.x.
67 (DOT_DOC_FILES): Add i18n.doc.
68 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
69 (modinclude_HEADERS): Add i18n.h.
70
71 2004-09-22 Marius Vollmer <mvo@zagadka.de>
72
73 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
74
75 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
76 discouraged.h. Replaced all uses with scm_is_pair.
77 (SCM_I_CONSP): New name for SCM_CONSP.
78
79 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
80 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
81 scm_cadr, etc): New.
82 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
83 uses with scm_is_null.
84
85 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
86 instead of explicit code.
87
88 2004-09-22 Marius Vollmer <mvo@zagadka.de>
89
90 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
91 Reworded logic a bit so that #f is returned immediately when s1 is
92 too short to contain s2.
93
94 * regex-posix.c (scm_regexp_exec): Convert string to
95 zero-temrinated locale string before matching against it.
96
97 * strings.h, strings.c (scm_substring_read_only,
98 scm_c_substring_read_only, scm_i_substring_read_only): New.
99 (RO_STRING_TAG, IS_RO_STRING): New.
100 (scm_i_string_writable_chars): Bail on read-only strings.
101
102 * read.c (scm_lreadr): use scm_c_substring_read_only for string
103 literals, thus making them read-only as specified by R5RS.
104
105 2004-09-22 Marius Vollmer <mvo@zagadka.de>
106
107 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
108 by testing for smobs before insisting on equal SCM_CELL_TYPES.
109
110 2004-09-21 Marius Vollmer <mvo@zagadka.de>
111
112 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
113 numbers.c.
114 (scm_to_mpz, scm_from_mpz): New.
115 Thanks to Andreas Vögele!
116
117 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
118 just on a line of its own.
119
120 * srfi-13.c (scm_string_any, scm_string_every,
121 scm_string_tabulate, string_upcase_x, string_down_case_x,
122 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
123 size_t instead of int for indices into strings. Make sure that no
124 over- or underflow occurs. Thanks to Andreas Vögele!
125 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
126 indices, which can also be negative.
127
128 2004-09-20 Marius Vollmer <mvo@zagadka.de>
129
130 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
131
132 * threads.c (scm_threads_mark_stacks): Call
133 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
134 only used once.
135
136 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
137
138 * srfi-13.c (scm_string_contains, s_scm_string_contains_ci):
139 Bugfix: when subtracting unsigned values, make sure that result
140 does not wrap.
141
142 2004-09-09 Kevin Ryde <user42@zip.com.au>
143
144 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
145 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
146 by Andreas Vögele.
147
148 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
149
150 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
151
152 * eq.c (real_eqv): Pretend that all NaNs are equal.
153
154 * numbers.c (scm_integer_expt): Do not accept inexact integers.
155
156 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
157
158 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
159 use size_t for some locals instead of int.
160
161 * read.c (scm_flush_ws): Detect "#!"-style comments here.
162 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
163 (skip_scsh_block_comment): Use scm_input_error instead of
164 scm_misc_error in case of EOF.
165
166 2004-09-07 Kevin Ryde <user42@zip.com.au>
167
168 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
169 Bug report by Bill Schottstaedt.
170
171 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
172 column.
173 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
174
175 * posix.c (scm_access): Update docstring per manual.
176
177 * posix.c (scm_nice): Correction to error detection. Reported by
178 Matthias Koeppe.
179
180 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
181 throw error before unlocking mutex with SCM_ALLOW_INTS.
182
183 2004-09-06 Kevin Ryde <user42@zip.com.au>
184
185 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
186 available. This also gets around CLK_TCK being absent when
187 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
188
189 2004-09-03 Stefan Jahn <stefan@lkcc.org>
190
191 * threads.c (scm_threads_mark_stacks): Fixed local variable
192 definitions.
193
194 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
195 local variable definitions.
196
197 * stime.c (_POSIX_C_SOURCE): Do not define this item on
198 MinGW32 because it conflicts with its pthread headers.
199 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
200 (scm_strftime): Using scm_from_locale_string() instead of
201 scm_makfrom0str().
202
203 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
204 part.
205
206 * numbers.c (scm_init_numbers): Removed check_sanity() call
207 inside GUILE_DEBUG. The function has been removed somewhen...
208
209 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
210 MinGW32 because it conflicts with its pthread headers.
211
212 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
213
214 * strings.c (SCM_STRINGP): Accept all strings.
215 (SCM_STRING_CHARS): Reject shared substrings here.
216
217 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
218 the Copyright years.
219
220 2004-08-27 Kevin Ryde <user42@zip.com.au>
221
222 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
223 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
224 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
225
226 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
227
228 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
229 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
230 scm_i_symbol_is_interned, scm_i_mem2symbol,
231 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
232
233 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
234
235 * srfi-13.c: First cut at thread-safeness and proper use of
236 scm_i_string_chars et al. Copious scm_remember_upto_heres have
237 been inserted. Made sure that no internal string pointer is used
238 across a SCM_TICK or a possible GC.
239
240 * script.c (scm_compile_shell_switches): Use
241 scm_from_locale_string instead of scm_makfrom0str.
242
243 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
244 always been.
245
246 2004-08-25 Marius Vollmer <mvo@zagadka.de>
247
248 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
249 strop.c.
250
251 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
252 * strop.h, strop.c: Removed, they are now empty.
253 * Makefile.am: Updated for new and removed files.
254
255 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
256 to scm_string_to_symbol.
257
258 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
259 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
260 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
261 charset instead of libc functions.
262
263 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
264 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
265 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
266 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
267 instead of explicit code.
268
269 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
270 "srfi-13.h" instead of "strop.h".
271
272 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
273 scm_init_srfi_14. Do not call scm_init_strop.
274
275 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
276
277 * numbers.c (scm_inf_p): Synced docstring back from manual.
278
279 2004-08-22 Marius Vollmer <mvo@zagadka.de>
280
281 * strings.c (get_str_buf_start): New helper function.
282 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
283 scm_i_string_char, scm_i_string_writable_chars): Use it.
284 (scm_i_substring_copy): Make START argument optional for C
285 callers, for upcoming SRFI-13 integration.
286
287 2004-08-21 Marius Vollmer <mvo@zagadka.de>
288
289 From Richard Todd, Thanks!
290
291 * script.c (scm_compile_shell_switches): added '-L' switch to add
292 to the %load-path.
293
294 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
295
296 * eval.c (unmemoize_exprs): When dropping internal body markers
297 from the output during unmemoization, also drop those that are not
298 immediately at the beginning of a body.
299
300 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
301
302 * eval.c (scm_lookupcar1): Report "Variable used before given a
303 value" insetad of an "Unbound" one for variables that are found
304 but still contain SCM_UNDEFINED.
305
306 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
307 expects a null-terminated string in the locale encoding, but
308 scm_i_string_writable_chars doesn't give that. Fixed by letting
309 mkstemp modify a locale version of the tmpl argument and copying
310 the result back into tmpl.
311
312 * strop.c (scm_substring_move_x): Store into str2, not str1.
313
314 2004-08-20 Kevin Ryde <user42@zip.com.au>
315
316 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
317 to modify the input string.
318
319 2004-08-19 Marius Vollmer <mvo@zagadka.de>
320
321 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
322 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
323 scm_c_symbol_length.
324
325 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
326
327 New string implementation, with copy-on-write strings and
328 mutation-sharing substrings, and a new internal string API.
329 Symbols can now share memory with strings.
330
331 * tags.h (scm_tc7_stringbuf): New tag.
332
333 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
334 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
335 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
336 uses.
337 (scm_i_make_string, scm_c_make_string): New, to replace
338 scm_allocate_string. Updated all uses.
339 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
340 SCM_STRING_LENGTH): Deprecated.
341 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
342 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
343 Discouraged. Replaced all uses with scm_from_locale_string or
344 similar, as appropriate.
345 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
346 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
347 scm_substring_shared, scm_substring_copy): New.
348
349 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
350 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
351 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
352 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
353 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
354 Deprecated.
355 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
356 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
357 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
358 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
359 Updated all uses.
360 (scm_gensym): Generate only the number suffix in the buffer, just
361 string-append the prefix.
362
363 * error.c (scm_memory_error): Do not try to throw, just abort.
364 Throwing will not work anyway.
365
366 * gh.h, gh-data.c (gh_set_substr): Made src const.
367
368 * ports.c (scm_i_mode_bits_n): New, for counted strings.
369 (scm_mode_bits): Use it.
370 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
371 a vector normally and fill that instead of consing a list with a
372 blocked GC.
373
374 * read.c (scm_i_casei_streq): New, for counted strings.
375
376 * threads.c (gc_section_count): Removed, thread-sleeping can not
377 be nested.
378 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
379 admin mutex so that we can be put to sleep by other threads while
380 blocking on that mutex. Lock all the heap mutex of all threads,
381 including ourselves.
382 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
383 call scm_i_enter_guile.
384 (scm_thread_mark_stacks): Expect all threads to be suspended.
385
386 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
387 scm_gc_mallocated, for now.
388 (scm_init_storage): Initialize it.
389 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
390
391 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
392 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
393 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
394 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
395
396 * strop.c (scm_string_copy): Use scm_c_substring to get a
397 copy-on-write string.
398
399 2004-08-18 Kevin Ryde <user42@zip.com.au>
400
401 * arbiters.c (FETCH_STORE): New macro.
402 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
403 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
404 scm_try_arbiter and scm_release_arbiter.
405 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
406 for speed on i386, otherwise using mutex.
407
408 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
409 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
410 exact and inexact is #f.)
411
412 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
413 to get thread safety of scm_ttyname.
414
415 * ports.c (ttyname): Remove prototype, unused.
416
417 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
418 Reported by Michael Tuexen.
419
420 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
421
422 * load.c (scm_init_load_path): Do not pass NULL to
423 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
424 not set. Thanks to Bill Schottstaedt.
425
426 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
427
428 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
429 locale strings instead of accessing their internals.
430 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
431 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
432 SCM_STRING_CHARS and SCM_STRING_LENGTH.
433
434 * simpos.c (scm_system): Convert SCM strings to locale strings
435 instead of accessing their internals.
436
437 * script.c (scm_compile_shell_switches): Convert version to locale
438 string before printing it.
439
440 * rdelim.c (scm_read_delimited_x): Avoid
441 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
442 of scm_from_long for the returned number of read characters.
443
444 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
445 scm_i_mode_bits to avoid accessing internals of SCM string from C.
446
447 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
448 Use them instead of SCM_SYSCALL when one or two strings need to be
449 converted into locale strings.
450 (my_rename): New, gathers platform dependent code for renaming.
451 (scm_rename): Use it.
452 (scm_readlink, scm_copy_file): Convert SCM strings to locale
453 strings instead of accessing their internals.
454 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
455 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
456 SCM_STRING_LENGTH.
457
458 * extensions.c (load_extension): Convert lib and init to locale
459 strings instead of accessing the internals directly.
460 (scm_c_load_extension): Use scm_from_locale_string instead of
461 scm_makfrom0str.
462
463 * fports.h, fports.c (scm_i_fdes_to_port): New, like
464 scm_fdes_to_port, but take mode bits directly instead of as a C
465 string.
466 (scm_i_fdes_to_port): Implement using above.
467 (scm_open_file): Use scm_i_fdes_to_port together with
468 scm_i_mode_bits to avoid accessing internals of SCM string from C.
469 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
470 with scm_i_mode_bits to avoid accessing internals of SCM string
471 from C.
472
473 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
474 SCM string as argument.
475
476 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
477 bits directly instead of C string.
478 (scm_void_port): Implement using above.
479 (scm_sys_make_void_port): Use scm_i_void_port together with
480 scm_i_mode_bits to avoid accessing internals of SCM string.
481
482 * strings.h, strings.c (scm_i_get_substring_spec): New.
483
484 * socket.c, rw.c, deprecated.h, validate.h
485 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
486 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
487 scm_to_locale_string, etc.
488 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
489 above, plus scm_i_get_substring_spec.
490
491 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
492 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
493 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
494 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
495 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
496 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
497 with more explicit scm_remember_upto_here_1, etc, or introduced
498 them in the first place.
499
500 * posix.c (WITH_STRING): New helper macro. Use it where one
501 locale string is needed for a short piece of code.
502 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
503 when one locale string is needed.
504 (scm_mkstemp): Convert tmpl to a locale string.
505 (scm_putenv): Rewritten to use only C strings.
506 (scm_setlocale, scm_crpt): Convert argument strings to locale
507 strings.
508
509 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
510
511 * load.c (scm_primitive_load_path): Do not check for absolute
512 filenames when scm_sys_search_load_path returns false, which will
513 return absolute filenames unchanged.
514
515 2004-08-11 Marius Vollmer <mvo@zagadka.de>
516
517 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
518 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
519 of an alist. Thanks to Matthias Koeppe!
520
521 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
522
523 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
524 Moved from string.h to deprecated.h.
525
526 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
527
528 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
529 SCM_I_MAKE_STRING_TAG, changed all uses.
530 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
531 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
532 respectively. For a short time, the old names are still there as
533 aliases. Not all uses have been changed yet, but the ones in
534 strings.c have.
535 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
536 SCM_T_BITS_MAX.
537 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
538 scm_take_locale_string, scm_take_locale_stringn,
539 scm_to_locale_string, scm_to_locale_stringn,
540 scm_to_locale_stringbuf): New.
541 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
542 deprecated.[hc]. Implemented in terms of the new functions above.
543 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
544 scm_makfrom0str): Reimplemented in terms of the new functions from
545 above. They will be discouraged shortly.
546 (scm_substring): Do not use scm_mem2string.
547 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
548 to replace similar code from posix.c, simpos.c, and dynl.c.
549 (scm_string_append): Use memcpy instead of explicit loop. Do not
550 use register keyword. Use plain 'char' instead of 'unsigned
551 char'.
552
553 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
554 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
555
556 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
557 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
558 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
559 not as a pointer. Use scm_remember_upto_here_1 to protect it.
560
561 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
562 string. This avoids a conversion round-trip.
563
564 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
565 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
566 SCM_I_STRING_LENGTH, respectively.
567 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
568
569 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
570 of a string, call scm_display on the string itself.
571
572 * dynwind.c, dynwind.h (scm_frame_free): New.
573
574 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
575 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
576 Replaced uses of SCM_STRING_CHARS with proper uses of
577 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
578 Replaced scm_mem2string with scm_from_locale_string.
579
580 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
581 Removed, replaced all uses with scm_i_allocate_string_pointers.
582
583 * load.h, load.c (scm_internal_parse_path): Removed.
584 (scm_parse_path): Use scm_string_split to do the work.
585 (scm_init_load_path): Use scm_parse_path instead of
586 scm_internal_parse_path.
587 (scm_search_path): Rewritten string handling part of the code in
588 terms of scm_to_locale_stringbuf and so that it is thread safe.
589
590 * error.c (scm_error_scm): Throw directly instead of calling
591 scm_error, this avoids the back and forth conversion of SUBR and
592 MESSAGE and also plugs a memory leak.
593 (scm_error): Call scm_error_scm.
594
595 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
596 (display_header): Print FNAME when it is true, not
597 merely when it is a string.
598
599 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
600 unceremoniously. They were unused by Guile itself, and external
601 use should stop immediately.
602
603
604 2004-08-10 Marius Vollmer <mvo@zagadka.de>
605
606 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
607 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
608 deprecated versions installed in deprecated.h and deprecated.c.
609 Changed all uses.
610
611 2004-08-06 Rob Browning <rlb@defaultvalue.org>
612
613 * net_db.c (scm_resolv_error): don't cause an exception while
614 trying to throw an exception -- call scm_misc_error with correct
615 arguments. The previous arguments needed a format escape that
616 wasn't in any of the format strings.
617
618 2004-08-06 Kevin Ryde <user42@zip.com.au>
619
620 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
621 so as not to depend on signedness of plain char. For byvect range
622 check, throw out-of-range rather than wrong-type-arg.
623
624 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
625 signed byte range checks by using scm_to_schar and scm_from_schar,
626 don't want to depend on signedness of C char.
627
628 2004-08-05 Kevin Ryde <user42@zip.com.au>
629
630 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
631 SCM_DEFER_INTS.
632 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
633 guaranteed if multiple threads compete to unlock.
634 Update docstrings per doc/ref/api-scheduling.texi.
635
636 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
637 stat on the filename, to be certain a file rename can't mean we get
638 info on one filesystem object but open another. This fstat usage is
639 similar to Emacs copy-file.
640
641 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
642
643 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
644 SIGINT and SIGQUIT, since those values are ints.
645
646 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
647
648 * num2integral.i.c, num2float.i.c: Removed.
649 * Makefile.am (noinst_HEADERS): Updated.
650
651 * numbers.h. numbers.c (scm_make_ratio): Renamed to
652 scm_i_make_ratio and made static, replaced uses with scm_divide.
653 (scm_complex_p): New, export as "complex?" to Scheme.
654 (scm_number_p): Export as "number?" to Scheme.
655 (scm_is_complex, scm_is_number): New.
656 (scm_c_make_rectangular, scm_c_make_polar): New.
657 (scm_make_rectangular, scm_make_polar): Use above.
658 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
659 New.
660 (scm_make_complex): Discouraged by moving to discouraged.h and
661 discouraged.c. Replaced all uses with scm_c_make_rectangular.
662
663 * discouraged.h, discouraged.c, numbers.c, numbers.h
664 (scm_is_rational): New.
665 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
666 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
667 Removed prototypes.
668 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
669 Discouraged by moving to discouraged.h and discouraged.c.
670 Replaced all uses with scm_from_double.
671 (scm_num2float, scm_num2double): Discouraged by moving prototype
672 to discouraged.h and rewriting in terms of scm_to_double.
673 Replaced all uses with scm_to_double.
674 (scm_to_double): Do not implement in terms of scm_num2dbl, use
675 explicit code.
676 (scm_from_double): Do not implement in terms of scm_make_real, use
677 explicit code.
678
679 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
680
681 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
682
683 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
684 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
685
686 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
687 Renamed to SCM_I_* in order to avoid collisions with the versions
688 defined in deprecated.h.
689
690 * discouraged.h, discouraged.c: New files.
691
692 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
693 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
694 deprecated to being discouraged by moving to discouraged.h.
695
696 * numbers.h, numbers.c, discouraged.h, discouraged.c
697 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
698 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
699 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
700 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
701 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
702 scm_num2ulong_long): Discouraged by moving to discouraged.h and
703 discouraged.c and reimplementing in terms of scm_from_* and
704 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
705 functions.
706
707 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
708 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
709 scm_i_size2big, scm_i_ptrdiff2big): Removed.
710 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
711 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
712 explicit code.
713
714 2004-08-02 Kevin Ryde <user42@zip.com.au>
715
716 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
717 and current usage and migration.
718
719 2004-07-31 Kevin Ryde <user42@zip.com.au>
720
721 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
722 it's not thread safe.
723 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
724 advantage of this.
725 * fports.c (scm_open_file): Use scm_strerror likewise.
726 * filesys.c (scm_stat, scm_lstat): Ditto.
727
728 * filesys.c (scm_copy_file): Avoid fd leak when destination file
729 cannot be opened.
730
731 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
732 update, for thread safety.
733 (gensym_counter): Move into scm_gensym which is its only user.
734 (scm_init_symbols): No need to explicitly initialize gensym_counter.
735
736 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
737
738 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
739 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
740 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
741 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
742 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
743 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
744 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
745 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
746 defined in terms of scm_to_signed_integer, etc, but in terms of
747 scm_to_int8, etc.
748
749 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
750
751 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
752 no longer used.
753
754 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
755 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
756
757 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
758 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
759 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
760 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
761 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
762 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
763 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
764
765 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
766 the functions below.
767
768 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
769 conv-uinteger.i.c.
770
771 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
772 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
773 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
774 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
775 scm_from_uint64): Turned from macros into proper functions.
776 (scm_to_signed_integer, scm_to_unsigned_integer,
777 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
778 conv-integer.i.c and conv-uinteger.i.c, as well.
779
780 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
781 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
782 the limits. Those are always defined.
783
784 2004-07-29 Kevin Ryde <user42@zip.com.au>
785
786 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
787
788 2004-07-28 Kevin Ryde <user42@zip.com.au>
789
790 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
791 safety.
792
793 * unif.c (scm_array_set_x): For svect, use scm_num2short for
794 consistency with other vector types and to get arg and func name into
795 error message.
796
797 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
798
799 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
800 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
801 scm_from_bool, respectively.
802 (SCM_NINUMP): Added.
803
804 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
805 deprecated.h. Replaced all uses with scm_is_eq.
806
807 2004-07-24 Kevin Ryde <user42@zip.com.au>
808
809 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
810 * posix.c (scm_crypt): Use it to protect static data in crypt().
811
812 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
813
814 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
815 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
816 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
817 versions to deprecated.h and deprecated.c. Changed all uses to
818 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
819 scm_from_*, as appropriate.
820
821 * dynwind.c (scm_i_dowinds): Removed unused code that would call
822 the unexisting scm_cross_dynwind_binding_scope for inums on the
823 windlist.
824
825 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
826
827 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
828 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
829 byte-wise address to a SCM integer. Changed all uses.
830 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
831 scm_to_ipv6 and added type and range checking, for converting from
832 an IPv& byte-wise address to a SCM integer. Changed all uses.
833 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
834 is now done by scm_to_ipv6.
835
836 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
837 not accept inexact integers.
838
839 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
840 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
841 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
842 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
843 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
844 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
845 fixnum/bignum distinction visible. Changed all uses to
846 scm_to_size_t or similar.
847
848 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
849
850 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
851
852 2004-07-10 Kevin Ryde <user42@zip.com.au>
853
854 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
855 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
856 such a size causes divide-by-zeros in scm_hasher.
857
858 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
859 leak.
860
861 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
862
863 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
864 Rewritten using the same logic as scm_to_signed_integer and
865 scm_to_unsigned_integer, respectively, which is better(tm). Also,
866 use CHAR_BIT instead of hardcoding 8.
867 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
868 SCM_I_LLONG_MIN etc. instead.
869
870 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
871 SCM_I_MAKINUM and changed all uses.
872 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
873
874 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
875 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
876 them by assuming twos-complement.
877
878 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
879
880 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
881 configure now produces.
882 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
883 definitions, giving the limits of the integer types defined by
884 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
885 LLONG_MIN or LONG_LONG_MIN is hard to get at.
886
887 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
888 SHORT_MIN.
889 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
890 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
891 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
892 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
893 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
894 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
895 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
896 scm_from_uintmax): New.
897
898 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
899
900 * tags.h (scm_is_eq): New.
901
902 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
903 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
904 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
905 scm_from_bool, and scm_is_bool, respectively.
906
907 * boolean.h (scm_is_bool): Fix bug in prototype.
908 (scm_from_bool): The argument is "x" not "f", stupid.
909
910 * boolean.c (scm_is_bool): Fix typo.
911
912 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
913 scm_is_unsigned_integer, scm_to_signed_integer,
914 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
915 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
916 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
917 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
918 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
919 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
920 New.
921
922 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
923
924 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
925 scm_to_bool): New.
926
927 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
928
929 * backtrace.c (display_expression, display_frame): Call
930 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
931 single memoized expression.
932
933 * debug.c (memoized_print): Don't try to unmemoize the memoized
934 object, since we can't know whether it holds a single expression
935 or a body.
936
937 (scm_mem_to_proc): Removed check for lambda expression, since it
938 was moot anyway. Whoever uses these functions for debugging
939 purposes should know what they do: Creating invalid memoized code
940 will cause crashes, independent of whether this check is present
941 or not.
942
943 (scm_proc_to_mem): Take the closure's code as it is and don't
944 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
945 memoized code should not be modified.
946
947 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
948 scm_unmemoize from public use, but made scm_i_unmemoize_expr
949 available as a guile internal function instead. However,
950 scm_i_unmemoize_expr will only work on memoized objects that hold
951 a single memoized expression. It won't work with bodies.
952
953 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
954 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
955 i. e. a list of expressions.
956
957 * eval.c (unmemoize_exprs): Drop internal body markers from the
958 output during unmemoization.
959
960 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
961 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
962 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
963 as guile internal functions instead. scm_i_unmemoize_expr will
964 only work on a single memoized expression, while
965 scm_i_unmemocopy_body will only work on bodies.
966
967 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
968
969 * eval.c (unmemoize_exprs): Handle semi-memoized code.
970
971 (scm_cons_source, scm_primitive_eval): Prefer higher level
972 predicate SCM_FALSEP over SCM_IMP.
973
974 2004-06-15 Rob Browning <rlb@defaultvalue.org>
975
976 * script.c (scm_shell_usage): minor phrasing change.
977
978 * gc_os_dep.c: update ifdefery for macosx.
979 (scm_get_stack_base): separate result initialization from
980 declaration to slience warnings with macosx and hp-ux using gcc
981 3.3. Thanks to Andreas Vögele.
982
983 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
984
985 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
986
987 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
988
989 * list.[ch] (scm_i_finite_list_copy): New internal function to
990 copy lists that are known to be finite (though not necessarily
991 proper).
992
993 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
994 a closure's argument list like an expression of a body.
995
996 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
997 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
998 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
999 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
1000 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
1001 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
1002 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
1003 unmemoize_builtin_macro): New static functions and symbols.
1004
1005 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
1006 now has a slightly different meaning: The memoized form that is
1007 receives as its argument is now interpreted as a sequence of
1008 expressions from a body.
1009
1010 (unmemocar, scm_unmemocar): Since the whole functionality of
1011 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
1012 has its old content back and is deprecated, while unmemocar has
1013 been removed.
1014
1015 (SCM_BIT7): Removed.
1016
1017 (CEVAL): For unmemoizing a single expression, call
1018 unmemoize_expression instead of scm_unmemocopy, which now expects
1019 a sequence of body expressions. Eliminated unnecessary empty
1020 environment frame when executing let* forms. Eliminated
1021 unmemoization step from evaluator.
1022
1023 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1024
1025 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
1026 macroexp and made static. Added new version of scm_macroexp that
1027 emits a deprecation warning and then calls macroexp.
1028 (scm_m_undefine): Issue deprecation warning.
1029
1030 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1031
1032 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
1033 Modified to make set! work on symbols that represent syntactic
1034 keywords.
1035
1036 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
1037
1038 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
1039 compound expression as lvalue errors.
1040
1041 2004-05-24 Marius Vollmer <mvo@zagadka.de>
1042
1043 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
1044 WINDER_DATA to a SCM.
1045
1046 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1047
1048 * goops.c (compute_getters_n_setters, create_standard_classes,
1049 scm_add_slot): Compute closures by calling scm_i_eval_x on a
1050 lambda expression rather than creating them with scm_closure.
1051
1052 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1053
1054 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
1055 misplaced syntactic keywords. This will not work unless guile's
1056 defmacro feature is deprecated.
1057
1058 (scm_m_case): Fixed a bug that caused the list of labels to grow
1059 with every case form.
1060
1061 2004-05-19 Kevin Ryde <user42@zip.com.au>
1062
1063 * numbers.c (scm_round_number): For inum and big, just return x. For
1064 real, use scm_round for 2^54-1 etc problems covered there.
1065
1066 * numbers.c (trunc): Remove #define to scm_truncate when the C library
1067 doesn't provide trunc. This was for when `truncate' was done as a
1068 scm_tc7_dsubr, no longer required.
1069
1070 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
1071 to stack marking call, two parameters and no cast on t->base.
1072
1073 2004-05-18 Marius Vollmer <mvo@zagadka.de>
1074
1075 * hashtab.c (rehash_after_gc): Bug fix: properly link the
1076 processed hashtables back into the weak_hashtables list. Thanks
1077 to Bill Schottstaedt!
1078
1079 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1080
1081 * eval.c (unmemoize_quote): New static function.
1082
1083 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
1084 representation of 'quote' and '@slot-ref' to an improper list.
1085 This reduces execution time, the number of cells used to hold the
1086 memoized code, and thus also reduces garbage collection time.
1087
1088 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
1089
1090 (SCM_CEVAL): Changed macro handling to also work with macros that
1091 return improper lists. Added an assertion, that the code returned
1092 by a macro transformer will not lead to cycles in the memoized
1093 code.
1094
1095 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1096
1097 No functional change, just rearrangements of functions within the
1098 file.
1099
1100 * eval.c (scm_ilookup, scm_unbound_variable_key,
1101 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
1102 the definitions used for execution, since that's where they will
1103 belong to later.
1104
1105 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1106
1107 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
1108 throughout guile, has not been part of an official release yet,
1109 and the concept of sloppy predicates has never been a good idea.
1110
1111 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
1112 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
1113 Simplified.
1114
1115 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1116
1117 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
1118 to make explicit what happens.
1119
1120 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1121
1122 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
1123 explicit what happens.
1124
1125 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
1126 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
1127
1128 2004-05-11 Marius Vollmer <mvo@zagadka.de>
1129
1130 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
1131 is indeed a procedure when it isn't a number.
1132
1133 2004-05-10 Marius Vollmer <mvo@zagadka.de>
1134
1135 Convert floating point numbers into strings with an arbitrary
1136 radix. Thanks to Richard Todd!
1137
1138 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
1139 fit.
1140 (fx): Removed.
1141 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
1142 number_chars): New, to support variable radices.
1143 (idbl2str): Use above instead of the old base-10 only tables.
1144 (iflo2str): Pass on new RADIX argument to idbl2str.
1145 (scm_number_to_string): Pass radix to iflo2str.
1146 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
1147 iflo2str.
1148 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
1149 possible radices.
1150
1151 2004-05-10 Kevin Ryde <user42@zip.com.au>
1152
1153 * numbers.c (scm_logbit_p): Correction to test above the end of an
1154 inum. Reported by Jan Konecny.
1155
1156 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1157
1158 * gc.h (scm_t_cell): Fields are now of type SCM instead of
1159 scm_t_bits. Updated all users.
1160 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
1161 duplicating the code.
1162 (SCM_CELL_OBJECT_LOC): New.
1163 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
1164 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
1165
1166 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
1167 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
1168 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
1169 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
1170 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
1171 SCM_SMOB_OBJECT_3_LOC): New.
1172 * smob.c (scm_i_set_smob_flags): New function.
1173
1174 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
1175 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
1176 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
1177 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
1178 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
1179 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
1180
1181 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
1182 taking the address of SCM_CELL_WORD_1, the latter being no longer
1183 an lvalue.
1184
1185 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
1186 of casting SCM_CELL_WORD_LOC.
1187
1188 2004-05-02 Kevin Ryde <user42@zip.com.au>
1189
1190 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
1191 --disable-deprecated. Reported by Andreas Vögele.
1192
1193 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
1194 particular on HP-UX). Reported by Andreas Vögele.
1195
1196 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
1197 code has support for. Fixes building with AIX cc, which is ansi but
1198 doesn't define __STDC__. Reported by Keith Crane.
1199 (var_start): Remove macro, this variation no longer required.
1200 (scm_list_n): Use va_start directly.
1201
1202 2004-05-01 Kevin Ryde <user42@zip.com.au>
1203
1204 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
1205 is now gone. Reported by Andreas Vögele.
1206
1207 2004-04-28 Kevin Ryde <user42@zip.com.au>
1208
1209 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
1210 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
1211 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
1212 subscript. Reported by Andreas Vögele.
1213 Also cast through unsigned char to avoid passing negatives to those
1214 macros if input contains 8-bit values.
1215
1216 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
1217 corrections to range check for signed numbers. Remove
1218 scm_remember_upto_here_1(num) from these checks, since num is used
1219 subsequently anyway.
1220
1221 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
1222 avoid warning from gcc 3.4. Reported by Hyperdivision.
1223
1224 * numbers.c (scm_bit_extract): Use min instead of MIN.
1225 (MIN): Remove, this conflicts with similar macro defined by limits.h
1226 on HP-UX. Reported by Andreas Vögele.
1227
1228 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
1229 particular on HP-UX). Reported by Andreas Vögele.
1230
1231 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
1232 Reported by Andreas Vögele.
1233
1234 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
1235 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
1236 by Andreas Vögele.
1237
1238 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1239
1240 * eval.c (s_macro_keyword): New static identifier.
1241
1242 (scm_m_define): Change order to first create binding and
1243 evaluating the expression afterwards.
1244
1245 (scm_m_set_x): Memoize complete set! expression. Only leave
1246 symbols if no binding exists at memoization time. Throw error if
1247 assigning to a syntactic keyword.
1248
1249 (lazy_memoize_variable): New function.
1250
1251 (CEVAL): When execution set!, perform lazy memoization if
1252 unmemoized symbol is detected.
1253
1254 * modules.c (module_variable): Return variables with unbound
1255 value.
1256
1257 * tags.h: Fix comment.
1258
1259 2004-04-25 Kevin Ryde <user42@zip.com.au>
1260
1261 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
1262 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
1263 in 8-bit locales, and ensures consistency with char-upper-case? and
1264 char-lower-case? which already use ctype.h.
1265 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
1266 Remove.
1267 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
1268
1269 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
1270 call. Reported by Hyperdivision.
1271
1272 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
1273 Reported by Hyperdivision.
1274
1275 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
1276 Hyperdivision.
1277
1278 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1279
1280 Hide the implementation of ilocs and isyms in eval.c.
1281
1282 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
1283 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
1284 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
1285 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
1286 eval.h to eval.c.
1287
1288 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
1289 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
1290 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
1291 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
1292 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
1293 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
1294 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
1295 renamed to ISYMNUM.
1296
1297 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
1298 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
1299 Extracted printing of ilocs and isyms to guile internal functions
1300 scm_i_print_iloc, scm_i_print_isym of eval.c.
1301
1302 2004-04-22 Kevin Ryde <user42@zip.com.au>
1303
1304 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
1305
1306 * numbers.c (scm_round): Test for x already an integer, to avoid bad
1307 rounding in x+0.5 when x is a big value already an integer. In
1308 certain hardware rounding cases x+0.5 can give an adjacent integer,
1309 leading to that as the result, when we really just wanted x itself.
1310
1311 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1312
1313 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
1314
1315 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
1316 added const qualifiers, cast intentionally unused expressions to
1317 void for emphasis, improved comment.
1318
1319 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1320
1321 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
1322 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
1323 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
1324 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
1325 Defined the tc8-tag for flags to be 0x04, which will mean that
1326 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
1327 to the reduced number of bits and the simpler bit pattern for
1328 SCM_BOOL_F, certain machines may be able to use more efficient
1329 processor instructions to deal with SCM_BOOL_F.
1330
1331 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
1332 never been defined in a released version, thus no need to
1333 deprecate them.
1334
1335 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
1336 instead of tc9 tags.
1337
1338 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
1339 of tc9 tags.
1340
1341 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
1342 could have used this definition.
1343
1344 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
1345 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
1346 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
1347 as isyms, as special isyms don't exist any more.
1348
1349 2004-04-18 Kevin Ryde <user42@zip.com.au>
1350
1351 * filesys.c (scm_readdir): Use readdir_r when available, for thread
1352 safety.
1353
1354 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
1355 explicit swapping code.
1356
1357 2004-04-15 Kevin Ryde <user42@zip.com.au>
1358
1359 * cpp_sig_symbols.in: Add SIGSYS.
1360
1361 * list.c (scm_append_x): Use iterative style, to avoid non-tail
1362 recursion.
1363
1364 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
1365 frac/big and frac/frac, use scm_less_p for exact comparison.
1366
1367 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
1368 with big/inum.
1369
1370 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
1371
1372 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
1373
1374 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
1375
1376 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
1377 scm_c_{up,down}case.
1378 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
1379 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
1380
1381 2004-04-06 Kevin Ryde <user42@zip.com.au>
1382
1383 * numbers.c (scm_ash): Remove stray "}" in docstring.
1384
1385 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
1386 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
1387 calling mpz_cmp_ui in most cases.
1388
1389 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
1390 for big == abs(most-negative-fixnum) special case.
1391 (abs_most_negative_fixnum): Remove, no longer used.
1392
1393 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
1394 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
1395 calling (sigaction NSIG).
1396
1397 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
1398 and fork error cases to do this.
1399
1400 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1401
1402 * eval.c (CEVAL): Don't distinguish between short and long
1403 instructions when dispatching - just always dispatch on the
1404 instruction code, which is common for short and long instructions.
1405 Further, removed unnecessary goto statements and added comment.
1406
1407 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1408
1409 * eval.c (scm_unmemocopy): Don't distinguish between short and
1410 long instructions when dispatching - just always dispatch on the
1411 instruction code, which is common for short and long instructions.
1412 Further, removed unnecessary goto statements, fixed indentation
1413 and replaced SCM_IMP predicates by SCM_NULLP.
1414
1415 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1416
1417 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
1418 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
1419 'checkmacro'.
1420
1421 2004-03-31 Kevin Ryde <user42@zip.com.au>
1422
1423 * simpos.c: Include <signal.h> for SIG_IGN and friends.
1424
1425 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1426
1427 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
1428 SCM_DEBUGGINGP:
1429
1430 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
1431 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
1432 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
1433 single interface that also matches the naming conventions.
1434 Probably scm_debug_mode_p should be part of the private interface
1435 anyway.
1436
1437 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
1438 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
1439 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
1440 to scm_debug_mode_p.
1441
1442
1443 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
1444
1445 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
1446 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
1447 from debug.h to eval.h.
1448
1449 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
1450 more, just leave it with setting scm_debug_mode_p, which is
1451 equivalent for practical purposes.
1452
1453 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
1454 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
1455
1456 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
1457
1458 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
1459 static and renamed it to ceval throughout. Provide a new exported
1460 but deprecated function scm_ceval as a wrapper for backwards
1461 compatibility. The same is done for the deval/scm_deval pair of
1462 functions.
1463
1464 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
1465 throughout. Defined CEVAL to ceval or deval, based on compilation
1466 phase.
1467
1468 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
1469 to ceval and deval instead of calling *scm_ceval_ptr.
1470
1471 * eval.c (dispatching_eval): New deprecated static function.
1472
1473 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
1474 to emulate its old behaviour as closely as possible.
1475
1476
1477 Change the evaluator such that only expressions for which pair? is
1478 true are passed to CEVAL, and such that all other expressions are
1479 evaluated outside of CEVAL:
1480
1481 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
1482 expression that is assumed to be memoized already. All but
1483 expressions of the form '(<form> <form> ...)' are evaluated inline
1484 without calling an evaluator.
1485
1486 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
1487 expressions of the form '(<form> <form> ...)' inline without
1488 calling an evaluator.
1489
1490 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
1491 the special case of unmemoized symbols passed on the top level.
1492
1493 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
1494 is known that the expression passed to CEVAL is of the form
1495 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
1496 now it is known that the input expression of CEVAL is a pair.
1497
1498 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1499
1500 * eval.c (is_self_quoting_p): New static function.
1501
1502 (scm_m_quote): Use is_self_quoting_p.
1503
1504 (copy_tree): Corrected typo in comment.
1505
1506 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1507
1508 * eval.c (s_scm_copy_tree): idem.
1509
1510 * list.c (s_scm_filter): remove "pointer" from doc string.
1511
1512 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
1513
1514 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
1515
1516 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
1517 (display_frame): idem.
1518 (display_backtrace_file_and_line): idem.
1519
1520 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
1521 arguments.
1522
1523 2004-03-26 Kevin Ryde <user42@zip.com.au>
1524
1525 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
1526
1527 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
1528 big==0 since that never occurs.
1529
1530 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
1531 scm_modular_expt, matching scheme level name `modulo-expt'.
1532
1533 * numbers.c (scm_modular_expt): Return a negative remainder for a
1534 negative divisor, the same as `modulo' does.
1535
1536 2004-03-26 Eric Hanchrow <offby1@blarg.net>
1537
1538 * numbers.c, numbers.h (scm_modular_expt): New function.
1539
1540 2004-03-25 Kevin Ryde <user42@zip.com.au>
1541
1542 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
1543 return inexact as required by r5rs.
1544
1545 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1546
1547 * eval.c: Separated some definitions relevant for execution from
1548 the memoization part of the file.
1549
1550 (copy_tree): New static function
1551
1552 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
1553 structures are detected now and will lead to an exception instead
1554 of forcing guile to run in an endless loop, using up all the
1555 system's memory. Second, arrays in the cdr of an improper list
1556 are now copied. See the new test cases in eval.test.
1557
1558 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1559
1560 * posix.c (scm_gethostname): Make sure len is initialised before
1561 it is used. Restructured to (hopefully) represent possible
1562 configurations more clearly in the code. Added unwind handler.
1563
1564 2004-03-23 Kevin Ryde <user42@zip.com.au>
1565
1566 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
1567 MAXHOSTNAMELEN when available.
1568
1569 2004-03-21 Marius Vollmer <mvo@zagadka.de>
1570
1571 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
1572 terminator. Rewritten the logic as a state machine, I must have
1573 been doing too much VHDL lately...
1574
1575 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
1576 themselves. Thanks to Han-Wen Nienhuys!
1577
1578 * list.c: Changed docstrings so that they no longer talk about
1579 returning 'pointers' to something.
1580
1581 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
1582
1583 * gc.c: remove set_debug_cell_accesses! when
1584 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
1585 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
1586 debugging conditionally.
1587
1588 2004-03-21 Kevin Ryde <user42@zip.com.au>
1589
1590 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
1591
1592 2004-03-20 Kevin Ryde <user42@zip.com.au>
1593
1594 * posix.c (scm_gethostname): Preserve errno across free() call.
1595
1596 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1597
1598 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
1599 free cells.
1600
1601 2004-03-14 Kevin Ryde <user42@zip.com.au>
1602
1603 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
1604 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
1605
1606 2004-03-07 Kevin Ryde <user42@zip.com.au>
1607
1608 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
1609 than "GMT" always.
1610 (filltime): Make zname parameter "const".
1611
1612 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
1613
1614 * threads.c, threads.h (scm_c_scm2thread): New function.
1615
1616 2004-02-29 Kevin Ryde <user42@zip.com.au>
1617
1618 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
1619 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
1620 particular don't assume "defined (__alpha__) && ! defined (linux)"
1621 means OSF. Remove "SCO" code, which was not really SCO specific and
1622 which John W. Eaton advises should be long past being needed.
1623
1624 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
1625 error throw.
1626
1627 2004-02-24 Kevin Ryde <user42@zip.com.au>
1628
1629 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
1630
1631 2004-02-22 Kevin Ryde <user42@zip.com.au>
1632
1633 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
1634 complex, same as for two args. (Handle only inum, big, real, frac).
1635
1636 2004-02-21 Kevin Ryde <user42@zip.com.au>
1637
1638 * posix.c (scm_crypt): Use new HAVE_CRYPT.
1639 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
1640 Reported by Andreas Voegele.
1641
1642 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
1643
1644 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
1645 validation.
1646
1647 * read.c (scm_lreadparen): Removed.
1648 (scm_lreadparen1): Renamed scm_i_lreadparen.
1649
1650 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
1651
1652 * list.c (scm_list_n): validate non-immediate arguments;
1653 this will catch forgotten a SCM_UNDEFINED.
1654
1655 2004-02-18 Marius Vollmer <mvo@zagadka.de>
1656
1657 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
1658 Thanks to Bill Schottstaedt!
1659
1660 * socket.h (scm_gethost): Removed prototype it is already in
1661 "net_db.h". Thanks to Bill Schottstaedt!
1662
1663 2004-02-18 Kevin Ryde <user42@zip.com.au>
1664
1665 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
1666 order parameter to mpz_import, in fact with just one word there's no
1667 order to worry about at all.
1668
1669 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
1670 and frac==complex, make an exact comparison rather than converting
1671 with fraction2double.
1672
1673 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
1674 shared library, since environ is not directly available there.
1675
1676 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
1677 standard.
1678
1679 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
1680 errno EINVAL in case localtime and gmtime don't set it.
1681 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
1682 SCM_SYSERROR, since mktime and strptime generally don't set errno.
1683
1684 2004-02-16 Kevin Ryde <kevin@swox.se>
1685
1686 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
1687 which were permitted in the past for these.
1688
1689 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
1690 previous change to numbers.c.
1691
1692 * script.c (scm_shell_usage): Print bug-guile email address, as per
1693 GNU standard. Reported by Han-Wen Nienhuys.
1694
1695 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1696
1697 * unif.c (scm_make_uve): Removed local variable and simplified
1698 code in order to avoid compiler used uninitialized warnings.
1699
1700 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
1701 scm_hash_map.
1702 (scm_hash_fold): Use scm_call_3 directly in the call to
1703 scm_internal_hash_fold instead of going via fold_proc (which is
1704 now removed).
1705 (scm_hash_for_each): Use a trampoline +
1706 scm_internal_hash_for_each_handle.
1707 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
1708 functions.
1709
1710 2004-02-12 Kevin Ryde <user42@zip.com.au>
1711
1712 * ports.c (scm_port_line): In docstring, note first line is 0.
1713 (scm_set_port_line_x): In docstring, note first line is 0.
1714 (scm_port_column): In docstring, there's no default to current input
1715 port, and remove shared port-line @defun.
1716 (scm_set_port_column_x): In docstring, there's no default to current
1717 input port, note first column is 0, remove shared set-port-line!
1718 @defun.
1719
1720 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
1721 convert args the same way that array-set! does.
1722
1723 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
1724 for dvect.
1725 (scm_array_p): Add missing "break"s in switch, fix llvect test look
1726 for "l" not "s", fix dvect to be false for singp(prot) since such a
1727 value is for fvect.
1728 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
1729 (exactly_one_third): New variable.
1730 (scm_init_unif): Initialize it.
1731
1732 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
1733
1734 * read.c (scm_read_opts): Change `escaped-parens' to
1735 `elisp-strings'.
1736
1737 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
1738
1739 * read.c (scm_read_opts): New opts `elisp-vectors' and
1740 `escaped-parens'.
1741 (s_vector): New.
1742 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
1743 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
1744 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
1745 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
1746 `escaped-parens' option set.
1747 (scm_read_token): If elisp vector syntax active, disallow [ and ]
1748 in tokens.
1749 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
1750 (scm_lreadparen1): New.
1751
1752 * read.h: Remove conditionally compiled last arg to
1753 scm_lreadparen.
1754 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
1755
1756 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
1757
1758 * eval.c (m_expand_body): remove stray variable new_body.
1759
1760 2004-01-22 Marius Vollmer <mvo@zagadka.de>
1761
1762 * eval.c (m_expand_body): Rewrite the expression in place (by
1763 overwriting FORMS) also when a letrec is constructed, not only
1764 when no definitions are found. Do not return rewritten expression
1765 to emphasize the in-place rewriting. Changed all users.
1766
1767 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
1768
1769 * gc.c: add protected_object_count, a number that is dumped from
1770 gc_stats()
1771
1772 2004-01-11 Marius Vollmer <mvo@zagadka.de>
1773
1774 * dynwind.h, dynwind.c (scm_frame_unwind,
1775 scm_frame_unwind_handler): Renamed and changed all uses.
1776 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
1777
1778 2004-01-11 Kevin Ryde <user42@zip.com.au>
1779
1780 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
1781 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
1782 changes made to scheme-compound.texi.
1783
1784 2004-01-10 Marius Vollmer <mvo@zagadka.de>
1785
1786 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
1787 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
1788
1789 * guile-snarf.in: Use mkdir to create a unique temporary directory
1790 that we can safely use. Thanks to Stefan Nordhausen!
1791
1792 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1793
1794 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
1795 argument since it is always zero now. Changed all callers.
1796 Removed code for handling fluids.
1797
1798 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
1799 the wind chain explicitely. Use scm_c_with_fluid for the common
1800 case of only one fluid.
1801 (scm_with_fluid): New.
1802 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
1803
1804 * fluids.h, fluids.c (scm_frame_fluid): New.
1805 (scm_with_fluid): New.
1806 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
1807
1808 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
1809 do the unwinding directly. It is simple enough.
1810
1811 * dynwind.h, dynwind.c: Did the following renamings:
1812 scm_begin_frame -> scm_frame_begin,
1813 scm_end_frame -> scm_frame_end,
1814 scm_on_unwind -> scm_frame_unwind,
1815 scm_on_rewind -> scm_frame_rewind,
1816 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
1817 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
1818 Changed all uses.
1819
1820 * aync.h, async.c: Did the follwing renamings:
1821 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
1822 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
1823 Changed all uses.
1824
1825 * ports.h, ports.c: Did the follwing renamings:
1826 scm_with_current_input_port -> scm_frame_current_input_port,
1827 scm_with_current_output_port -> scm_frame_current_output_port,
1828 scm_with_current_error_port -> scm_frame_current_error_port.
1829 Changed all uses.
1830
1831 2004-01-07 Kevin Ryde <user42@zip.com.au>
1832
1833 * numbers.c (s_bignum): Remove, not used since gmp bignums.
1834 Reported by Richard Todd.
1835
1836 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
1837 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
1838
1839 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
1840 traversing the args list, fixes segv if an improper list is given.
1841 Reported by Rouben Rostamian.
1842
1843 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1844
1845 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
1846 swap_data on stack, use a 'malloc obj'.
1847
1848 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
1849 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
1850 scm_i_... since they are internal. Changed all uses.
1851
1852 * dynwind.c (frame_print): Removed, use the default printer.
1853 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
1854 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
1855 to protect SCM values.
1856
1857 * dynwind.h (SCM_F_WIND_EXPLICITELY,
1858 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
1859 Changed all uses.
1860 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
1861
1862 2004-01-05 Marius Vollmer <mvo@zagadka.de>
1863
1864 * ports.h, ports.c (scm_with_current_input_port,
1865 scm_with_current_output_port, scm_with_current_error_port): New.
1866
1867 * async.h, async.c (scm_with_blocked_asyncs,
1868 scm_with_unblocked_asyncs): New.
1869
1870 2004-01-03 Marius Vollmer <mvo@zagadka.de>
1871
1872 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
1873 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
1874 New.
1875 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
1876 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
1877 function when the outermost wind point has been reached. The
1878 latter is used to copy a continuation stack at the right time.
1879 scm_dowinds remains available.
1880 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
1881 tc16_guard, guards_print): Removed.
1882 (scm_internal_dynamic_wind): Reimplemented using frames.
1883
1884 * continuations.c (copy_stack): New, do only the stack copying
1885 part of copy_stack_and_call.
1886 (copy_stack_and_call): Copy the stack after unwinding and before
1887 rewinding.
1888 (scm_dynthrow): Do not call scm_dowinds, this is now done by
1889 copy_stack_and_call.
1890
1891 2004-01-04 Kevin Ryde <user42@zip.com.au>
1892
1893 * numbers.c (scm_less_p): Don't convert frac to float for compares,
1894 can give bad results due to rounding.
1895
1896 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
1897 setzone/restorezone protection for DOS.
1898
1899 2003-12-26 Marius Vollmer <mvo@zagadka.de>
1900
1901 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
1902 and scm_t_uintmax to be defined in scmconfig.h
1903
1904 2003-12-03 Kevin Ryde <user42@zip.com.au>
1905
1906 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
1907
1908 * numbers.c (scm_make_ratio): Check for numerator equal to
1909 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
1910 giving integer -1.
1911
1912 * numbers.c (scm_real_part): Return fraction unchanged rather than
1913 converting to flonum.
1914
1915 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1916
1917 * modules.c (module_variable): Fixed (and thus simplified) the
1918 definition of SCM_BOUND_THING_P to reflect the fact that since
1919 after the 1.4 series of guile, obarrays only hold variable
1920 objects.
1921
1922 2003-11-30 Marius Vollmer <mvo@zagadka.de>
1923
1924 * numbers.c (scm_logand): It's "#b...", not "#\b...".
1925
1926 From Paul Jarc:
1927
1928 * read.c (scm_lreadr): Signal an error for invalid escape
1929 sequences in strings. Code cleanups too.
1930
1931 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
1932 writing control characters in strings.
1933
1934 2003-11-21 Marius Vollmer <mvo@zagadka.de>
1935
1936 * ports.c (scm_drain_input): Bug fix: only access the port after
1937 checking that it indeed is one.
1938
1939 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
1940
1941 * eval.c (s_bad_define): New static identifier.
1942
1943 (m_body): Fixed comment.
1944
1945 (scm_m_define): Don't generate memoized code for definitions that
1946 are not on the top level. As a consequence, no memoized code at
1947 all is generated for definitions any more: Top level definitions
1948 are executed immediately during memoization and internal
1949 definitions are handled separately in m_expand_body.
1950
1951 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
1952 definitions. Consequently, there is no unmemoizing code any more
1953 that might modify the environment. Thus, the old scm_unmemocopy
1954 is removed and the old unmemocopy is renamed to scm_unmemocopy.
1955
1956 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
1957 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
1958 over SCM_NIMP in places, where the argument is known to be part of
1959 a proper list.
1960
1961 2003-11-21 Kevin Ryde <user42@zip.com.au>
1962
1963 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
1964 for bignums.
1965
1966 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
1967 to share some shifting.
1968
1969 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
1970 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
1971 since gc does this.
1972
1973 2003-11-19 Marius Vollmer <mvo@zagadka.de>
1974
1975 * numbers.c (scm_make_ratio): Rewritten to have a simpler
1976 structure. Previously, not all cases with a negative denominator
1977 were covered.
1978
1979 * numbers.c (mem2decimal_from_point): use scm_divide instead of
1980 scm_divide2real when forming the fractional part. This allows
1981 "#e1.2" to yield 6/5.
1982
1983 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
1984 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
1985 fractions were equal to each other regardless of value. Ooops.
1986
1987 * numbers.c (scm_rationalize): Return an inexact result when given
1988 inexact arguments.
1989
1990 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
1991 non-numbers.
1992
1993 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1994
1995 Support for exact fractions from Bill Schottstaedt! Thanks!
1996
1997 * print.c (scm_iprin1): Handle fractions.
1998
1999 * objects.h (scm_class_fraction): New.
2000 * objects.c (scm_class_fraction): New.
2001 (scm_class_of): Handle fractions.
2002
2003 * hash.c (scm_hasher): Handle fractions.
2004
2005 * numbers.c: New code for handling fraction all over the place.
2006 (scm_odd_p, scm_even_p): Handle inexact integers.
2007 (scm_rational_p): New function, same as scm_real_p.
2008 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
2009 New exact functions that replace the inexact 'dsubr'
2010 implementations.
2011 (scm_numerator, scm_denominator): New.
2012
2013 * numbers.h (SCM_NUMP): Recognize fractions.
2014 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
2015 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
2016 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
2017 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
2018 SCM_FRACTION_REDUCED): New.
2019 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
2020 New prototypes.
2021 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
2022 scm_rational_p): New prototypes.
2023 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
2024 scm_i_print_fraction): New prototypes.
2025
2026 * goops.c (create_standard_classes): Create "<fraction>" class.
2027
2028 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
2029
2030 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
2031 case in the switch, but do nothing for now.
2032
2033 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
2034 to doubles when calling 'dsubr' functions.
2035
2036 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
2037
2038 2003-11-18 Rob Browning <rlb@defaultvalue.org>
2039
2040 * gen-scmconfig.c (main): remove public definition of
2041 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
2042 direct typedef of long_long and ulong_long inside deprecated block
2043 when appropriate.
2044
2045 * deprecated.h: move long_long and ulong_long definitions to
2046 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
2047 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
2048
2049 2003-11-17 Marius Vollmer <mvo@zagadka.de>
2050
2051 * hash.c (scm_string_hash): New hashing algorithm that takes the
2052 complete string into account.
2053
2054 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
2055 is a list. This allows (@ ...) to work with set!.
2056 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
2057 SCM_ASSYNT.
2058
2059 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
2060 the "-e" option instead of scm_str2symbol. This allows things
2061 like (@ ...) to be specified for the entry point.
2062
2063 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2064
2065 * eval.c (scm_m_letstar): Create memoized code in place to
2066 minimize consing.
2067
2068 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2069
2070 * eval.c (s_splicing): Commented and reformulated.
2071
2072 (lookup_global_symbol, lookup_symbol): New static functions.
2073
2074 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
2075
2076 (try_macro_lookup, literal_p): Use lookup_symbol instead of
2077 creating a temporary pair for scm_lookupcar.
2078
2079 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
2080 created deprecated wrapper function scm_unmemocar.
2081
2082 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
2083 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
2084 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
2085 undefineds, sym_three_question_marks): Moved around without
2086 modifications.
2087
2088 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
2089
2090 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2091
2092 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
2093 m_expand_body, scm_m_expand_body): Grouped together with m_body.
2094 No further modifications.
2095
2096 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2097
2098 * eval.c (s_mixed_body_forms): New static identifier.
2099
2100 (canonicalize_define, scm_m_define): The check for a bad
2101 expression is performed in canonicalize_define now.
2102
2103 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
2104 static helper functions for m_expand_body.
2105
2106 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
2107 expand user defined macros. Fixed handling of the definition/
2108 expression boundary. Fixed handling of definitions grouped with
2109 'begin. Use canonicalize_define to expand definitions.
2110
2111 2003-11-13 Marius Vollmer <mvo@zagadka.de>
2112
2113 * read.c (scm_lreadr): detect EOF after backslash, and interpret
2114 \xNN hexadecimal sequences. From Paul Jarc, thanks!
2115
2116 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
2117 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
2118 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
2119 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
2120 New macros from Paul Jarc. Thanks!
2121
2122 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
2123 return NULL when the machine type is unknown. Previously,
2124 gc_os_dep.c would refuse to compile.
2125
2126 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
2127
2128 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
2129 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
2130 scm_m_body to m_body.
2131
2132 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
2133
2134 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
2135 public use of scm_m_expand_body in eval.h. In eval.c, renamed
2136 scm_m_expand_body to m_expand_body and made it static. Added
2137 deprecated wrapper scm_m_expand_body.
2138
2139 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
2140 of scm_m_expand_body.
2141
2142 2003-11-09 Kevin Ryde <user42@zip.com.au>
2143
2144 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
2145 argument. Reported by Mike Gran.
2146
2147 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
2148
2149 * eval.c (s_missing_body_expression): New static identifier.
2150
2151 (s_body): Removed.
2152
2153 (scm_m_expand_body): Fixed core dump when passing a body with
2154 defines, but without expressions (see additions to syntax.test).
2155 Use ASSERT_SYNTAX to signal syntax errors.
2156
2157 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
2158
2159 * eval.c (canonicalize_define): New static helper function.
2160
2161 (memoize_define, canonicalize_define): Extract handling of
2162 function currying to canonicalize_define.
2163
2164 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
2165
2166 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
2167 Make sure that error checking in debug mode is not worse than in
2168 standard mode.
2169
2170 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
2171
2172 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
2173 handled in scm_m_body any more, but rather in scm_m_lambda.
2174
2175 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
2176 scm_m_letrec, scm_m_expand_body): Check for validity is done by
2177 calling functions of scm_m_body.
2178
2179 (scm_m_lambda): Avoid unnecessary consing when creating the
2180 memoized code.
2181
2182 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
2183
2184 * eval.c (s_expression): Added comment.
2185
2186 (s_empty_combination, error_unbound_variable): New static
2187 identifiers.
2188
2189 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
2190 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
2191 signal syntax errors.
2192
2193 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
2194 scheme objects.
2195
2196 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2197
2198 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
2199 Grouped together with unmemocopy, without modifications.
2200
2201 (build_binding_list, unmemocopy): Renamed names of list arguments
2202 and variables to reflect the actual order of the list elements.
2203
2204 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
2205
2206 * eval.c (s_defun): New static identifier.
2207
2208 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
2209 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
2210 when creating the memoized code.
2211
2212 2003-10-19 Kevin Ryde <user42@zip.com.au>
2213
2214 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
2215
2216 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
2217 in accordance with R5RS, which just mpz_get_d doesn't really give.
2218
2219 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2220
2221 * eval.c (s_bad_slot_number): New static identifier.
2222
2223 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
2224 signal syntax errors. Avoid unnecessary consing when creating the
2225 memoized code.
2226
2227 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2228
2229 * eval.c (scm_m_cont, scm_m_at_call_with_values,
2230 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
2231 errors. Avoid unnecessary consing when creating the memoized
2232 code.
2233
2234 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
2235 standard case. Make sure line and file information are copied to
2236 every created expression.
2237
2238 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2239
2240 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
2241 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
2242 when creating the memoized code.
2243
2244 (scm_m_atbind): Reversed the order, in which the init expressions
2245 are stored and executed. The order of execution is now equal to
2246 the order in which the initializers of the let-forms are executed.
2247 Use check_bindings and transform_bindings.
2248
2249 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
2250 !SCM_NULLP. Added some comments.
2251
2252 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2253
2254 * eval.c: Sorted include files alphabetically.
2255
2256 (scm_m_begin): Added comment.
2257
2258 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
2259 unnecessary consing when creating the memoized code.
2260
2261 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
2262 syntax errors. Be more specific about the kind of error that was
2263 detected.
2264
2265 (scm_m_quote, unmemocopy): As an optimization, vector constants
2266 are now inserted unquoted into the memoized code. During
2267 unmemoization the quotes are added again to provide syntactically
2268 correct code.
2269
2270 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2271
2272 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
2273 scm_m_expand_body, check_bindings): Extracted syntax checking of
2274 bindings to new static function check_bindings.
2275
2276 (scm_m_let, memoize_named_let): Extracted handling of named let to
2277 new static function memoize_named_let.
2278
2279 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
2280 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
2281 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
2282 unnecessary consing when creating the memoized code.
2283
2284 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2285
2286 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
2287 static identifiers.
2288
2289 (s_clauses, s_formals, s_duplicate_formals): Removed.
2290
2291 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
2292 specific about the kind of error that was detected. Prepare for
2293 easier integration of changes for separated memoization.
2294
2295 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2296
2297 * eval.c (s_duplicate_binding): New static identifier.
2298
2299 (scm_m_case): Call scm_c_memq instead of implementing it inline.
2300
2301 (scm_m_define): Added comment about how we check for duplicate
2302 formals.
2303
2304 (scm_m_do): Added check for duplicate bindings.
2305
2306 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
2307 unnecessary consing when creating the memoized code.
2308
2309 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
2310 scm_c_improper_memq to c_improper_memq, since it is not exported.
2311
2312 (transform_bindings): Call scm_c_memq rather than
2313 scm_c_improper_memq.
2314
2315 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
2316
2317 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2318
2319 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
2320 static identifiers.
2321
2322 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
2323 specific about the kind of error that was detected. Avoid use of
2324 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
2325 code, this way also making sure that file name, line number
2326 information etc. remain available.
2327
2328 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2329
2330 * eval.c (memoize_as_thunk_prototype): New static function.
2331
2332 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
2333 Avoid unnecessary consing when creating the memoized code.
2334
2335 2003-10-12 Kevin Ryde <user42@zip.com.au>
2336
2337 * list.c (scm_append): Track argument number and use in error.
2338
2339 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2340
2341 * eval.c (s_missing_expression, s_bad_variable): New static
2342 identifiers.
2343
2344 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
2345 R5RS terminology for the naming of variables. Be more specific
2346 about the kind of error that was detected. Make sure file name,
2347 line number etc. are added to all freshly created expressions.
2348 Avoid unnecessary consing when creating the memoized code.
2349
2350 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2351
2352 * eval.c (s_extra_expression, s_misplaced_else_clause,
2353 s_bad_cond_clause, s_missing_recipient): New static identifiers.
2354
2355 (s_extra_case_clause): Removed.
2356
2357 (scm_m_case, scm_m_cond): If a clause appears after an else
2358 clause, report a misplaced else clause.
2359
2360 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
2361 specific about the kind of error that was detected. Handle bound
2362 'else and '=>. Avoid unnecessary consing when creating the
2363 memoized code.
2364
2365 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
2366 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
2367 syntactic keyword '=>.
2368
2369 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2370
2371 * eval.c (scm_m_case): Allow empty lists of case labels.
2372
2373 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2374
2375 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
2376
2377 * print.c (scm_isymnames): Add names for the new memoizer codes.
2378
2379 * eval.c (s_missing_clauses, s_bad_case_clause,
2380 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
2381 literal_p): New static identifiers.
2382
2383 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
2384 specific about the kind of error that was detected. Check for
2385 duplicate case labels. Handle bound 'else. Avoid unnecessary
2386 consing when creating the memoized code.
2387
2388 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
2389 the syntactic keyword 'else.
2390
2391 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2392
2393 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
2394 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
2395
2396 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
2397 unnecessary consing when creating the memoized code.
2398
2399 2003-10-09 Kevin Ryde <user42@zip.com.au>
2400
2401 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
2402 cast gives for values bigger than a long, or for nan or inf.
2403
2404 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
2405
2406 * smob.h (scm_make_smob_type): Made the declaration match the
2407 definition.
2408
2409 2003-10-07 Marius Vollmer <mvo@zagadka.de>
2410
2411 * goops.c, objects.h, smob.c, smob.h: Make type names char
2412 const * instead of char *. Thanks to Paul Jarc!
2413
2414 2003-10-02 Kevin Ryde <user42@zip.com.au>
2415
2416 * strports.c (scm_call_with_output_string): scm_get_output_string
2417 rather than scm_strport_to_string, so as to guard against the port
2418 having been closed by the called procedure. Reported by Nic Ferrier.
2419
2420 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2421
2422 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
2423
2424 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
2425 tags.h to deprecated.h.
2426
2427 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2428
2429 This set of patches introduces a new tc7 code scm_tc7_number for
2430 numbers. Bignums, reals and complex numbers are turned from smobs
2431 into subtypes of scm_tc7_number.
2432
2433 * tags.h (scm_tc7_number): New.
2434
2435 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
2436 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
2437 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
2438 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
2439 (scm_class_of), print.c (scm_iprin1), smob.c
2440 (scm_smob_prehistory): Don't handle bignums, reals and complex
2441 numbers as subtypes of scm_tc7_smob any more.
2442
2443 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
2444 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
2445
2446 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2447
2448 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
2449 sizeof (scm_t_complex) to determine the memory size of the
2450 malloc'd area for complex numbers.
2451
2452 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2453
2454 * numbers.c (scm_bigequal): Fixed.
2455
2456 2003-09-16 Marius Vollmer <mvo@zagadka.de>
2457
2458 * stime.c (scm_current_time): 'time' does not set errno so don't
2459 use SCM_SYSERROR for reporting errors.
2460
2461 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2462
2463 This set of patches eliminates the dependency between the
2464 implementation of evaluator specific memoization codes and special
2465 constants like #f, '() etc. ('flags'), which are not evaluator
2466 specific. The goal is to remove definitions of evaluator
2467 memoization codes completely from the public interface. This will
2468 make it possible to experiment more freely with optimizations of
2469 guile's internal representation of memoized code.
2470
2471 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
2472
2473 * print.c (iflagnames): New array, holding the printed names of
2474 guile's special constants ('flags').
2475
2476 (scm_isymnames): Now holds only the printed names of the
2477 memoization codes.
2478
2479 (scm_iprin1): Separate the handling of memoization codes and
2480 guile's special constants.
2481
2482 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
2483 SCM_IFLAGNUM): new
2484
2485 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
2486 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
2487 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
2488 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
2489 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
2490 values.
2491
2492 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
2493
2494 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
2495 tc9 macros and scm_tc9_flag.
2496
2497 2003-09-15 Marius Vollmer <mvo@zagadka.de>
2498
2499 * posix.c (scm_setgroups): Check that the gid list is not too
2500 long. Thanks to Paul Jarc!
2501
2502 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
2503
2504 * tags.h: Reduced the number of short instructions from 14 to 13.
2505 The typecode of the former 14th short instruction is now used to
2506 represent long instructions. Changed some comments to reflect
2507 this fact.
2508
2509 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
2510 previously used by SCM_IM_DEFINE.
2511
2512 (SCM_IM_DEFINE): Turned into a long instruction.
2513
2514 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
2515 instruction.
2516
2517 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
2518 code that is separate from all instructions, one level of dispatch
2519 for long instructions can be eliminated.
2520
2521 * print.c (scm_isymnames): Removed some commented code.
2522
2523 2003-09-12 Marius Vollmer <mvo@zagadka.de>
2524
2525 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
2526 compiler on IA64.
2527
2528 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
2529
2530 * modules.c (scm_module_reverse_lookup): Check that the obarray
2531 really is a hashtable and do nothing if not.
2532
2533 * inline.h: Use "extern inline" only with GCC. Use "static
2534 inline" else.
2535
2536 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
2537
2538 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
2539 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
2540
2541 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
2542 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
2543 deprecated.h.
2544
2545 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
2546
2547 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
2548 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
2549
2550 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
2551 0.0==some_expression to some_expression==0.0. The latter is
2552 better readable. The former is preferred by some people, since it
2553 leads to a compiler error when confusing == with =. However, when
2554 using gcc, a warning will be issued if in an if-statement an
2555 assigment appears. Since many Guile developers are using gcc,
2556 such errors will not remain unnoticed anyway. We can therefore
2557 focus on better readability.
2558
2559 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
2560
2561 * tags.h: Added description of Guile's type system. Removed some
2562 old and misleading comments.
2563
2564 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
2565
2566 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
2567 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
2568
2569 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
2570
2571 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
2572
2573 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
2574 respective SLOPPY macro.
2575
2576 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
2577
2578 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
2579 type string, not SCM_TYP7S.
2580
2581 2003-09-03 Kevin Ryde <user42@zip.com.au>
2582
2583 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
2584 2s-complement.
2585
2586 * stime.c (scm_strptime): Add comment about glibc strptime %s and
2587 current timezone requiring SCM_DEFER_INTS.
2588
2589 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
2590
2591 * script.c (scm_compile_shell_switches): Make -s switch optional
2592 if file to be loaded does not begin with a `-'. (Thanks to Aaron
2593 VanDevender for the patch!)
2594
2595 2003-08-30 Kevin Ryde <user42@zip.com.au>
2596
2597 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
2598 and to have non-integer types rejected as per other logical funcs.
2599
2600 2003-08-28 Kevin Ryde <user42@zip.com.au>
2601
2602 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
2603
2604 2003-08-23 Kevin Ryde <user42@zip.com.au>
2605
2606 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
2607 thread safe, and could take a long time too.
2608
2609 2003-08-22 Kevin Ryde <user42@zip.com.au>
2610
2611 * numbers.c (scm_difference): Correction to bignum - negative inum.
2612
2613 2003-08-14 Kevin Ryde <user42@zip.com.au>
2614
2615 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
2616 [__GNUC__]: Use volatile asm macros rather than a function call.
2617 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
2618 macros while defining functions.
2619
2620 * simpos.c (getenv): Use <stdlib.h> for prototype.
2621 (scm_system): In docstring, refer to status:exit-val rather than
2622 "functions above".
2623
2624 2003-08-09 Kevin Ryde <user42@zip.com.au>
2625
2626 * srcprop.c (scm_source_properties): Return plist from hash if it's a
2627 list set by source-properties! rather than an SRCPROPS object,
2628
2629 2003-07-29 Kevin Ryde <user42@zip.com.au>
2630
2631 * properties.c (scm_primitive_property_ref): In docstring, note
2632 parameters to not-found-proc, use hyphens rather than underscores for
2633 that parameter name.
2634 (scm_primitive_property_set_x): In docstring, VAL is the value
2635 parameter not CODE.
2636
2637 2003-07-27 Marius Vollmer <mvo@zagadka.de>
2638
2639 * print.c (scm_print_symbol_name): handle more weird characters by
2640 escaping the symbol name properly. Thanks to Paul Jarc!
2641
2642 * posix.h (scm_setgroups): New prototype.
2643 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
2644 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
2645 Don't use SCM_WRITABLE_VELTS.
2646
2647 * gc.h (SCM_GC_SET_CELL_BVEC): New.
2648 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
2649 Matthias Koeppe!
2650
2651 * __scm.h (SCM_C_INLINE_KEYWORD): New.
2652 * numbers.c: Use it in place of SCM_C_INLINE so that the code
2653 compiles when SCM_C_INLINE is undefined.
2654
2655 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
2656
2657 * __scm.h: Reformulated the architecture and compiler properties
2658 in terms of properties of scm_t_bits and SCM variables rather than
2659 in terms of c standard types. This is since it is not known which
2660 of the standard types scm_t_bits and SCM variables will be defined
2661 to.
2662
2663 2003-07-24 Kevin Ryde <user42@zip.com.au>
2664
2665 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
2666 and real.
2667
2668 2003-07-18 Kevin Ryde <user42@zip.com.au>
2669
2670 * numbers.c (scm_product): In complex * bignum, correction to
2671 REAL/IMAG fetch, x is the complex, not y.
2672
2673 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2674
2675 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
2676 scm_inf_p test as Scheme values.
2677 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
2678 and a positive inum.
2679 Use GNU indentation style.
2680
2681 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2682
2683 * values.c (scm_values): Build lists of length 1 by using
2684 scm_list_1 instead of using scm_cons.
2685
2686 2003-07-10 Kevin Ryde <user42@zip.com.au>
2687
2688 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
2689 * list.c (scm_list_n): Ditto.
2690
2691 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
2692
2693 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
2694
2695 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
2696 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
2697 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
2698 the other using intptr_t.
2699
2700 2003-07-08 Kevin Ryde <user42@zip.com.au>
2701
2702 * numbers.c (scm_make_polar): Use sincos, when available.
2703 (scm_magnitude): Use hypot.
2704
2705 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
2706 @footnote since it doesn't go through to guile-procedures.txt.
2707
2708 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
2709 outside @var to quieten makeinfo, and use @code.
2710
2711 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2712
2713 * gc-malloc.c (decrease_mtrigger): new function
2714 (increase_mtrigger): new function, separate debug registering and
2715 mtrigger administration.
2716 (scm_gc_realloc): bugfix: do mtrigger administration before the
2717 actual realloc, for the realloc might invalidate a GC-d segment of
2718 memory. Thanks to Sam Hocevar for pointing this out.
2719 (scm_gc_realloc): use scm_malloc_reregister instead of
2720 unregistering and registering in sequence.
2721
2722 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2723
2724 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
2725
2726 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2727
2728 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
2729 clauses.
2730
2731 2003-06-29 Marius Vollmer <mvo@zagadka.de>
2732
2733 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
2734 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
2735 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
2736 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
2737 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
2738 the release_1_6 branch.
2739
2740 2003-06-25 Stefan Jahn <stefan@lkcc.org>
2741
2742 * continuations.c: Redeclaration of getcontext() via the
2743 __asm__ ("getcontext") directive.
2744
2745 * continuations.h: Include <ucontext.h> instead of
2746 <sys/ucontext.h>.
2747
2748 2003-06-21 Kevin Ryde <user42@zip.com.au>
2749
2750 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
2751 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
2752 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
2753 available.
2754 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
2755 (isfinite): Remove, conflicts with C99 isfinite().
2756
2757 2003-06-19 Marius Vollmer <mvo@zagadka.de>
2758
2759 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
2760 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
2761 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
2762 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
2763 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
2764 the release_1_6 branch.
2765
2766 2003-06-14 Stefan Jahn <stefan@lkcc.org>
2767
2768 * threads.h: Redefined scm_getspecific() and scm_setspecific()
2769 to be functions instead of macros.
2770
2771 * threads.c: Conditionalized inclusion of <sys/time.h> and
2772 <unistd.h>.
2773 (scm_getspecific, scm_setspecific): Made these two function
2774 real part of the API.
2775
2776 * posix.c (s_scm_putenv): Added some code to make a
2777 (putenv "FOO="), i.e. setting an empty string, work also on
2778 Win32 systems. Thanks to Kevin Ryde for the proposal.
2779
2780 2003-06-12 Kevin Ryde <user42@zip.com.au>
2781
2782 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
2783 freebsd to comment about need to use unsetenv.
2784
2785 2003-06-02 Marius Vollmer <mvo@zagadka.de>
2786
2787 * ports.c (scm_peek_char): Safe the column of the port around the
2788 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
2789
2790 2003-06-07 Kevin Ryde <user42@zip.com.au>
2791
2792 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
2793 and friends required by scm_t_bits setups.
2794
2795 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
2796
2797 * tags.h (scm_tc2_int): Added.
2798
2799 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
2800 scm_tc2_int.
2801
2802 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
2803 scm_tcs_closures): Hard coded values replaced by symbolic ones.
2804
2805 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2806
2807 * eval.c: Partially undid my patch from 2003-05-31. This patch
2808 caused the segfault referenced in the previous changelog entry.
2809
2810 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2811
2812 * tags.h: Fixed comment about the immediate type code layout.
2813
2814 * eval.c: Fixed handling of non-special instructions. Without
2815 this patch, guile will segfault on (#\0) and similar instructions.
2816
2817 2003-06-05 Kevin Ryde <user42@zip.com.au>
2818
2819 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
2820 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
2821
2822 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
2823 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
2824
2825 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
2826
2827 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
2828 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
2829 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
2830 generalized it to apply not only to C level functions but also to
2831 scheme level functions.
2832
2833 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
2834 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
2835 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
2836 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
2837 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
2838 respectively.
2839
2840 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
2841 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
2842 eval.h into eval.c and a copy is placed into deprecated.h.
2843
2844 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
2845 into eval.c. This definition was not part of the API in any
2846 officially released version of guile and thus does not need to go
2847 through a phase of deprecation.
2848
2849 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
2850
2851 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
2852 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
2853 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
2854 definitions are make static and renamed from scm_s_xxx to s_xxx.
2855 In deprecated.c the original definitions are copied.
2856
2857 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
2858 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
2859 eval.h into eval.c and a copy (slightly modified to work in user
2860 code) is placed into deprecated.h.
2861
2862 * eval.c: Use the local static s_xxx definitions instead of the
2863 scm_s_xxx definitions throughout.
2864
2865 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
2866
2867 This set of patches separates the representation of the cxr family
2868 of functions (car, cdr etc.) from the dsubr family of functions
2869 (i. e. functions that take a double precision floating point
2870 argument). Further, the algorithm for handling the cxr function
2871 is improved.
2872
2873 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
2874 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
2875 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
2876 cosh, tanh), objects.c (scm_class_of), procprop.c
2877 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
2878 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
2879 typecode for the dsubr family of functions.
2880
2881 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
2882 ramap_dsubr.
2883
2884 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
2885 (scm_init_pairs): Make use of the (now usable) second cell element
2886 of a scm_tc7_cxr function to implement the cxr family of functions
2887 more efficiently.
2888
2889 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
2890
2891 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
2892 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
2893 end of an if-else-if-sequence of checks.
2894
2895 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2896
2897 * eval.c (SCM_CEVAL): Improved readability of call-with-values
2898 execution. Generalize apply_closure to apply_proc and use that
2899 for call-with-values.
2900
2901 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2902
2903 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
2904 a non closure.
2905
2906 2003-05-30 Stefan Jahn <stefan@lkcc.org>
2907
2908 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
2909 appropriately for mingw32 hosts.
2910
2911 * numbers.h: Defining copysign(), isnan() and finite() to
2912 be prefixed by a single '_' for mingw32 hosts.
2913
2914 2003-05-30 Kevin Ryde <user42@zip.com.au>
2915
2916 * numbers.c (z_negative_one): New variable.
2917 (scm_init_numbers): Initialize it.
2918 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
2919
2920 2003-05-29 Stefan Jahn <stefan@lkcc.org>
2921
2922 * win32-dirent.c: Use malloc() instead of scm_malloc().
2923
2924 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
2925 warning.
2926
2927 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
2928 mingw32 build.
2929
2930 * modules.c (s_scm_module_import_interface): Renamed local
2931 variable interface to _interface. Seems like 'interface'
2932 is a special compiler directive for the mingw32 compiler.
2933
2934 * mkstemp.c: Provide prototype to avoid compiler warning.
2935
2936 * load.c (s_scm_search_path): Fixed absolute and relative
2937 path detections for native Windows platforms.
2938
2939 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
2940 to build on mingw32).
2941
2942 * gc-freelist.c ("s_scm_map_free_list",
2943 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
2944
2945 * fports.c (fport_fill_input): Disable use of
2946 fport_wait_for_input() on Win32 platforms.
2947
2948 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
2949
2950 * Makefile.am: Modified some rules for cross compiling.
2951
2952 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2953
2954 * eval.c (SCM_CEVAL): In case of an application, all checks for a
2955 proper function object and the correct number of arguments are now
2956 performed in the application part of SCM_CEVAL.
2957
2958 (scm_badformalsp): Removed.
2959
2960 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2961
2962 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
2963
2964 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2965
2966 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
2967 always being false by inserting preprocessor conditional. (Thanks
2968 to Bruce Korb.)
2969
2970 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
2971 (void *) in order to avoid an aliasing warning; thanks to Bruce
2972 Korb.)
2973
2974 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
2975
2976 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
2977 SCM_STACK_PTR.
2978
2979 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
2980 thread->base --> t->base.
2981
2982 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
2983
2984 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2985
2986 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
2987 scm_variable_set_name_hint, scm_builtin_variable,
2988 scm_internal_with_fluids, scm_make_gsubr,
2989 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
2990 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
2991 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
2992 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
2993 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
2994 scm_make_subr_with_generic, scm_make_subr_opt,
2995 scm_call_catching_errors, scm_make_smob_type_mfpe,
2996 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
2997 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
2998 branch. Some have been slightly rewritten.
2999 (scm_i_object_chars, scm_i_object_length): New, to support
3000 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
3001
3002 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3003
3004 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
3005 names and inits in the memoized code of do.
3006
3007 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3008
3009 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
3010 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
3011 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
3012 a compilation error if error-on-warning is enabled).
3013
3014 2003-05-17 Marius Vollmer <mvo@zagadka.de>
3015
3016 * c-tokenize.lex: Gobble up complete lines after a '#'. This
3017 removes preprocessor directives from the snarfage that might
3018 otherwise confuse us. These directives appear when compiling with
3019 "-g3", for example.
3020
3021 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3022
3023 * ChangeLog: add my surname
3024
3025 * srcprop.c (scm_finish_srcprop): use
3026 scm_gc_register_collectable_memory()
3027 (scm_make_srcprops): idem.
3028
3029 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3030
3031 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
3032 wrap-around for scm_mtrigger
3033 (scm_gc_register_collectable_memory): abort on overflowing
3034 scm_mallocated().
3035
3036 2003-05-13 Kevin Ryde <user42@zip.com.au>
3037
3038 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
3039 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
3040
3041 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3042
3043 * backtrace.c (scm_display_error_message): Introduced fancy
3044 printing with max level 7 and length 10. (Purpose: avoid printing
3045 gigantic objects in error messages.)
3046
3047 * print.c, print.h (scm_i_port_with_print_state): New function.
3048
3049 * print.c (scm_iprin1, scm_printer_apply,
3050 scm_port_with_print_state): Use scm_i_port_with_print_state.
3051 (scm_simple_format): Modified not to destroy print states.
3052 (print_state_mutex): New mutex.
3053 (scm_make_print_state, scm_free_print_state, scm_prin1):
3054 Lock/unlock print_state_mutex.
3055
3056 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
3057 Use current names in definitions.
3058
3059 2003-05-10 Kevin Ryde <user42@zip.com.au>
3060
3061 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
3062
3063 * numbers.c (scm_integer_length): On negative bignums, adjust
3064 mpz_sizeinbase to account for it looking at absolute value where we
3065 want ones-complement.
3066
3067 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
3068 since we're only using the ulong return value, and x might not fit.
3069
3070 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3071
3072 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
3073 read. This will allow to make the definition in read.c static.
3074
3075 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3076
3077 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
3078 from evalext to eval. This will allow to make some of the
3079 definitions in eval.c static.
3080
3081 2003-05-06 Kevin Ryde <user42@zip.com.au>
3082
3083 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
3084 (scm_logcount): Use mpz_com, not mpz_neg.
3085
3086 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3087
3088 The purpose of this patch is to make guile's internal memoizers
3089 distinguishable from memoizing macros created on the scheme level
3090 or from user provided primitive memoizing macros. The reason is,
3091 that the internal memoizers are the only ones that are allowed to
3092 transform their scheme input into memoizer byte code, while all
3093 other memoizing macros may only transform scheme code into new
3094 scheme code.
3095
3096 To achieve this, a new macro type 'builtin-macro!' is introduced.
3097 Currently, 'builtin-macro!'s are handled as memoizing macros, but
3098 this will change when the memoizer and executor are separated.
3099
3100 * macros.[ch] (scm_i_makbimacro): New.
3101
3102 * macros.h (SCM_BUILTIN_MACRO_P): New.
3103
3104 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
3105
3106 * eval.c, goops.c: All of guile's primitive memoizing macros are
3107 primitive builtin-macros now.
3108
3109 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
3110 builtin-macros are handled equally to memoizing macros.
3111
3112 2003-05-04 Marius Vollmer <mvo@zagadka.de>
3113
3114 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
3115 work around a bug in GCC 2.95.2 but is now a bug in itself.
3116
3117 2003-05-02 Marius Vollmer <mvo@zagadka.de>
3118
3119 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
3120 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
3121 scm_tcs_symbols): New.
3122
3123 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3124
3125 * deprecated.h, deprecated.c (scm_protect_object,
3126 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
3127 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
3128 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
3129 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
3130 scm_ensure_user_module, scm_load_scheme_module, scm_port,
3131 scm_ptob_descriptor, scm_port_rw_active,
3132 scm_close_all_ports_except): New.
3133
3134 * ports.c (scm_c_port_for_each): New function, mostly copied from
3135 scm_port_for_each.
3136 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
3137 * ports.h (scm_c_port_for_each): New prototype.
3138
3139 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3140
3141 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
3142 macro was introduced in anticipation of GOOPS method compilation
3143 code.)
3144
3145 * goops.c: Removed binding of @dispatch.
3146
3147 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
3148
3149 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
3150 instructions that bind the macros on the scheme level back to
3151 goops.c in order to make sure again that the bindings go into the
3152 (oop goops) module and are not visible from the outside.
3153
3154 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
3155
3156 * eval.c: Non functional change: Separated R5RS and non-R5RS
3157 macros into different sections of the file and ordered the
3158 memoizers alphabetically.
3159
3160 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
3161
3162 * eval.c (scm_ilookup): Rewritten to improve readability.
3163
3164 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
3165
3166 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
3167 Partially reverted patch from 2003-04-23 in oder to find a better
3168 compromise between readability and debuggability.
3169
3170 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3171
3172 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
3173 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
3174 definitions of the special goops memoizers from goops.[ch] to
3175 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
3176 throughout guile.
3177
3178 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3179
3180 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
3181
3182 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
3183
3184 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
3185
3186 * ioext.c (scm_fdes_to_ports): Ditto.
3187
3188 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
3189 lock/unlock scm_i_port_table_mutex.
3190
3191 * strports.c (scm_mkstrport): Ditto.
3192
3193 * ports.c (scm_void_port, scm_port_for_each): Ditto.
3194
3195 * fports.c (scm_fdes_to_port): Ditto.
3196
3197 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
3198
3199 This set of patches contains no functional changes, only debatable
3200 minor stylistic ones. Still, in order to prepare a patch between
3201 my local copy and the CVS version, I decided to submit the changes
3202 below. Then, the patch will hopefully only contain relevant
3203 modifications :-)
3204
3205 * eval.c (iqq): Added const specifier.
3206
3207 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3208 Use NULL instead of 0 to indicate that a pointer is returned.
3209 Removed some misleading 'fall through' comments.
3210
3211 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
3212 Split up long expressions into smaller ones to be more debugging
3213 friendly.
3214
3215 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
3216
3217 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
3218 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
3219 rather than casting to SCM.
3220
3221 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
3222
3223 * sort.c, pairs.h: Removed unnecessary includes.
3224
3225 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
3226
3227 * sort.c: Replaced hand-made trampline code by the new official
3228 mechanism from eval.c. This fixes a segfault in the new test file
3229 sort.test.
3230
3231 (quicksort, compare_function, scm_restricted_vector_sort_x,
3232 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
3233 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
3234 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
3235 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
3236 eval.c.
3237
3238 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
3239 cmp_fun_t): Removed.
3240
3241 (compare_function): Added.
3242
3243 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
3244 arithmetics with index arithmetics. Changed quicksort to work on
3245 an array of SCM values instead of an array of characters. Avoid
3246 bytewise copying of SCM elements. Avoid allocating memory on the
3247 stack with alloca. Fixed some comments.
3248
3249 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3250
3251 * eval.c (EXTEND_ENV): Eliminated.
3252
3253 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
3254 EXTEND_ENV.
3255
3256 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3257
3258 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
3259
3260 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
3261 compiling with SCM_DEBUG==1 by moving definition behind prototype.
3262
3263 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
3264 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
3265 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
3266 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
3267 functions such that they check if the object is a non-immediate.
3268 Further, renamed identifiers to use the scm_dbg_ prefix and made
3269 their inclusion into the lib dependent of the
3270 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
3271
3272 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3273
3274 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
3275 debug option.
3276
3277 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3278
3279 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
3280 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
3281 any calls to SCM_NCONSP any more.
3282
3283 * unif.c (l2ra): Eliminate redundant check.
3284
3285 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3286
3287 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
3288 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
3289 SCM_NNULLP. Now, guile itself does not include any calls to
3290 SCM_NNULLP any more.
3291
3292 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3293
3294 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
3295 scm_copy_tree): Place assignment expressions which are part of
3296 other expressions into an expression of their own.
3297
3298 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3299
3300 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
3301 compare SCM values with !=.
3302
3303 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3304
3305 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
3306 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
3307 and definition of the memoizer for the generalized set! macro from
3308 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
3309 define the macro object.
3310
3311 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
3312 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
3313 eval.c, it is made static and renamed to s_set_x.
3314
3315 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
3316 over SCM_N<foo>.
3317
3318 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3319
3320 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
3321 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
3322 to undefineds and registered the object as a permanent object.
3323
3324 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
3325 static in eval.c, renamed it to f_apply and registered the object
3326 as a permanent object.
3327
3328 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3329
3330 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
3331 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
3332
3333 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3334
3335 * numbers.c (scm_logtest): Fixed argument bug in the call to
3336 mpz_and, which showed up when compiling with SCM_DEBUG defined.
3337
3338 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3339
3340 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
3341 type errors that showed up when compiling with SCM_DEBUG defined.
3342
3343 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3344
3345 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
3346 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
3347 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
3348 fix compile errors with --disable-deprecated.
3349
3350 2003-04-17 Rob Browning <rlb@defaultvalue.org>
3351
3352 * numbers.c (scm_integer_expt): fix case where we were declaring
3353 vars in the middle of a statement block. Thanks to Thamer
3354 Al-Harbash.
3355
3356 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3357
3358 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
3359 change.
3360
3361 * eq.c (scm_eqv_p): Turned into a primitive generic.
3362
3363 2003-04-16 Rob Browning <rlb@defaultvalue.org>
3364
3365 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
3366 Thanks to Boyd Gerber.
3367 Added check for __arm__ in addition to arm for LINUX and copied
3368 __s390__ defines from upstream libgc. Thanks to James Treacy for
3369 reporting the problems.
3370
3371 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
3372
3373 * socket.c: use SCM_CHAR_BIT.
3374
3375 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
3376
3377 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
3378
3379 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3380
3381 * feature.c (scm_init_feature): Always add threads feature.
3382
3383 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3384
3385 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
3386 scm_at_assert_bound_ref. (We don't want the unbound check. See
3387 oop/goops/active-slot.scm.)
3388
3389 2003-04-14 Rob Browning <rlb@defaultvalue.org>
3390
3391 * tags.h: scm_t_intptr should have been intptr_t.
3392
3393 2003-04-13 Rob Browning <rlb@defaultvalue.org>
3394
3395 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
3396 test. Instead use
3397 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
3398 as gc_os_dep.c suggests is appropriate.
3399
3400 * goops.c (prep_hashsets): make static to match prototype.
3401 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
3402 Chin.
3403
3404 * c-tokenize.lex: remove trailing comma from enum. Thanks to
3405 Albert Chin.
3406
3407 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
3408 Klausner.
3409
3410 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3411
3412 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
3413 indicated through extra fields in getters-n-setters.
3414 (scm_add_slot): Adapted to new format of getters_n_setters slot.
3415 (Thanks to Andy Wingo.)
3416
3417 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3418
3419 * gc-segment.c: add comment
3420
3421 2003-04-07 Rob Browning <rlb@defaultvalue.org>
3422
3423 * debug.h: change "id" arg name to "info_id" to avoid objective-c
3424 clash.
3425
3426 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
3427 and add regression test to standalone/.
3428
3429 2003-04-06 Rob Browning <rlb@defaultvalue.org>
3430
3431 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
3432 Thanks to Dale P. Smith.
3433
3434 * random.c: #include gmp.h.
3435 (scm_c_random_bignum): normalize result on return.
3436
3437 * init.c: #include gmp.h.
3438
3439 * numbers.h: remove the gmp.h #include (not needed now).
3440
3441 * posix.h: change occurences of "id" to something else so we don't
3442 cause trouble when included via objective-c (can't hurt, might
3443 help). Still have usage in debug.h, though.
3444
3445 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3446
3447 * random.c (scm_c_random_bignum): Don't generate a random number
3448 equal to m (the second argument of scm_c_random_bignum); only
3449 generate numbers in the range 0 <= r < m.
3450 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
3451 scm_var_random_state.
3452
3453 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
3454 clause.
3455
3456 2003-04-05 Rob Browning <rlb@defaultvalue.org>
3457
3458 * modules.c (scm_module_import_interface): move declaration of
3459 uses before any code.
3460
3461 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3462
3463 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
3464 not top_srcdir.
3465
3466 * hashtab.c (rehash_after_gc): Clear to_rehash list before
3467 processing it in order to avoid an infinite loop.
3468
3469 * print.c (scm_prin1): Remember old state of pstate->writingp.
3470
3471 2003-04-05 Marius Vollmer <mvo@zagadka.de>
3472
3473 * Changed license terms to the plain LGPL thru-out.
3474
3475 2003-04-04 Rob Browning <rlb@defaultvalue.org>
3476
3477 * socket.c (FLIPCPY_NET_HOST_128): new macro.
3478 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
3479 rewrite to handle GMP bignums.
3480
3481
3482 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
3483
3484 * ports.c (scm_getc): minor tweak.
3485
3486 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
3487 rewrite to handle GMP bignums.
3488
3489 * numbers.c: rewrite *many* functions to handle GMP bignums.
3490
3491 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
3492 handle GMP bignums.
3493
3494 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
3495
3496 * init.c (check_config): remove SCM_BIGDIG conditionals.
3497 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
3498
3499 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
3500
3501 * eval.c: remove SCM_BIGDIG conditionals.
3502
3503 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
3504
3505 2003-03-31 Rob Browning <rlb@defaultvalue.org>
3506
3507 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
3508 to Kevin Ryde.)
3509
3510 2003-03-27 Rob Browning <rlb@defaultvalue.org>
3511
3512 * threads.h: fix various preprocessor usages of new public
3513 symbols to expect 0 or 1 values rather than 1 or undefined.
3514 i.e. change #ifdef to #if, etc.
3515
3516 * threads.c: fix various preprocessor usages of new public
3517 symbols to expect 0 or 1 values rather than 1 or undefined.
3518 i.e. change #ifdef to #if, etc.
3519
3520 * tags.h: fix various preprocessor usages of new public
3521 symbols to expect 0 or 1 values rather than 1 or undefined.
3522 i.e. change #ifdef to #if, etc.
3523
3524 * stacks.c: fix various preprocessor usages of new public
3525 symbols to expect 0 or 1 values rather than 1 or undefined.
3526 i.e. change #ifdef to #if, etc.
3527
3528 * stackchk.h: fix various preprocessor usages of new public
3529 symbols to expect 0 or 1 values rather than 1 or undefined.
3530 i.e. change #ifdef to #if, etc.
3531
3532 * stackchk.c: fix various preprocessor usages of new public
3533 symbols to expect 0 or 1 values rather than 1 or undefined.
3534 i.e. change #ifdef to #if, etc.
3535
3536 * sort.c: fix various preprocessor usages of new public
3537 symbols to expect 0 or 1 values rather than 1 or undefined.
3538 i.e. change #ifdef to #if, etc.
3539
3540 * read.c: fix various preprocessor usages of new public
3541 symbols to expect 0 or 1 values rather than 1 or undefined.
3542 i.e. change #ifdef to #if, etc.
3543
3544 * random.c: fix various preprocessor usages of new public
3545 symbols to expect 0 or 1 values rather than 1 or undefined.
3546 i.e. change #ifdef to #if, etc.
3547
3548 * print.c: fix various preprocessor usages of new public
3549 symbols to expect 0 or 1 values rather than 1 or undefined.
3550 i.e. change #ifdef to #if, etc.
3551
3552 * objects.c: fix various preprocessor usages of new public
3553 symbols to expect 0 or 1 values rather than 1 or undefined.
3554 i.e. change #ifdef to #if, etc.
3555
3556 * numbers.h: fix various preprocessor usages of new public
3557 symbols to expect 0 or 1 values rather than 1 or undefined.
3558 i.e. change #ifdef to #if, etc.
3559
3560 * null-threads.c: fix various preprocessor usages of new public
3561 symbols to expect 0 or 1 values rather than 1 or undefined.
3562 i.e. change #ifdef to #if, etc.
3563
3564 * lang.c: fix various preprocessor usages of new public
3565 symbols to expect 0 or 1 values rather than 1 or undefined.
3566 i.e. change #ifdef to #if, etc.
3567
3568 * lang.h: fix various preprocessor usages of new public
3569 symbols to expect 0 or 1 values rather than 1 or undefined.
3570 i.e. change #ifdef to #if, etc.
3571
3572 * iselect.h: fix various preprocessor usages of new public
3573 symbols to expect 0 or 1 values rather than 1 or undefined.
3574 i.e. change #ifdef to #if, etc.
3575
3576 * init.c: fix various preprocessor usages of new public
3577 symbols to expect 0 or 1 values rather than 1 or undefined.
3578 i.e. change #ifdef to #if, etc.
3579
3580 * gh_data.c: fix various preprocessor usages of new public
3581 symbols to expect 0 or 1 values rather than 1 or undefined.
3582 i.e. change #ifdef to #if, etc.
3583
3584 * gh.h: fix various preprocessor usages of new public
3585 symbols to expect 0 or 1 values rather than 1 or undefined.
3586 i.e. change #ifdef to #if, etc.
3587
3588 * gen-scmconfig.c: change most new public symbols to be defined to
3589 0 or 1 rather than being either 1 or undefined.
3590
3591 * gc_os_dep.c: fix various preprocessor usages of new public
3592 symbols to expect 0 or 1 values rather than 1 or undefined.
3593 i.e. change #ifdef to #if, etc.
3594 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
3595
3596 * gc.h: fix various preprocessor usages of new public
3597 symbols to expect 0 or 1 values rather than 1 or undefined.
3598 i.e. change #ifdef to #if, etc.
3599
3600 * gc-card.c: fix various preprocessor usages of new public
3601 symbols to expect 0 or 1 values rather than 1 or undefined.
3602 i.e. change #ifdef to #if, etc.
3603
3604 * gc-mark.c: fix various preprocessor usages of new public
3605 symbols to expect 0 or 1 values rather than 1 or undefined.
3606 i.e. change #ifdef to #if, etc.
3607
3608 * feature.c: fix various preprocessor usages of new public
3609 symbols to expect 0 or 1 values rather than 1 or undefined.
3610 i.e. change #ifdef to #if, etc.
3611
3612 * evalext.c: fix various preprocessor usages of new public
3613 symbols to expect 0 or 1 values rather than 1 or undefined.
3614 i.e. change #ifdef to #if, etc.
3615
3616 * eval.h: fix various preprocessor usages of new public
3617 symbols to expect 0 or 1 values rather than 1 or undefined.
3618 i.e. change #ifdef to #if, etc.
3619
3620 * eval.c: fix various preprocessor usages of new public
3621 symbols to expect 0 or 1 values rather than 1 or undefined.
3622 i.e. change #ifdef to #if, etc.
3623
3624 * eq.c: fix various preprocessor usages of new public
3625 symbols to expect 0 or 1 values rather than 1 or undefined.
3626 i.e. change #ifdef to #if, etc.
3627
3628 * coop.c: fix various preprocessor usages of new public
3629 symbols to expect 0 or 1 values rather than 1 or undefined.
3630 i.e. change #ifdef to #if, etc.
3631
3632 * coop-threads.c: fix various preprocessor usages of new public
3633 symbols to expect 0 or 1 values rather than 1 or undefined.
3634 i.e. change #ifdef to #if, etc.
3635
3636 * coop-pthreads.c: fix various preprocessor usages of new public
3637 symbols to expect 0 or 1 values rather than 1 or undefined.
3638 i.e. change #ifdef to #if, etc.
3639
3640 * coop-defs.h: fix various preprocessor usages of new public
3641 symbols to expect 0 or 1 values rather than 1 or undefined.
3642 i.e. change #ifdef to #if, etc.
3643
3644 * convert.i.c: fix various preprocessor usages of new public
3645 symbols to expect 0 or 1 values rather than 1 or undefined.
3646 i.e. change #ifdef to #if, etc.
3647
3648 * continuations.c: fix various preprocessor usages of new public
3649 symbols to expect 0 or 1 values rather than 1 or undefined.
3650 i.e. change #ifdef to #if, etc.
3651
3652 * _scm.h: fix various preprocessor usages of new public symbols to
3653 expect 0 or 1 values rather than 1 or undefined. i.e. change
3654 #ifdef to #if, etc.
3655
3656 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3657
3658 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
3659
3660 * deprecated.c, deprecated.h: New files, to collect deprecated
3661 things in one place.
3662 * Makefile.am: Added them in all the right places.
3663
3664 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
3665 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
3666 builds work.
3667 (DOT_X_FILES): Removed "iselect.x".
3668 (DOT_DOC_FILES): Removed "iselect.doc".
3669
3670 2003-03-25 Rob Browning <rlb@defaultvalue.org>
3671
3672 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
3673 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
3674
3675 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
3676
3677 * vports.c: #include <config.h> if HAVE_CONFIG_H.
3678
3679 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
3680 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
3681
3682 * threads.h: replace usage of struct timespect with
3683 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
3684 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
3685 favor of scm_t_timespec from scmconfig.h.
3686
3687 * threads.c: move libguile/_scm.h include to the top so we pick up
3688 any critical defines like _GNU_SOURCE early. Replace usage of
3689 struct timespect with scm_t_timespec. Replace usage of
3690 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
3691 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
3692
3693 * threads-plugin.h: replace usage of struct timespect with
3694 scm_t_timespec.
3695
3696 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
3697 usage of struct timespect with scm_t_timespec.
3698
3699 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
3700 HAVE_INTTYPES_H handling to scmconfig.h. #include
3701 "libguile/__scm.h". Rework handling for scm_t_bits,
3702 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
3703 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
3704 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
3705 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
3706 SCM_HAVE_ARRAYS.
3707
3708 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
3709
3710 * struct.c: #include <config.h> if HAVE_CONFIG_H.
3711
3712 * strports.c: #include <config.h> if HAVE_CONFIG_H.
3713
3714 * strop.c: #include <config.h> if HAVE_CONFIG_H.
3715
3716 * stime.h: move handling of time related headers to scmconfig.h.
3717
3718 * stime.c: #include <config.h> if HAVE_CONFIG_H.
3719
3720 * stacks.c: replace usage of STACK_GROWS_UP with
3721 SCM_STACK_GROWS_UP.
3722
3723 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
3724 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3725
3726 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
3727 of uint32 and HAVE_UINT_32 with scm_t_int32.
3728
3729 * smob.c: #include <config.h> if HAVE_CONFIG_H.
3730
3731 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
3732
3733 * script.c: #include <config.h> if HAVE_CONFIG_H.
3734
3735 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
3736
3737 * scmconfig.h.top: new file -- preamble for scmconfig.h.
3738
3739 * rw.c: #include <config.h> if HAVE_CONFIG_H.
3740
3741 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
3742
3743 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3744
3745 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
3746
3747 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
3748 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
3749 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
3750 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3751
3752 * ramap.c: replace usage of HAVE_LONG_LONGS with
3753 "SCM_SIZEOF_LONG_LONG != 0".
3754
3755 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
3756 "libguile/scmconfig.h".
3757
3758 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
3759
3760 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3761 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
3762
3763 * posix.c: #include <config.h> if HAVE_CONFIG_H.
3764
3765 * ports.c: #include <config.h> if HAVE_CONFIG_H.
3766
3767 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3768
3769 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
3770 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
3771 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
3772 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
3773 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
3774 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
3775 "SCM_SIZEOF_LONG_LONG != 0".
3776
3777 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
3778 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
3779 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
3780 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
3781
3782 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
3783
3784 * null-threads.h: replace usage of struct timespect with
3785 scm_t_timespec.
3786
3787 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
3788
3789 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
3790 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
3791 scm_t_uint64 and rename usages.
3792
3793 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
3794
3795 * load.c: #include <config.h> if HAVE_CONFIG_H.
3796
3797 * iselect.h: move handling of time related headers to scmconfig.h.
3798 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
3799 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
3800 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
3801
3802 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
3803 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
3804 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
3805
3806 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
3807
3808 * inline.h: #include "libguile/__scm.h" at the top. Change code
3809 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
3810 what to do instead of creating a new public #define. Rename usage
3811 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
3812 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
3813 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
3814
3815 * inline.c: rearrange handling -- now we just #define
3816 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
3817 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
3818 appropriate, and we use that in inline.h along with the above
3819 define to determine how to respond.
3820
3821 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
3822 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3823
3824 * guile.c: #include <config.h> if HAVE_CONFIG_H.
3825
3826 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
3827 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3828
3829 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3830
3831 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
3832
3833 * gen-scmconfig.c: new file -- see comments in file for details.
3834
3835 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
3836
3837 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
3838 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
3839
3840 * gc.h: replace usage of SIZEOF_LONG with
3841 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
3842 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
3843 since we handle that in scmconfig.h now.
3844
3845 * gc.c: #include <config.h> if HAVE_CONFIG_H.
3846
3847 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
3848 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
3849 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
3850
3851 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
3852
3853 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3854 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
3855
3856 * fports.c: #include <config.h> if HAVE_CONFIG_H.
3857
3858 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
3859
3860 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
3861 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
3862
3863 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
3864
3865 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3866 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
3867
3868 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
3869 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
3870 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
3871 with "SCM_SIZEOF_LONG_LONG != 0".
3872
3873 * error.c: #include <config.h> if HAVE_CONFIG_H.
3874
3875 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
3876 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
3877 with "SCM_SIZEOF_LONG_LONG != 0".
3878
3879 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
3880
3881 * coop.c: replace usage of struct timespect with scm_t_timespec.
3882 #include <config.h> if HAVE_CONFIG_H.
3883
3884 * coop-threads.c: #include "libguile/_scm.h" early. Replace
3885 usage of struct timespect with scm_t_timespec. Replace usage of
3886 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
3887
3888 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
3889 usage of struct timespect with scm_t_timespec. Replace usage of
3890 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
3891
3892 * coop-defs.h: move handling of time related headers to
3893 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
3894 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
3895 timespect with scm_t_timespec.
3896
3897 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3898
3899 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3900
3901 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
3902 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
3903
3904 * continuations.c: move libguile/_scm.h include to the top so we
3905 pick up any critical defines like _GNU_SOURCE early.
3906
3907 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
3908
3909 * async.c: #include <config.h> if HAVE_CONFIG_H.
3910
3911 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
3912
3913 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
3914 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
3915
3916 * __scm.h: move libguile/scmconfig.h include up to the top, so
3917 we're sure to pick up any critical defines like _GNU_SOURCE early.
3918 #include <limits.h> removed in favor of scmconfig.h inclusion when
3919 appropriate. STDC_HEADERS based inclusion of stdlib.h,
3920 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
3921 scmconfig.h inclusion when appropriate. Various Win32 related
3922 definitions removed in favor of scmconfig.h inclusion when
3923 appropriate.
3924 (HAVE_UINTPTR_T): definition removed (see NEWS).
3925 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
3926 (HAVE_LONG_LONGS): definition removed (see NEWS).
3927 (HAVE_LONG_LONG): definition removed (see NEWS).
3928 (HAVE_PTRDIFF_T): definition removed (see NEWS).
3929
3930 * Makefile.am: scmconfig.h is now generated by building and
3931 running gen-scmconfig.h and capturing its output. gen-scmconfig
3932 uses config.h and the configure.in generated gen-scmconfig.h to
3933 decide what to output. See gen-scmconfig.c for details.
3934 (noinst_PROGRAMS): add gen-scmconfig.
3935 (gen_scmconfig_SOURCES): new variable.
3936 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
3937 cross-compiling right.
3938 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
3939 (BUILT_SOURCES): add scmconfig.h.
3940
3941 2003-03-19 Marius Vollmer <mvo@zagadka.de>
3942
3943 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
3944 Adrian Bunk. Thanks!
3945
3946 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3947
3948 * goops.c (make_class_from_template): New fourth arg:
3949 applicablep.
3950 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
3951 cpls.
3952
3953 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
3954
3955 * goops.c, objects.c, objects.h (scm_make_extended_class): New
3956 second arg: applicablep.
3957 (scm_i_inherit_applicable): New function.
3958
3959 * goops.c, goops.h (scm_class_applicable,
3960 scm_class_extended_accessor): New classes.
3961
3962 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3963
3964 * procs.c (scm_procedure_documentation): Removed redundant
3965 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
3966 predicates.
3967
3968 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3969
3970 * list.c, list.h (scm_filter, scm_filter_x): New functions.
3971
3972 * modules.c (scm_module_import_interface): New function.
3973
3974 * goops.c, goops.h (scm_class_accessor_method): Renamed from
3975 scm_class_accessor.
3976 (scm_class_accessor): New class.
3977
3978 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3979
3980 * goops.c (scm_primitive_generic_generic): Enable primitive
3981 generic if not enabled.
3982 (scm_sys_goops_loaded): Setup unextended primitive generics.
3983
3984 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
3985
3986 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
3987 snarf macros.
3988
3989 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
3990 testing example. All uses of SCM_GPROC should be converted.)
3991
3992 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
3993 scm_assoc.
3994
3995 * eq.c (scm_equal_p): Turned into a primitive generic.
3996
3997 2003-02-27 Rob Browning <rlb@defaultvalue.org>
3998
3999 * Makefile.am (scmconfig.h): new target -- generate file from
4000 ../config.h.
4001 (modinclude_HEADERS): remove version.h.
4002 (nodist_modinclude_HEADERS): add version.h.
4003
4004 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4005
4006 This fixes a serious GC bug, introduced during the latest
4007 reorganization of the GC, which disabled freeing of structs and
4008 GOOPS objects:
4009
4010 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
4011 SCM_EOL.
4012 (scm_struct_prehistory): Move scm_free_structs to
4013 scm_before_mark_c_hook.
4014
4015 * gc-card.c (sweep_card): Check that we haven't swept structs on
4016 this card before. That can happen if scm_i_sweep_all_segments has
4017 been called from some other place than scm_igc.
4018
4019 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4020
4021 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
4022 (since hash tables now adapt their size).
4023
4024 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
4025 (current number of prehistory bindings; hashtable code will select
4026 a prime which is greater than this value).
4027
4028 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
4029 (current number of initial symbols).
4030
4031 * properties.c (scm_init_properties): Don't specify size of
4032 scm_properties_whash.
4033
4034 * objprop.c (scm_init_objprop): Don't specify size of
4035 scm_object_whash.
4036
4037 * keywords.c (scm_init_keywords): Don't specify a hash table size.
4038
4039 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
4040
4041 The following changes introduce the use of resizable hash tables
4042 throughout Guile. It also renames the old *-hash-table* functions
4043 to *-alist-vector* and places them, together with the rest of the
4044 weak vector support, in the module (ice-9 weak-vector). We should
4045 probably introduce a new, better, API for weak references, for
4046 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
4047 look like and are used like ordinary pairs.)
4048
4049 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
4050 leaf_environment_fold, obarray_remove_all): Use hashtable
4051 accessors.
4052
4053 * gc.c (scm_init_storage): Moved hook initialization to
4054 scm_storage_prehistory.
4055 (scm_storage_prehistory): New function.
4056 (scm_igc): Added commentary about placement of
4057 scm_after_sweep_c_hook.
4058
4059 * gc-mark.c (scm_mark_all): Use hashtable accessors.
4060 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
4061 SCM_WVECT_WEAK_VALUE_P.
4062
4063 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
4064 functions.
4065 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
4066 Removed.
4067 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
4068 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
4069
4070 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
4071 calls to scm_storage_prehistory and scm_hashtab_prehistory.
4072
4073 * modules.c (module-reverse-lookup): Use hashtable accessors.
4074
4075 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
4076
4077 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
4078 scm_make_weak_value_alist_vector,
4079 scm_make_doubly_weak_alist_vector): New functions.
4080
4081 * weaks.c (scm_init_weaks_builtins): New function.
4082
4083 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
4084 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
4085 SCM_WVECT_NOSCAN_P): New macros.
4086
4087 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
4088 and SCM_WVECT_WEAK_VALUE_P.
4089
4090 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
4091 allocate_weak_vector and exported.
4092
4093 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4094
4095 * hashtab.c: Undid thread safety. (We decided that it's better to
4096 let the user explicitly protect the tables (or not) according what
4097 is suitable for the application.)
4098
4099 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4100
4101 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
4102 thread safe and handle resizing tables.
4103 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
4104 SCM_DEFER/ALLOW_INTS.
4105
4106 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4107
4108 * hashtab.c (scm_vector_to_hash_table,
4109 scm_c_make_resizing_hash_table, scm_make_hash_table): New
4110 functions.
4111 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
4112 safe and handle resizing tables.
4113
4114 * weaks.c (scm_make_weak_key_hash_table,
4115 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
4116 Size argument made optional. Return resizable table if not
4117 specified.
4118
4119 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4120
4121 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4122 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
4123
4124 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4125
4126 * debug.c (scm_procedure_source): Handle all objects for which
4127 procedure? is #t. (Thanks to Bill Schottstaedt.)
4128
4129 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4130
4131 * futures.c (mark_futures): Don't need to mark data of recycled
4132 futures.
4133 (scan_futures, cleanup_undead): Be smarter about marking
4134 futures---avoid unnecessary passes through future lists.
4135
4136 * futures.h, futures.c: New files; Introduced recycling of
4137 futures. For fine-grained threading this lifts performance to
4138 another level. We can now use parallelization in inner loops of
4139 Guile programs without impossible overhead.
4140
4141 * threads.h, threads.c: Moved futures to their own file.
4142
4143 * Makefile.am (libguile_la_SOURCES): Added futures.c.
4144 (DOT_X_FILES): Added futures.x.
4145 (DOT_DOC_FILES): Added futures.doc.
4146 (modinclude_HEADERS): Added futures.h.
4147
4148 * threads.c, threads.h (scm_i_create_thread): Renamed from
4149 create_thread and made global.
4150
4151 * futures.c (scm_make_future): New procedure.
4152
4153 * eval.c: #include "libguile/futures.h".
4154
4155 * init.c: #include "futures.h"
4156 (scm_init_guile_1): Call scm_init_futures.
4157
4158 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
4159
4160 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
4161
4162 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
4163 functions.
4164
4165 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
4166
4167 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4168
4169 * threads.c (create_thread): Don't unwind dynwind chain of parent
4170 thread before creation. Just start the new thread with an empty
4171 dynwind chain.
4172
4173 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4174
4175 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
4176
4177 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4178
4179 * threads.c (scm_timed_wait_condition_variable): Support timed
4180 waiting also for simple condition variables.
4181
4182 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
4183 of calling the procedure change-object-class.
4184
4185 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4186
4187 * ramap.c (scm_ramapc): Typo in error message.
4188
4189 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4190
4191 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
4192 slots with instance allocation.
4193
4194 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
4195 class.
4196 (scm_compute_applicable_methods): Use scm_generic_function_methods.
4197
4198 * goops.c (scm_generic_function_methods): Support extended
4199 generic functions.
4200
4201 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4202
4203 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
4204 Thanks to Neil for pointing this out!
4205
4206 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
4207
4208 * lang.h: Remove declarations matching definitions removed from
4209 lang.c (just below).
4210
4211 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
4212
4213 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
4214 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
4215 and already commented out.
4216
4217 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
4218 scm_lreadparen): Support reading vectors with Elisp syntax if
4219 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
4220 is not currently defined, and there isn't even a configure switch
4221 to enable it yet.)
4222
4223 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
4224
4225 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
4226 builds work.
4227 (EXTRA_DIST): Added version.h.in.
4228
4229 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4230
4231 This change makes it possible for one thread to do lazy sweeping
4232 while other threads are running. Now only the mark phase need to
4233 have all threads asleep. We should look further into this issue.
4234 Presently, I've put the locking of scm_i_sweep_mutex at
4235 "conservative" places due to my current lack of knowledge about
4236 the garbage collector. Please feel free to restrict these regions
4237 further to allow for maximal parallelism!
4238
4239 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
4240
4241 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
4242 scm_gc_register_collectable_memory): Substitute locking of
4243 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
4244 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
4245 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
4246 the single-thread section (which now only contains the mark
4247 phase).
4248 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
4249 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
4250
4251 * threads.c (gc_section_mutex): Removed.
4252
4253 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4254
4255 * threads.c (create_thread): Clear parent field in root state in
4256 order not to unnecessarily remember dead threads.
4257
4258 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
4259 (scm_trampoline_1, scm_trampoline_2): Use them.
4260
4261 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4262
4263 Partial introduction of real plugin interface.
4264
4265 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
4266 (EXTRA_DIST): Added threads-plugin.c.
4267
4268 * threads-plugin.h, threads-plugin.c: New files.
4269
4270 * threads.h: #include "libguile/threads-plugin.h".
4271
4272 * threads.c: #include "libguile/threads-plugin.c".
4273
4274 * pthread-threads.c: Temporarily remove debugging functions.
4275
4276 * threads.c, threads.h (scm_yield): Added back.
4277
4278 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4279
4280 * threads.c (really_launch): Detach before unlocking
4281 thread_admin_mutex in order not to risk being joined.
4282 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
4283 thread_admin_mutex locked during GC.
4284
4285 * pthread-threads.c, pthread-threads.h: Improvements to debugging
4286 functions.
4287
4288 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4289
4290 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
4291 support for debugging mutex operations.
4292
4293 * threads.c (scm_thread): Removed filed joining_threads.
4294 (thread_print): Print thread number as well as address of thread
4295 structure.
4296 (scm_join_thread): Bugfix.
4297 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
4298 scm_timed_wait_condition_variable, scm_signal_condition_variable,
4299 scm_broadcast_condition_variable): Use the low-level API.
4300 (scm_all_threads): Return copy of thread list (to prevent
4301 unintended destruction).
4302 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
4303
4304 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
4305 pthread "native" recursive mutex support.
4306
4307 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4308
4309 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
4310 Simply lock a thread C API recursive mutex.
4311 (SCM_NONREC_CRITICAL_SECTION_START,
4312 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
4313 SCM_REC_CRITICAL_SECTION_END): Removed.
4314
4315 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
4316 direct calls to scm_rec_mutex_lock / unlock around the three calls
4317 to scm_m_expand_body.
4318
4319 * eval.c, eval.h (promise_free): New function.
4320 (scm_force): Rewritten; Now thread-safe; Removed
4321 SCM_DEFER/ALLOW_INTS.
4322
4323 * pthread-threads.h: Added partially implemented plugin interface
4324 for recursive mutexes. These are, for now, only intended to be
4325 used internally within the Guile implementation.
4326
4327 * pthread-threads.c: New file.
4328
4329 * threads.c: Conditionally #include "pthread-threads.c".
4330
4331 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
4332 thread-safe;
4333
4334 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
4335 SCM_GLOBAL_REC_MUTEX): New macros.
4336
4337 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
4338 macros---use mutexes instead.
4339
4340 * tags.h (SCM_IM_FUTURE): New tag.
4341
4342 * eval.c (scm_m_future): New primitive macro.
4343 (SCM_CEVAL): Support futures.
4344 (unmemocopy): Support unmemoization of futures.
4345
4346 * print.c (scm_isymnames): Name of future isym.
4347
4348 * version.c: Unmade some changes to my private copy that got
4349 committed by mistake.
4350
4351 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4352
4353 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
4354 2002-12-10.
4355
4356 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
4357
4358 * gc.c (scm_gc_sweep): Call it here instead, which is a more
4359 logical place.
4360
4361 * threads.c (create_thread): Remember root object until the handle
4362 of the new thread is on all_threads list.
4363
4364 * root.c (scm_make_root): Moved copying of fluids until after
4365 creation of root handle so that the fluids are GC protected. Also
4366 removed the critical section.
4367
4368 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4369
4370 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
4371
4372 * gc-malloc.c (malloc_mutex): New mutex.
4373 (scm_gc_malloc_prehistory): Initialize it.
4374 (scm_realloc): Serialize call to realloc
4375 (scm_calloc): Same for calloc.
4376 Thanks to Wolfgang Jaehrling!
4377 (Now we have to make sure all calls to malloc/realloc are made
4378 through scm_malloc.)
4379
4380 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
4381
4382 * threads.c (really_launch): Release heap (to prevent deadlock).
4383 (create_thread): Release heap before locking thread admin mutex.
4384
4385 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4386
4387 * threads.c (scm_i_thread_invalidate_freelists): New
4388 function.
4389
4390 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
4391
4392 * modules.c (scm_export): Inserted a return statement.
4393
4394 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4395
4396 * modules.c (scm_export): new function
4397
4398 * gc-card.c: add a note about malloc()/free() overhead.
4399
4400 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4401
4402 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
4403 in srcdir.
4404
4405 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4406
4407 These changes remove scm_ints_disabled (which hasn't has any
4408 effect in Guile for quite some time).
4409
4410 * async.c, error.h (scm_ints_disabled): Removed.
4411
4412 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
4413 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
4414 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
4415 (old_ints): Removed.
4416
4417 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
4418 critical section.
4419 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
4420 SCM_ALLOW_INTS.
4421
4422 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4423
4424 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
4425 Removed accidental #if 0 around these functions.
4426
4427 These changes are the start of support for preemptive
4428 multithreading. Marius and I have agreed that I commit this code
4429 into the repository although it isn't thoroughly tested and surely
4430 introduces many bugs. The bugs should only be exposed when using
4431 threads, though. Signalling and error handling for threads is
4432 very likely broken. Work on making the implementation cleaner and
4433 more efficient is needed.
4434
4435 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
4436 (SCM_NONREC_CRITICAL_SECTION_START,
4437 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
4438 SCM_REC_CRITICAL_SECTION_END): New macros.
4439 (SCM_CRITICAL_SECTION_START/END): Defined here.
4440
4441 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
4442 the three calls to scm_m_expand_body.
4443
4444 * gc.h: #include "libguile/pthread-threads.h";
4445 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
4446
4447 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
4448 scm_t_key;
4449
4450 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
4451 access.
4452
4453 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
4454
4455 * gc-freelist.c, threads.c (really_launch): Use
4456 SCM_FREELIST_CREATE.
4457
4458 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
4459
4460 * gc.c (scm_i_expensive_validation_check, scm_gc,
4461 scm_gc_for_newcell): Put threads to sleep before doing GC-related
4462 heap administration so that those pieces of code are executed
4463 single-threaded. We might consider rewriting these code sections
4464 in terms of a "call_gc_code_singly_threaded" construct instead of
4465 calling the pair of scm_i_thread_put_to_sleep () and
4466 scm_i_thread_wake_up (). Also, we would want to have as many of
4467 these sections eleminated.
4468
4469 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
4470
4471 * inline.h: #include "libguile/threads.h"
4472
4473 * pthread-threads.h: Macros now conform more closely to the
4474 pthreads interface. Some of them now take a second argument.
4475
4476 * threads.c, threads.h: Many changes.
4477
4478 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4479
4480 * Makefile.am (version.h): Changed $^ --> $< in rule for
4481 version.h.
4482
4483 2002-12-08 Rob Browning <rlb@defaultvalue.org>
4484
4485 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
4486 (SCM_MINOR_VERSION): use @--@ substitution now.
4487 (SCM_MICRO_VERSION): use @--@ substitution now.
4488 (scm_effective_version): new function prototype.
4489
4490 * version.c (scm_effective_version): new function, also add
4491 effective-version.
4492
4493 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
4494 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
4495 SCM_LIBRARY_DIR.
4496 (version.h): generate this here rather than configure.in. This
4497 approach tracks source edits better (i.e. more immediately).
4498 Might be worth considering for other .in files too.
4499
4500 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
4501
4502 Reorganized thread package selection. A thread package now only
4503 implements a small set of pthread like functions and Guile
4504 implements the rest on top of that. Guile's implementation is
4505 what the "coop-pthreads" package has been previously. Support for
4506 "coop" threads has been removed until I get time to add it again.
4507
4508 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
4509 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
4510 null-threads.c, coop-pthreads.c.
4511 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
4512 pthread-threads.h.
4513
4514 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
4515
4516 * threads.h: Do not include "libguile/coop-defs.h". Include
4517 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
4518 (previously deprecated) C level thread API prototypes. They are
4519 now in the thread package specific headers, "null-threads.h" and
4520 "pthread-threads.h".
4521 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
4522 New.
4523 (scm_threads_init): Removed.
4524 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
4525 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
4526 SCM_I_THREAD_SWITCH_COUNT): Define here.
4527 (scm_single_thread_p): Removed.
4528 (scm_call_with_new_thread): Take two args directly instead of list
4529 of two args.
4530 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
4531 SCM_SET_THREAD_LOCAL_DATA): Define here.
4532
4533 * threads.c: Merged with "coop-pthreads.c".
4534
4535 * null-threads.h: Implement pthread-like API as a set of macros.
4536
4537 * pthread-threads.h: New, implement pthread-like API by deferring
4538 to pthread itself.
4539
4540 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
4541 has been lost in the reorganization.
4542
4543 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
4544
4545 The following change makes it possible to move procedure
4546 application dispatch outside inner loops. The motivation was
4547 clean implementation of efficient replacements of R5RS primitives
4548 in SRFI-1.
4549
4550 The semantics is clear: scm_trampoline_N returns an optimized
4551 version of scm_call_N (or NULL if the procedure isn't applicable
4552 on N args).
4553
4554 Applying the optimization to map and for-each increases efficiency
4555 noticeably. For example, (map abs ls) is 8 times faster than
4556 before.
4557
4558 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
4559
4560 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
4561
4562 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
4563 (map, for-each): Handle also application on two args as a special
4564 case; Use trampolines.
4565
4566 Other changes:
4567
4568 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
4569 (subr2oless): Removed.
4570 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
4571 vector GC protected.
4572
4573 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
4574 scm_out_of_range.
4575
4576 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4577
4578 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
4579
4580 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
4581
4582 * debug.c (scm_make_iloc): Added missing "return".
4583
4584 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
4585
4586 * strports.c (scm_eval_string_in_module): Validate second arg to
4587 be a module. Thanks to Arno Peters!
4588
4589 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4590
4591 * .cvsignore: remove goops.c
4592
4593 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4594
4595 * modules.c (scm_env_top_level, scm_lookup_closure_module,
4596 module_variable, scm_module_lookup_closure,
4597 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
4598 scm_system_module_env_p): Don't compare SCM values with C
4599 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
4600 over SCM_NFALSEP.
4601
4602 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4603
4604 * eval.h (SCM_MAKE_ILOC): New macro.
4605
4606 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
4607 the iloc bitpattern here.
4608
4609 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
4610
4611 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
4612 part of the API, otherwise it's difficult to write Guile
4613 extensions using non-blocking I/O => moved #include
4614 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
4615
4616 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
4617 s_unlock_mutex.
4618
4619 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
4620
4621 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
4622 are defined in configure.in.
4623
4624 * threads.c: Removed SCM_API from function definitions. SCM_API
4625 is only for declarations.
4626
4627 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
4628
4629 * coop-pthreads.h: Added support for thread specific data to the
4630 generic C API for the coop-pthreads case.
4631
4632 * threads.c, threads.h (scm_cond_init): Undo unintentional API
4633 change.
4634 (scm_cond_broadcast): Added missing function.
4635
4636 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4637
4638 * coop.c (coop_next_runnable_thread): Removed, wich should have
4639 happened when GUILE_ISELECT was hard-wired.
4640
4641 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
4642
4643 * Makefile.am (libguile_la_SOURCES): Added threads.c
4644 (DOT_DOC_FILES): Added threads.doc.
4645 (DOT_X_FILES): Added threads.x.
4646 (EXTRA_libguile_la_SOURCES): Removed threads.c.
4647 (noinst_HEADERS): Added coop-pthreads.c.
4648 (modinclude_HEADERS): Added coop-pthreads.h.
4649
4650 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
4651 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
4652
4653 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
4654 Thanks to Bill Schottstaedt!
4655
4656 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
4657
4658 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
4659 SCM_COPT_THREADS is defined.
4660 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
4661 is defined.
4662
4663 * coop-pthreads.c: Some harmless renamings of internal stuff.
4664 (create_thread): New, generalized version of
4665 scm_call_with_new_thread.
4666 (scm_call_with_new_thread): Use it.
4667 (scm_spawn_thread): New, use create_thread.
4668
4669 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
4670
4671 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
4672 start testing it now.
4673
4674 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
4675 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
4676 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
4677 is defined.
4678
4679 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
4680
4681 * scmsigs.c (signal_cell_handlers, install_handler_data,
4682 scm_delq_spine_x, really_install_handler, install_handler): New
4683 scheme for triggering signal handlers, to simplify take_signal.
4684 (take_signal): Simplified, to avoid race conditions.
4685 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
4686 hasn't exited yet.
4687
4688 * async.c (scm_async_click): Reset pending_asyncs, handle
4689 signal_asyncs. Don't set cdr of a non-signal async to #f.
4690 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
4691 always. Set pending_asyncs.
4692 (scm_system_async_mark_for_thread): Check that thread has not
4693 exited.
4694 (scm_unmask_signals, decrease_block): Call scm_async_click after
4695 block_asyncs becomes zero.
4696
4697 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
4698 active_asyncs.
4699
4700 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
4701 fields.
4702 * root.c (root_mark): Mark them.
4703 (make_root): Initialize them.
4704
4705 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
4706 USE_COOP_THREADS.
4707 (scm_internal_select): Define one version for USE_COOP_THREADS and
4708 one for USE_NULL_THREADS.
4709 (scm_init_iselect): Likewise.
4710
4711 * inline.h (scm_cell, scm_double_cell): Also allow
4712 USE_COPT_THREADS to not protect the slot initializers.
4713
4714 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
4715 because threads need to be initialized before the stack, but
4716 gsubrs such as scm_timed_condition_variable_wait can only be
4717 created later.
4718
4719 * threads.h: Include "coop-pthreads.h" when requested.
4720 (scm_threads_make_mutex, scm_threads_lock_mutex,
4721 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
4722 not implemented anyway.
4723 (scm_init_thread_procs, scm_try_mutex,
4724 scm_timed_condition_variable_wait,
4725 scm_broadcast_condition_variable, scm_c_thread_exited_p,
4726 scm_thread_exited_p): New prototypes.
4727 (struct timespec): Define if not already defined.
4728 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
4729 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
4730 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
4731 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
4732 deprecated.
4733
4734 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
4735 requested.
4736 (scm_thread_exited_p): New.
4737 (scm_try_mutex, scm_broadcast_condition_variable): Newly
4738 registered procedures.
4739 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
4740 Use the latter as the procedure for "wait-condition-variable",
4741 thus offering a optional timeout parameter to Scheme.
4742 (scm_wait_condition_variable): Implement in terms of
4743 scm_timed_wait_condition_variable.
4744 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
4745 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
4746 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
4747 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
4748 scm_make_mutex, etc, and deprecate.
4749 (scm_init_threads): Do not create smobs, leave this to
4750 scm_threads_init. Do not include "threads.x" file.
4751 (scm_init_thread_procs): New, include "threads.x" here.
4752
4753 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
4754 scm_null_mutex_lock, scm_null_mutex_unlock,
4755 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
4756 scm_null_condvar_wait, scm_null_condvar_signal,
4757 scm_null_condvar_destroy): Removed.
4758 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
4759 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
4760 scm_cond_destory): Do not define, they are now deprecated and
4761 handled by threads.{h,c}.
4762
4763 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
4764 (scm_threads_init): Create smobs here, using the appropriate
4765 sizes.
4766 (block): Removed, now unused.
4767 (scm_c_thread_exited_p): New.
4768 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
4769 scm_null_mutex_destroy, scm_null_condvar_init,
4770 scm_null_condvar_wait, scm_null_condvar_signal,
4771 scm_null_condvar_destroy): Removed and updated users to do their
4772 task directly.
4773 (scm_try_mutex, timeval_subtract,
4774 scm_timed_wait_condition_variable,
4775 scm_broadcast_condition_variable): New.
4776 (scm_wait_condition_variable): Removed.
4777
4778 * coop-defs.h (coop_m): Added 'level' field.
4779 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
4780 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
4781 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
4782 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
4783 define.
4784 (coop_condition_variable_broadcast): New.
4785
4786 * coop-threads.c (scm_threads_init): Create smobs here, using the
4787 appropriate sizes.
4788 (scm_c_thread_exited_p, scm_try_mutex,
4789 scm_timed_wait_condition_variable,
4790 scm_broadcast_condition_variable): New.
4791 (scm_wait_condition_variable): Removed.
4792
4793 * coop.c (coop_new_mutex_init): Initialize level.
4794 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
4795 level.
4796 (coop_condition_variable_signal): Renamed to
4797 coop_condition_variable_broadcast and reimplemented in terms of
4798 that. Thus...
4799 (coop_condition_variable_broadcast): New.
4800
4801 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
4802
4803 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
4804
4805 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
4806
4807 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
4808 of system headers.
4809
4810 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
4811 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
4812 give better error messages. Thanks to Bill Schottstaedt!
4813
4814 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4815
4816 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
4817 scm_definedp to scm_defined_p and deprecated scm_definedp.
4818
4819 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4820
4821 * async.h, async.c (scm_system_async): Fixed deprecation to work
4822 correctly when deprecated features are excluded.
4823
4824 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4825
4826 * async.c (scm_system_async_mark_for_thread): Validate thread
4827 argument.
4828
4829 * coop-threads.c (scm_i_thread_root): Do not validate argument.
4830
4831 * feature.c (scm_init_feature): Don't add 'threads' for
4832 USE_NULL_THREADS.
4833
4834 * inline.h (scm_cell, scm_double_cell): Also allow
4835 USE_NULL_THREADS to not protect the slot initializers.
4836
4837 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
4838 "USE_THREAD".
4839
4840 * Makefile.am (noinst_HEADERS): Added null-threads.c.
4841 (modinclude_HEADERS): Added null-threads.h.
4842
4843 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
4844 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
4845 (scm_init_threads): Use generic type names scm_t_mutex and
4846 scm_t_cond instead of coop_m and coop_c.
4847
4848 * null-threads.c, null-threads.h: New files.
4849
4850 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
4851
4852 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
4853 This is to support makes that know about "$<" only in pattern
4854 rules, like Sun's make.
4855
4856 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
4857
4858 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
4859 substitution. Thanks to David Allouche!
4860
4861 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
4862
4863 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
4864 !SCM_ENABLE_DEPRECATED.
4865
4866 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4867
4868 * async.c (scm_system_async_mark_for_thread): Only call
4869 scm_i_thread_root when USE_THREADS is defined. Use scm_root
4870 otherwise.
4871
4872 * scmsigs.c (take_signal): Only call scm_i_thread_root when
4873 USE_THREADS is defined. Use scm_root otherwise.
4874 (scm_sigaction_for_thread): Ignore THREAD argument when
4875 USE_THREADS is not defined. Also, move THREAD argument defaulting
4876 out of HAVE_SIGACTION section, which was a bug.
4877
4878 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4879
4880 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
4881 signal_handlers, not the closure that is used as the async.
4882 The closure is stored in signal_handler_cells, as previously.
4883
4884 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
4885
4886 * root.h (scm_root_state): Added 'block_async' slot.
4887 (scm_active_asyncs): Removed abbrev.
4888 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
4889
4890 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
4891 abbrev.
4892
4893 * async.h (scm_call_with_blocked_asyncs,
4894 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
4895 scm_c_call_with_unblocked_asyncs): New prototypes.
4896 (scm_mask_signals, scm_unmask_signals): Deprecated.
4897 (scm_mask_ints): Turned into a macro.
4898 * async.c (scm_mask_ints): Removed.
4899 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
4900 this should not be necessary.
4901 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
4902 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
4903 deprecation warning and check for errornous use. Set block_asyncs
4904 instead of scm_mask_ints.
4905 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
4906 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
4907 scm_c_call_with_unblocked_asyncs): New.
4908
4909 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
4910 Asyncs are enabled by default.
4911
4912 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
4913
4914 * vports.c (scm_make_soft_port): Allow vector argument to carry a
4915 6th element: an input waiting thunk.
4916 (sf_input_waiting): New.
4917
4918 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
4919
4920 * root.c (root_mark): Mark active_asyncs slot.
4921
4922 * async.c (scm_async_click): Set the cdr of a executed handler
4923 cell to SCM_BOOL_F, not SCM_EOL.
4924 (scm_i_queue_async_cell): Queue the cell at the end of the list,
4925 and only if the handler procedure is not already present.
4926 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
4927 with SCM_BOOL_F.
4928 * scmsigs.c (scm_sigaction_for_thread): Likewise.
4929
4930 2002-10-04 Rob Browning <rlb@defaultvalue.org>
4931
4932 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
4933
4934 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
4935 scm_lt_dlopenext, and scm_lt_dlerror.
4936 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
4937 and scm_lt_dlerror.
4938 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
4939 and scm_lt_dlerror.
4940 (sysdep_dynl_init): switch to scm_lt_dlinit();
4941
4942 * Makefile.am (libguile_la_LIBADD): switch to use
4943 libguile-ltdl.la.
4944
4945 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
4946
4947 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
4948
4949 * scmsigs.h (scm_sigaction_for_thread): New prototype.
4950 * scmsigs.c (got_signal): Removed.
4951 (signal_handler_cells, signal_handler_threads): New.
4952 (take_signal): Queue the cell of the signal for the specified
4953 thread. Reset the signal handler on systems that don't have
4954 sigaction.
4955 (sys_deliver_signals): Removed.
4956 (close_1): New.
4957 (scm_sigaction_for_thread): Renamed from scm_sigaction and
4958 extended to also set the thread of a signal and allocate a cell
4959 for it. Keep the Scheme name "sigaction". Check that signum is
4960 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
4961 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
4962 (scm_init_scmsigs): Allocate signal_handler_cells and
4963 signal_handler_threads vectors.
4964
4965 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
4966 that system asnycs and user asyncs are separated. Reimplemented
4967 system asyncs to work per-thread.
4968
4969 * gc.c (scm_init_gc): Do not use scm_system_async.
4970
4971 * async.h (scm_asyncs_pending, scm_set_tick_rate,
4972 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
4973 Removed prototypes.
4974 (scm_i_queue_async_cell): New.
4975
4976 * __scm.h (scm_asyncs_pending_p): Removed.
4977 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
4978 scm_asyncs_pending_p.
4979
4980 * async.h (scm_system_async_mark_for_thread): New prototype.
4981
4982 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
4983
4984 * root.h (scm_root_state): Added new "active_asyncs" slot.
4985 * root.c (scm_make_root): Initialize it to SCM_EOL.
4986
4987 * coop-defs.h (coop_t): Added new "handle" slot.
4988 * coop-threads.c (all_threads, scm_current_thread,
4989 scm_all_threads, scm_i_thread_root): New.
4990 (scm_threads_init): Add main thread to all_threads.
4991 (scheme_launch_thread): Remove thread from all_threads when it
4992 terminates.
4993 (scm_call_with_new_thread): Initialize handle slot of coop_t
4994 structure and add new thread to all_threads.
4995 (scm_spawn_thread): Likewise.
4996
4997 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
4998 * threads.c (scm_current_thread, scm_all_threads): Register as
4999 primitives.
5000
5001 * dynl.c: Use scm_lt_ prefix for libltdl functions.
5002
5003 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
5004
5005 * script.c (scm_compile_shell_switches): Fix bad spelling of
5006 `explicitly' in comment.
5007
5008 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
5009
5010 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
5011 Refer to provided? in doc string rather than deprecated feature?.
5012
5013 2002-09-24 Gary Houston <ghouston@arglist.com>
5014
5015 * inline.h (scm_double_cell): prevent reordering of statements
5016 with any following code (for GCC 3 strict-aliasing).
5017 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
5018 the earlier version of the reordering prevention.
5019
5020 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5021
5022 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
5023
5024 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5025
5026 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
5027 protection.
5028
5029 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5030
5031 * inline.h: include stdio.h
5032
5033 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
5034
5035 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5036
5037 * gc-segment.c (scm_i_make_initial_segment): check user settings
5038 for sanity.
5039
5040 * gc-malloc.c (scm_gc_init_malloc): check user settings for
5041 sanity.
5042
5043 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
5044
5045 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
5046
5047 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
5048 these won't ever wrap around with high memory usage. Thanks to
5049 Sven Hartrumpf for finding this.
5050
5051 * gc-freelist.c: include <stdio.h>
5052
5053 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
5054
5055 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
5056
5057 * vectors.h (SCM_VECTOR_REF): New.
5058
5059 * snarf.h (SCM_DEFINE_PUBLIC): New.
5060
5061 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
5062
5063 * socket.c (scm_addr_vector): Added size of address to arguments.
5064 Use it to avoid accessing a non-existent path in a sockaddr_un.
5065 Changed all callers.
5066
5067 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5068
5069 * gc.h: remove DOUBLECELL card flags.
5070
5071 * gc-malloc.c (scm_calloc): try to use calloc() before calling
5072 scm_realloc().
5073
5074 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
5075 init loop; handle this from scm_init_card_freelist()
5076
5077 * gc-card.c (scm_init_card_freelist): init bit vector here.
5078
5079 * numbers.c (scm_make_real): prevent reordering of statements
5080 num2float.i.c (FLOAT2NUM): idem
5081
5082 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5083
5084 * eval.h: prepend libguile/ to include path
5085
5086 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
5087
5088 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
5089 years. Thanks to Martin Grabmüller!
5090
5091 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5092
5093 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
5094 unsigned numbers for computing minimum heap increment. This
5095 prevents weird results when a a negative minimum increment is
5096 computed.
5097
5098 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
5099
5100 * gc_os_dep.c: When we have __libc_stack_end, use that directly
5101 instead of the old tricks.
5102
5103 * guile-snarf.in: Do not expect the input file to be the first
5104 argument after the optional "-o" option, just pass everything to
5105 the pre-processor without extracting the input file name.
5106
5107 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5108
5109 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
5110 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
5111
5112 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5113
5114 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
5115 Bill Schottstaedt for the bug report
5116
5117 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
5118
5119 * print.c (scm_iprin1): Print primitives generics always as
5120 "primitive-generic" even when they have no primitive methods yet.
5121
5122 2002-08-17 Gary Houston <ghouston@arglist.com>
5123
5124 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
5125 call.
5126
5127 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5128
5129 * ports.c (scm_add_to_port_table): small bugfix.
5130
5131 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
5132 malloc.
5133
5134 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
5135 only use SCM_MIN_HEAP_SEG_SIZE.
5136
5137 * ports.c (scm_add_to_port_table): add backwards compatibility
5138 function
5139
5140 * ports.h: use scm_i_ prefix for port table and port table size.
5141
5142 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
5143
5144 * vports.c (scm_make_soft_port): Initialize pt variable.
5145
5146 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
5147
5148 * strports.h (scm_c_eval_string_in_module,
5149 scm_eval_string_in_module): New prototypes.
5150 * strports.c (scm_eval_string_in_module): New, but use
5151 "eval-string" as the Scheme name and make second parameter
5152 optional.
5153 (scm_eval_string): Implement using scm_eval_string_in_module.
5154 (scm_c_eval_string_in_module): New.
5155 Thanks to Ralf Mattes for the suggestion!
5156
5157 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5158
5159 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
5160 message and abort.
5161
5162 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
5163
5164 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
5165 stead of scm_t_port*. The function now takes a tag argument.
5166
5167 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5168
5169 * gc.h: add scm_debug_cells_gc_interval to public interface
5170
5171 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
5172
5173 * gc.c (scm_i_expensive_validation_check): separate expensive
5174 validation checks from cheap ones.
5175
5176 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5177
5178 * read.c (scm_input_error): new function: give meaningful error
5179 messages, and throw read-error
5180
5181 * gc-malloc.c (scm_calloc): add scm_calloc.
5182
5183 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5184
5185 * tags.h: remove GC bits documentation from the tags table.
5186
5187 * read.c (INPUT_ERROR): Prepare for file:line:column error
5188 messages for errors in scm_lreadr() and friends.
5189
5190 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5191
5192 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
5193 implementation).
5194 (scm_gc_calloc): new function
5195
5196 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5197
5198 * ports.c (scm_new_port_table_entry): init port entry to 0
5199 completely.
5200
5201 * ports.c (scm_new_port_table_entry): change function from
5202 scm_add_to_port_table. This prevents cells with null-pointers from
5203 being exposed to GC.
5204
5205 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
5206 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
5207
5208 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
5209 to gc-stats.
5210
5211 * numbers.c (big2str): return "0" for 0 iso. ""
5212
5213 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
5214 private-gc.h: new file
5215
5216 * gc.c: completely revised and cleaned up the GC. It now uses lazy
5217 sweeping. More documentation in workbook/newgc.text
5218
5219 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5220
5221 * random.c (rstate_free): Return zero.
5222
5223 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5224
5225 * environments.c (remove_key_from_alist): Removed.
5226
5227 (obarray_remove): Simplified.
5228
5229 2002-07-24 Stefan Jahn <stefan@lkcc.org>
5230
5231 * continuations.h: ia64: Include <signal.h> before
5232 <sys/ucontext.h>.
5233
5234 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5235
5236 * modules.c (scm_sym2var): Don't compare SCM values with ==.
5237
5238 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5239
5240 * goops.c (scm_compute_applicable_methods): use
5241 scm_remember_upto_here_1 iso scm_remember_upto_here
5242
5243 * macros.c: include deprecation.h
5244
5245 * vectors.c (scm_vector_move_right_x): remove side effect in
5246 macro arg.
5247 (scm_vector_move_left_x): idem.
5248
5249 * net_db.c, posix.c, socket.c: variable naming: change ans to
5250 result.
5251
5252 * sort.c (scm_merge_vector_x): accept vector as argument
5253 iso. SCM*. This is needed for full GC correctness.
5254
5255 * gc.h: undo previous undocumented changes related to #ifdef
5256 GENGC.
5257
5258 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5259
5260 * *.c: add space after commas everywhere.
5261
5262 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
5263 Document cases where SCM_WRITABLE_VELTS() is used.
5264
5265 * vectors.h (SCM_VELTS): prepare for write barrier, and let
5266 SCM_VELTS() return a const pointer
5267 (SCM_VECTOR_SET): add macro.
5268
5269 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5270
5271 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
5272 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
5273 Deprecated the special kind of built-in dynamic syntax transformer
5274 that was inaccurately named "macro". Note: The built-in syntax
5275 transformers that are named "mmacro" or "memoizing-macro" still
5276 exist, and it is these which come much closer to what one would
5277 call a macro.
5278
5279 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
5280
5281 * eval.c (unmemocopy): Fix for
5282 1001-local-eval-error-backtrace-segfaults (unmemoization crash
5283 with internal definitions and local-eval).
5284
5285 2002-07-12 Gary Houston <ghouston@arglist.com>
5286
5287 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
5288 defined. They don't do anything useful, especially since the
5289 only case where DYNAMIC_LINKING is undefined seems to be
5290 when --with-modules=no is given to configure, which is basically
5291 requesting that the "dynamic linking module" be omitted.
5292
5293 * Makefile.am (libguile_la_SOURCES): move dynl.c from
5294 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
5295
5296 * extensions.c (load_extension): check DYNAMIC_LINKING for
5297 scm_dynamic_call.
5298 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
5299 scm_init_dynamic_linking.
5300
5301 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
5302
5303 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
5304 check for Cygwin when including <winsock2.h>, this is already
5305 check for by configure. Thus, revert change from 2002-07-07.
5306
5307 2002-07-10 Gary Houston <ghouston@arglist.com>
5308
5309 * eq.c: include <string.h>
5310 * dynl.c: docstring editing.
5311
5312 2002-07-09 Gary Houston <ghouston@arglist.com>
5313
5314 * dynl.c (scm_dynamic_call): docstring editing.
5315
5316 2002-07-08 Rob Browning <rlb@defaultvalue.org>
5317
5318 * gc_os_dep.c: HURD fixes.
5319
5320 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
5321
5322 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
5323
5324 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
5325 this should be compiled for BUILD host.
5326 Override default rule for
5327 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
5328 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
5329 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
5330
5331 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
5332 <winsock2.h> on Cygwin even when we have it.
5333
5334 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5335
5336 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
5337 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
5338 the code. Full number of arguments checking of closures is
5339 mandatory now. However, the option to disable the checking has
5340 most probably not been used anyway.
5341
5342 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5343
5344 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
5345 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
5346 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
5347 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
5348 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
5349 (scm_source_properties, scm_set_source_properties_x,
5350 scm_source_property): Removed compile time option SCM_RECKLESS to
5351 clean up the code. Full number of arguments checking of closures
5352 is mandatory now. However, the option to disable the checking has
5353 most probably not been used anyway.
5354
5355 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
5356 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
5357
5358 2002-06-30 Gary Houston <ghouston@arglist.com>
5359
5360 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
5361 do anything useful. Added a comment about need for a mutex if
5362 pre-emptive threading is supported.
5363
5364 * posix.c (scm_convert_exec_args), dynl.c
5365 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
5366 allocate_string_pointers. 2) simplified: don't reallocate the
5367 strings, just make an array of pointers 3) avoid memory leaks on
5368 error 4) let the procedure report errors in its own name.
5369 Consequences: 1) the procedures now assume that SCM strings are
5370 nul-terminated, which should always be the case. 2) Since strings
5371 are not reallocated, it's now possible for strings passed to
5372 dynamic-args-call to be mutated.
5373
5374 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
5375
5376 * __scm.h, eval.c, eval.h: Removed compile time option
5377 MEMOIZE_LOCALS to clean up the code. Now, caching of local
5378 variable positions during memoization is mandatory. However, the
5379 option to disable the caching has most probably not been used
5380 anyway.
5381
5382 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
5383
5384 * print.c (scm_simple_format): Print missing part of format before
5385 ~% control. Thanks to Daniel Skarda!
5386
5387 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
5388
5389 * mkstemp.c: Added exception notice to license statement.
5390
5391 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
5392
5393 * numbers.c (mem2ureal): When returning an inexact zero, make sure
5394 it is represented as a floating point value so that we can change
5395 its sign.
5396
5397 From John W. Eaton <jwe@bevo.che.wisc.edu>
5398
5399 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
5400
5401 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
5402
5403 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
5404 in addition to `i386'. Thanks to Dale P. Smith.
5405
5406 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
5407
5408 * eq.c (real_eqv): New.
5409 (scm_eqv_p): Use it when comparing reals and complexes.
5410
5411 * numbers.c: Include <string.h>, for strncmp.
5412 (mem2complex): Do not create negative NaNs.
5413 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
5414 NaN.
5415 (scm_inexact_to_exact): Signal error when converting a NaN.
5416
5417 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
5418
5419 * posix.c (scm_putenv): Handle removing variables explicitely by
5420 calling unsetenv.
5421
5422 From John W. Eaton.
5423
5424 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
5425 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
5426 and scm_nan.
5427 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
5428 [SCO && ! HAVE_ISINF] (isinf): New function.
5429 (xisinf, xisnan): New functions.
5430 (IS_INF): Delete.
5431 (isfinite): Define in terms of xisinf.
5432 (scm_inf_p, scm_nan_p): New functions.
5433 (guile_Inf, guile_NaN): New file-scope vars.
5434 (guile_ieee_init): New function.
5435 (scm_inf, scm_nan): New functions.
5436 (idbl2str): Handle Inf and NaN. Remove funny label and
5437 corresponding gotos.
5438 (ALLOW_DIVIDE_BY_ZERO): New macro.
5439 (scm_divide): Allow division by zero to occur if
5440 ALLOW_DIVIDE_BY_ZERO is defined.
5441 Handle bignums and ints as special cases.
5442
5443 Additional stuff by me:
5444
5445 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
5446 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
5447 (iflo2str): Don't output a '+' for negative numbers or for Inf and
5448 NaN. They will provide their own sign.
5449 (scm_divide): Only allow divides by inexact zeros. Dividing by
5450 exact zeros still signals an errors.
5451
5452 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
5453
5454 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
5455 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
5456 (scm_slot_exists_p): Rename from scm_slots_exists_p.
5457 Thanks to Andreas Rottmann.
5458
5459 2002-04-20 Gary Houston <ghouston@arglist.com>
5460
5461 * removal of unused fields in root state (thanks to Christopher
5462 Cramer for pointing out the disuse.)
5463 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
5464 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
5465
5466 * root.c (root_mark): don't mark them.
5467 (scm_make_root): don't set them to #f.
5468 * init.c (scm_init_standard_ports): don't initialise with the
5469 default ports.
5470
5471 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
5472
5473 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
5474 cpp_sig_symbols.c.
5475
5476 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
5477
5478 * guile-snarf.in: Do not clean input file. This would write to
5479 the $(srcdir) during a VPATH build, which is not allowed. It also
5480 isn't needed since it only works when an output filename has been
5481 specified and in that case we don't need to clean the input file
5482 because the output file will already exist.
5483
5484 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
5485
5486 * guile-snarf: Install the trap for removing $cleanfile only when
5487 the value of $cleanfile is actually known.
5488
5489 2002-04-10 Rob Browning <rlb@defaultvalue.org>
5490
5491 * .cvsignore: add versiondat.h and *.c.clean.c.
5492
5493 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
5494
5495 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
5496 function, replaces macro SRCBRKP.
5497
5498 (SRCBRKP): Deprecated.
5499
5500 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
5501 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
5502 temporary variable.
5503
5504 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5505
5506 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
5507 CHECK_EXIT and removed all references to them.
5508
5509 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5510
5511 * debug.h (scm_ready_p, debug_print): Removed declarations.
5512
5513 * eval.c (EVALCELLCAR): Removed.
5514
5515 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
5516 operation from condition.
5517
5518 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
5519
5520 * guile-snarf.in: When the output filename is "-", write to
5521 stdout. When no "-o" option is given, use "-" as the output
5522 filename (i.e., stdout). Only 'clean' the inputfile or remove the
5523 output file on error when the output file name is not "-". Define
5524 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
5525
5526 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
5527
5528 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5529
5530 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
5531 and the corresponding goto statements. Removed redundant code.
5532
5533 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5534
5535 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
5536 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
5537 Re-enabled handing of rpsubrs and asubrs.
5538
5539 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5540
5541 * eval.c (SIDEVAL): Removed.
5542
5543 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
5544 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
5545 argument checking order for set! to locals, variables and symbols.
5546 Improvements to control structure. Removed some uses of arg1 and
5547 arg2 as temporary variables.
5548
5549 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
5550
5551 * guile-snarf.in: Remove "--compat=1.4" support.
5552 Add "-d" and "-D" support.
5553
5554 (deprecated_list): New var.
5555 (compat_mode_clean_xxx): Delete.
5556 (grep_deprecated): New func.
5557 ("main"): If "-d" or "-D", call `grep_deprecated'.
5558
5559 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
5560
5561 * hooks.h: Change scm_t_c_hookype_t everywhere to
5562 scm_t_c_hook_type.
5563
5564 Docstring fixes:
5565
5566 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
5567
5568 * ports.c (scm_sys_make_void_port): Use `@file'.
5569
5570 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
5571 than `else'.
5572
5573 * macros.c (scm_makmacro): Don't say that the form replaces its
5574 source, because it doesn't.
5575 (scm_makmmacro): Clarify difference between this and scm_makmacro.
5576
5577 * backtrace.c (scm_display_error), filesys.c (scm_umask,
5578 scm_select, scm_basename), goops.c (scm_method_generic_function),
5579 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
5580 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
5581 spelling mistakes.
5582
5583 * debug.c (scm_debug_options), eval.c
5584 (scm_eval_options_interface), read.c (scm_read_options): Change
5585 incorrect @var in docstring to @code.
5586
5587 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
5588
5589 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
5590
5591 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
5592 guile-snarf can remove trailing non-init code.
5593
5594 * guile-snarf.in (modern_snarf): Remove everything following and
5595 including "^:^" from the output.
5596
5597 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5598
5599 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
5600
5601 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
5602
5603 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
5604
5605 * guile-snarf.in: Update copyright.
5606 Rewrite to internalize error handling.
5607 Add "--compat=1.4" handling.
5608 Add commentary.
5609
5610 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
5611 (snarfcppopts): New var.
5612 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
5613 (.c.doc): Use $(snarfcppopts).
5614
5615 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
5616 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
5617 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
5618 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
5619 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
5620 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
5621 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
5622 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
5623 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
5624 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
5625 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
5626 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
5627 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
5628 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
5629
5630 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
5631
5632 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
5633 The next step will be to remove the union 't' and simplify the
5634 code of SCM_CEVAL that way.
5635
5636 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
5637
5638 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
5639 rreadfds, rwritefds, rexceptfds): Made static.
5640
5641 * gc.c (terminating), fports.c (terminating): Renamed
5642 scm_i_terminating.
5643
5644 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
5645
5646 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
5647 potential overflow problems. Thanks to John W Eaton!
5648
5649 * strop.c (string_capitalize_x): Treat characters as unsigned so
5650 that 8-bit chars work. Thanks to David Pirotte!
5651
5652 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5653
5654 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
5655 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
5656 proc as temporary variables. Introduced temporary variables with
5657 hopefully descriptive names for clarification. Replaced SCM_N?IMP
5658 by a more explicit predicate in some places.
5659
5660 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5661
5662 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
5663 Added lots of comments regarding the implementation of #@dispatch.
5664 Changed intra-procedure communication to use t.arg1 instead of
5665 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
5666 variables. Introduced temporary variables with hopefully
5667 descriptive names for clarification. Replaced SCM_N?IMP by a more
5668 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
5669 of computing the expression explicitly. Eliminate now unused
5670 label nontoplevel_cdrxbegin.
5671
5672 * goops.h (SCM_INSTANCE_HASH): New macro.
5673
5674 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
5675
5676 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
5677
5678 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
5679 "guile-snarf" moved back from `noinst_SCRIPTS'.
5680
5681 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
5682
5683 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
5684 exists when adding a source property other than those that are
5685 handled explicitly, add the new property to the SRCPROPS obj's
5686 plist.
5687
5688 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
5689 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
5690
5691 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
5692 debug.status. It isn't needed, and it can overflow the bits
5693 reserved for it (which may lead to a segv or a GC abort).
5694
5695 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5696
5697 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
5698 side-effecting operations from conditions and macro calls.
5699 Replaced SCM_N?IMP by a more explicit predicate in some places.
5700 Minimized the scope of some variables.
5701
5702 2002-03-02 Stefan Jahn <stefan@lkcc.org>
5703
5704 * convert.i.c: Fixed int <-> long conversions which would have
5705 failed if their sizes were different.
5706
5707 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5708
5709 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
5710 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
5711 as temporary variables. Removed side-effecting operations from
5712 conditions and macro calls. Introduced temporary variables with
5713 hopefully descriptive names for clarification. Replaced SCM_N?IMP
5714 by a more explicit predicate in some places. Removed code that
5715 was conditionally compiled if SICP was defined - which it never
5716 is.
5717
5718 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5719
5720 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
5721 Removed some uses of t.arg1 and proc as temporary variables.
5722 Removed side-effecting operations from conditions and macro calls.
5723 Introduced temporary variables with hopefully descriptive names
5724 for clarification. Replaced SCM_N?IMP by a more explicit
5725 predicate in some places.
5726
5727 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5728
5729 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
5730 explicit predicate in some places.
5731
5732 (CHECK_EQVISH): Removed.
5733
5734 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
5735 variables. Removed side-effecting operations from conditions and
5736 macro calls. Introduced temporary variables for clarification.
5737 Sorted if-else-if check for the type of the last form in a list by
5738 frequency. Avoided some unnecessary tail-recursion calls.
5739
5740 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5741
5742 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
5743 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
5744 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
5745 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
5746 scm_cell and all its uses to scm_t_cell in accordance to Guile's
5747 naming scheme for types.
5748
5749 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
5750 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
5751 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
5752 (scm_make_environment), eval.c (scm_closure), fports.c
5753 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
5754 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
5755 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
5756 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
5757 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
5758 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
5759 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
5760 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
5761 scm_alloc_cell to scm_cell.
5762
5763 * environments.c (core_environments_observe), gc.c
5764 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
5765 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
5766 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
5767 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
5768 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
5769 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
5770 (allocate_weak_vector): Renamed scm_alloc_double_cell to
5771 scm_double_cell.
5772
5773 2002-02-27 Stefan Jahn <stefan@lkcc.org>
5774
5775 * convert.i.c, convert.c: Better range checking.
5776
5777 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
5778
5779 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
5780 Windows (MinGW).
5781
5782 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
5783
5784 * Makefile.am: Update path to pre-inst-guile automake frag.
5785
5786 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5787
5788 * gc.c (scm_gc_sweep): Make it compile even when deprecated
5789 features are excluded.
5790
5791 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5792
5793 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
5794
5795 2002-02-25 Gary Houston <ghouston@arglist.com>
5796
5797 * convert.c: include <string.h> for convert_i.c.
5798
5799 2002-02-24 Rob Browning <rlb@defaultvalue.org>
5800
5801 * .cvsignore: add stamp-h1.
5802
5803 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
5804
5805 * unif.c (scm_array_to_list): Correct name, which had been
5806 accidentally changed to scm_t_arrayo_list!
5807
5808 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
5809
5810 * gc.c (scm_gc_sweep): Print an error message when aborting due to
5811 underflowing scm_mallocated.
5812
5813 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5814
5815 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
5816 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
5817 Reimplemented using the new scm_gc_malloc, etc., functions and
5818 deprecated.
5819
5820 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
5821
5822 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
5823 to `noinst_PROGRAMS'.
5824 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
5825 (noinst_PROGRAMS, noinst_SCRIPTS): New.
5826
5827 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5828
5829 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
5830 non-zero is returned from a port or smob free function.
5831 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
5832 scm_gc_register_collectable_memory,
5833 scm_gc_unregister_collectable_memory, scm_gc_malloc,
5834 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
5835
5836 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
5837 debug-malloc.c, dynl.c, environments.c, environments.h,
5838 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
5839 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
5840 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
5841 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
5842 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
5843 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
5844 appropriate. Return zero from smob and port free functions.
5845
5846 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
5847
5848 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
5849 messages while the GC is running.
5850 (scm_c_issue_deprecation_warning_fmt): New.
5851
5852 * fports.c (scm_setvbuf): Reset read buffer to saved values when
5853 it is pointing to the putback buffer.
5854
5855 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
5856
5857 * gsubr.c (create_gsubr): On "too many args" error,
5858 also display arg count and name. Thanks to Bill Schottstaedt.
5859
5860 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
5861
5862 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
5863
5864 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
5865 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
5866 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
5867
5868 * guile-snarf-docs-texi.in: Bye bye.
5869
5870 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5871
5872 * symbols.c (scm_make_symbol): Fix typo in docstring.
5873
5874 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
5875 scm_make_symbol): New prototypes.
5876
5877 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
5878
5879 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
5880 (SCM_SYMBOL_INTERNED_P): New.
5881 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
5882 SCM_MAKINUM since hash values can well be bignums.
5883 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
5884 This signals a interned symbol.
5885 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
5886 scm_make_symbol): New.
5887
5888 * print.c (scm_iprin1): Print uninterned symbols unreadably.
5889
5890 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
5891
5892 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
5893 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
5894 Thanks to Dave Love.
5895
5896 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
5897
5898 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
5899 This might help to make unintended clashes less likely.
5900 (scm_string_to_symbol): Protect the string until the symbols is
5901 created.
5902
5903 2002-01-31 Stefan Jahn <stefan@lkcc.org>
5904
5905 * convert.c, convert.h, convert.i.c: New files containing C
5906 array to Scheme conversion helpers meant to be replacement
5907 functions for the deprecated gh interface.
5908
5909 * Makefile.am: Setup rules for new `convert.*' files.
5910
5911 2002-01-28 Stefan Jahn <stefan@lkcc.org>
5912
5913 * symbols.c (scm_c_symbol2str): New function, replacement for
5914 `gh_scm2newsymbol()'.
5915
5916 * strings.c (scm_c_substring2str): New function. Proper
5917 replacement for `gh_get_substr()'.
5918
5919 * socket.c: Include `stdint.h' if available for the `uint32_t'
5920 declaration.
5921
5922 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
5923 compiler warning).
5924
5925 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
5926
5927 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
5928
5929 Other changes unrelated to Elisp...
5930
5931 * eval.c (scm_m_if): Use s_if rather than repeating string literal
5932 "if".
5933 (comments): Fix a few typos.
5934 (scm_for_each): Add parentheses around oddly unparenthesized
5935 if/while conditions.
5936
5937 * read.c (scm_read_opts): Add full stop at end of doc for
5938 `keywords' option.
5939
5940 * script.c (scm_compile_shell_switches): Use scm_str2symbol
5941 instead of gh_symbol2scm.
5942
5943 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
5944 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
5945
5946 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
5947 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
5948
5949 First batch of changes for Elisp support...
5950
5951 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
5952 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
5953 throw.c, vectors.c, weaks.c: Add #include for lang.h.
5954
5955 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
5956 conditionalize compilation and initialization of Elisp support
5957 function.
5958
5959 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
5960 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
5961 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
5962 filesys.c (fill_select_type, retrieve_select_type), fluids.c
5963 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
5964 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
5965 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
5966 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
5967 options.c (change_option_setting, scm_options), posix.c
5968 (environ_list_to_c), print.c (scm_iprlist), throw.c
5969 (scm_exit_status), vectors.c (scm_vector), weaks.c
5970 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
5971
5972 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
5973 just SCM_FALSEP.
5974
5975 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
5976 of just SCM_BOOLP.
5977
5978 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
5979 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
5980 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
5981 (scm_m_atfop): Support function aliasing. Support both function
5982 args, which need transformation, and macro args, which do not.
5983 Add explanatory comments.
5984 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
5985 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
5986 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
5987 SCM_NULLP || SCM_NILP instead of checks against (removed)
5988 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
5989 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
5990
5991 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5992 scm_m_while, scm_nil_eq): Commented out; I don't think we need
5993 these, but I don't want to remove them yet, just in case.
5994 (scm_init_lang): Define `%nil' variable on Scheme level to hold
5995 Elisp nil value.
5996
5997 * lang.h (SCM_NILP): Test against Elisp nil value instead of
5998 against (removed) scm_lisp_nil.
5999 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
6000 (SCM_NULL_OR_NIL_P): New.
6001
6002 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
6003 SCM_VALIDATE_NULL.
6004
6005 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
6006 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
6007 value).
6008
6009 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6010 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
6011 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
6012 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
6013
6014 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
6015 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
6016 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
6017 Numbering shifted down accordingly.
6018 (SCM_ELISP_NIL): New IFLAG.
6019
6020 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
6021
6022 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
6023
6024 * eval.c: Removed outdated references to "everr". Improved some
6025 comments.
6026
6027 (scm_deval_args, deval_args): Renamed scm_deval_args to
6028 deval_args, since it is not part of the interface.
6029
6030 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
6031 use references to debug.vect[0] before it exists. Add parentheses
6032 to switch statement.
6033
6034 * goops.h: Added local emacs variables.
6035
6036 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
6037
6038 * eval.[ch] (scm_deval_args): Made static.
6039
6040 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
6041 test.
6042
6043 * strings.c (scm_c_string2str): Clarified comment. Replaced
6044 THINKME by FIXME for uniformness. Removed question about whether
6045 arguments need to be protected from garbage collection: Arguments
6046 must be protected as any other variable.
6047
6048 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
6049
6050 * procs.h (SCM_CLOSURE_BODY): New Macro.
6051
6052 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
6053 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
6054 get_slot_value, set_slot_value), procs.c
6055 (scm_procedure_documentation), sort.c (closureless), stacks.c
6056 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
6057 SCM_CLOSURE_BODY.
6058
6059 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
6060
6061 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
6062
6063 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
6064 use "cp" instead.
6065
6066 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
6067
6068 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
6069 everywhere.
6070
6071 * continuations.c (scm_make_continuation): Do not retain the
6072 throw_value when the continuation is invoked.
6073
6074 2001-12-08 Stefan Jahn <stefan@lkcc.org>
6075
6076 * strings.c (scm_c_string2str): New function. Converts a
6077 given Scheme string into a C string. Also put in two
6078 THINKME's regarding the malloc policy for the missing converter
6079 routines.
6080
6081 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
6082
6083 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
6084 gh_symbol2scm.
6085
6086 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6087
6088 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
6089 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
6090
6091 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
6092 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
6093 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
6094 macros.
6095
6096 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
6097
6098 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
6099 SCM_GC_CELL_* macros when accessing free cells.
6100
6101 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
6102
6103 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
6104 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
6105 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
6106 * strings.h (SCM_MAKE_STRING_TAG): New.
6107 * procs.h (SCM_MAKE_CCLO_TAG): New.
6108 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
6109
6110 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
6111 !SCM_ENABLE_DEPRECATED.
6112
6113 * async.c, async.h (scm_system_async_mark_from_signal_handler):
6114 New.
6115
6116 * scmsigs.c (scm_take_signal): Removed all code that assumes that
6117 signal handlers are allowed to divert the flow of control. Call
6118 scm_system_async_mark_from_signal_handler instead of
6119 scm_system_async_mark.
6120
6121
6122 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
6123 scm_alloc_double_cell in their place.
6124
6125 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
6126 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
6127 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
6128 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
6129 scm_deprecated_newcell and scm_deprecated_newcell2.
6130
6131 gc.c (scm_tc16_allocated): Only define when including deprecated
6132 features.
6133 (scm_debug_newcell, scm_debug_newcell2): Removed.
6134 (scm_init_storage): Do not initialize scm_tc16_allocated.
6135 (scm_init_gc): Do it here.
6136 (allocated_mark): New, from old code.
6137 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
6138
6139 * inline.c, inline.h: New files.
6140 * Makefile.am: Added them in all the right places.
6141
6142 * _scm.h: Include "libguile/inline.h".
6143
6144 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
6145 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
6146 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
6147 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
6148 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
6149 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
6150 scm_alloc_double_cell, respectively.
6151
6152 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
6153
6154 * modules.c (scm_c_use_module): Adapt to changes to
6155 `process-use-modules'.
6156
6157 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
6158
6159 * numbers.c (scm_divide): Fix more division by zero errors.
6160
6161 2001-11-21 Gary Houston <ghouston@arglist.com>
6162
6163 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
6164 obsolete. autogen.sh says:
6165 invalid unused variable name: `OMIT_DEPENDENCIES'
6166
6167 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
6168
6169 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
6170 reporting the bug.
6171
6172 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
6173
6174 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
6175 Thanks to Eric Gillespie, Jr!
6176
6177 2001-11-21 Stefan Jahn <stefan@lkcc.org>
6178
6179 * win32-socket.c (getservent, setservent, endservent,
6180 getprotoent, setprotoent, endprotoent): New functions.
6181 Appropriate replacements for M$-Windows.
6182
6183 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
6184 these definitions for GUILE_DEBUG.
6185
6186 * net_db.c: Include "win32-socket.h" if compiling with a native
6187 M$-Windows compiler. Include some pieces of code (protoent and
6188 servent interface) protected by HAVE_* macros when using a
6189 native M$-Windows compiler.
6190
6191 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
6192
6193 * modules.c (scm_c_export): Do nothing when the first argument is
6194 already the terminating NULL. Thanks to Han-Wen Nienhuys!
6195
6196 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
6197
6198 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
6199 also include `buildstamp'.
6200
6201 2001-11-18 Rob Browning <rlb@defaultvalue.org>
6202
6203 * version.c
6204 (s_scm_major_version): use SCM_MAJOR_VERSION.
6205 (s_scm_minor_version): use SCM_MINOR_VERSION.
6206 (s_scm_micro_version): use SCM_MICRO_VERSION.
6207 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
6208 SCM_MICRO_VERSION.
6209
6210 * version.h.in
6211 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
6212 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
6213 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
6214
6215 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
6216
6217 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
6218 Rewrite docstrings without reference to substring-move-left/right,
6219 since the latter no longer exist.
6220
6221 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
6222
6223 * eval.c: Removed bogus comment about acros.
6224
6225 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
6226 Minimize scope of local variable. Eliminate dependency on
6227 macro DEBUG_EXTENSIONS.
6228
6229 (s_splicing): New error message string.
6230
6231 (scm_m_body): Issue 'bad body' message rather than 'missing
6232 expression' message.
6233
6234 (scm_m_quote): Eliminate unnecessary copying.
6235
6236 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
6237 checking of the body to scm_m_body.
6238
6239 (scm_m_do): Move comment to function header. Rename arg1 to
6240 binding. Made the code a bit easier to read.
6241
6242 (evalcar): Removed.
6243
6244 (iqq): Added a comment. Changed the depth parameter to
6245 unsigned. Use size_t for vector lengths. Make sure vector object
6246 is gc protected as long as its contents are read. Add some syntax
6247 checks. Get rid of unnecessary SCM_IMP test. Clean up the
6248 control structure a bit.
6249
6250 (scm_m_delay): Added comment about the implementation of
6251 scm_m_delay.
6252
6253 (scm_m_define): Add comment about guile's currying define
6254 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
6255 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
6256
6257 (scm_m_letrec1): Removed. Part of the functionality is taken
6258 over by the new function 'transform_bindings'.
6259
6260 (transform_bindings): New function. Takes over some of the
6261 functionality of removed function 'scm_m_letrec1', namely to split
6262 a list of bindings into a reversed list of variables and a list of
6263 initializers.
6264
6265 (scm_m_letrec): Call 'transform_bindings'.
6266
6267 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
6268 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
6269 test. Use 'transform_bindings'. Fixed scoping error with named
6270 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
6271 Jerram for suggesting the fix). Cleaned up the control structure
6272 a bit.
6273
6274 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
6275 unnecessary consing. Eliminated unnecessary
6276 SCM_DEFER/ALLOW_INTS.
6277
6278 (SCM_CEVAL): Un-obfuscated some loops.
6279
6280 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
6281
6282 * gc.h (scm_unhash_name): Old declaration removed.
6283
6284 * eval.c (s_scm_eval): Change @var{primitive-eval} to
6285 @code{primitive-eval}.
6286
6287 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
6288 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
6289 Change @deffnx lines in docstrings to say {Scheme Procedure}
6290 rather than primitive or procedure.
6291
6292 * posix.c (scm_execl), filesys.c (scm_close), unif.c
6293 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
6294 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
6295 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
6296 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
6297 (scm_string_split, scm_string_ci_to_symbol), strings.c
6298 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
6299 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
6300 Docstring fixes and improvements reflecting edits that have been
6301 made in the reference manual source.
6302
6303 * objprop.c (scm_object_properties, scm_set_object_properties_x,
6304 scm_object_property, scm_set_object_property_x): Remove invalid
6305 @deffnx lines for corresponding procedure property primitives.
6306
6307 These changes add a @deffnx C function declaration and function
6308 index entries for each Guile primitive to the copy of the doc
6309 snarf output that is used for reference manual synchronization.
6310 Online help is unchanged.
6311
6312 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
6313 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
6314 name to SCM_SNARF_DOCS.
6315
6316 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
6317 snarf-check-and-output-texi.
6318
6319 * Makefile.am (guile-procedures.texi): New rule.
6320 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
6321 Changed so that the last stage of doc snarfing is now performed
6322 twice, once to produce guile-procedures.txt for online help, and
6323 once to produce guile.texi for reference manual synchronization.
6324
6325 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6326
6327 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
6328 safely usable as a single statement followed by a ';', for example
6329 in an if statement.
6330
6331 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
6332
6333 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
6334
6335 * random.c (scm_random_solid_sphere_x,
6336 scm_random_hollow_sphere_x): Correct "shere" typos.
6337
6338 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
6339
6340 * version.c (scm_version): Update docstring to include
6341 `micro-version'.
6342
6343 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
6344
6345 * modules.c (scm_c_export): Call va_end after collecting the
6346 symbols.
6347
6348 * strop.h, strop.c (scm_substring_move_left_x,
6349 scm_substring_move_right_x): Removed.
6350
6351 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
6352 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
6353 configure does.
6354
6355 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
6356
6357 * numbers.c: Document macros to define when including
6358 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
6359 now rely on SIZEOF_ macros that have been figured out at
6360 configure time.
6361
6362 * num2integral.i.c: Adapt to new interface.
6363 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
6364 target type by casting it and checking whether it is still the
6365 same. Do not try to handle bignums for integral types that are
6366 smaller than fixnums. When handling bignums, collect the
6367 magnituse first into a unsigned type, and correctly check for
6368 overflow.
6369 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
6370 only -MIN_VALUE can still be negative of all negative numbers (in
6371 twos-complement).
6372
6373 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
6374
6375 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
6376 HAVE_LONG_LONG depending on whether their size is non-zero.
6377
6378 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
6379
6380 * strop.c (scm_string_null_p): Docfix; nfc.
6381 Thanks to Scott Lenser.
6382
6383 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
6384
6385 * extensions.c (scm_load_extension): Canonicalize docstring
6386 whitespace.
6387
6388 * unif.c (scm_uniform_array_write), ports.c
6389 (scm_current_output_port, scm_force_output), dynwind.c
6390 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
6391 filesys.c (scm_open, scm_lstat), struct.c
6392 (scm_make_struct_layout), random.c (scm_random,
6393 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
6394 (scm_i_index): Remove superfluous whitespace from end of docstring
6395 lines.
6396
6397 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
6398 strings.c (scm_make_string), variable.c (scm_make_variable,
6399 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
6400 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
6401 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
6402 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
6403 newline at end of docstrings.
6404
6405 * modules.c (scm_set_current_module): Add missing newline to
6406 docstring.
6407
6408 2001-11-07 Stefan Jahn <stefan@lkcc.org>
6409
6410 * win32-socket.[ch]: New files. Defines Winsock-API error codes
6411 and makes them available through Guile. That is because the
6412 Winsock-API does not store its errors in `errno' and thus cannot
6413 return error messages via `strerror (errno)'.
6414
6415 * socket.c (scm_init_socket): Initialize `win32-socket' part
6416 here under M$-Windows.
6417
6418 * numbers.h: Added missing declaration of
6419 `scm_sys_check_number_conversions()'.
6420
6421 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
6422 and use in `(strerror)' and `(system-error)'.
6423
6424 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
6425 `win32-socket.[ch]' to extra source and header files.
6426
6427 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
6428
6429 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
6430 a call to turn-on-debugging when --debug has been given instead of
6431 turning it on directly. Also, handle new `--no-debug' option,
6432 which might suppress the call to turn-on-debugging.
6433
6434 2001-11-05 Stefan Jahn <stefan@lkcc.org>
6435
6436 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
6437
6438 2001-11-04 Stefan Jahn <stefan@lkcc.org>
6439
6440 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
6441 here (was at guile_LDADD) which describes the dependency
6442 correctly and allows a clean build on Win32.
6443
6444 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
6445 into FOO.
6446
6447 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
6448 import macros for external libraries (libcrypt, libqthreads,
6449 libreadline and libregex).
6450
6451 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
6452
6453 * posix.c (flock): Added support for flock() in M$-Windows.
6454
6455 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
6456 of __SCM_IMPORT__.
6457
6458 * fports.c (getflags): Differentiate reading and writing pipes
6459 descriptors.
6460
6461 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
6462 M$-Windows.
6463
6464 * coop.c (coop_condition_variable_timed_wait_mutex): Use
6465 conditionalized error code if `ETIMEDOUT' is not available.
6466 (scm_thread_usleep): Remove bogus declaration of `struct timeval
6467 timeout'.
6468
6469 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
6470 belongs. That is because NO_PREPRO_MAGIC gets undefined after
6471 each inclusion of `num2integral.i.c'.
6472 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
6473
6474 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6475
6476 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
6477 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
6478
6479 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
6480
6481 * print.c (scm_iprin1): Mark print state as revealed when
6482 dispatching to generic write or display.
6483
6484 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
6485
6486 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6487
6488 Support for native Win32. Thanks to Stefan Jahn!
6489
6490 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
6491 and win32-dirent.h to extra source and header files. These
6492 include the uname() and the POSIX dirent interface implementation
6493 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
6494 linkers which do not allow unresolved symbols inside shared
6495 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
6496 dependency.
6497
6498 * __scm.h: Defined SCM_API. This macro gets prepended to all
6499 function and data definitions which should be exported or imported
6500 in the resulting dynamic link library in the Win32 port.
6501
6502 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
6503 chars.h, continuations.h, coop-defs.h, coop-threads.h,
6504 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
6505 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
6506 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
6507 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
6508 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
6509 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
6510 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
6511 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
6512 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
6513 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
6514 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
6515 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
6516 vports.h, weaks.h:
6517 Prefixed each each exported symbol with SCM_API.
6518
6519 * continuations.c: Added comment about the use of the extern
6520 declarations of {get,set}context() functions used in the ia64 port.
6521
6522 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
6523 is meant to be a `unsigned long *'.
6524
6525 * filesys.c: Include `direct.h' if possible. Use local
6526 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
6527 macros for M$-Windows. Implementation of `fstat_Win32()' which is
6528 able to differentiate between sockets and other file descriptors.
6529 Use this function as wrapper in `scm_fstat()'. Fixed typo in
6530 `scm_dirname()'.
6531
6532 * fports.c: Include `io.h' is possible. Put `*fp' into referring
6533 statement block in `scm_fport_buffer_add()'.
6534 Some corrections in `getflags()'.
6535
6536 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
6537
6538 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
6539 build on Win32. Disable preloaded symbols on Win2 platforms.
6540
6541 * ioext.c, ports.c: Include `io.h' is possible.
6542
6543 * mkstemp.c: Include `process.h' is possible.
6544
6545 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
6546 too.
6547 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
6548
6549 * posix.c: Remove unnecessary dirent includes and defines. Include
6550 local `win32-uname.h' for MinGW. Extern declaration of
6551 `mkstemp()' for systems where it does not exists. Make
6552 `getlogin()' available on M$-Windows.
6553
6554 * scmsigs.c: Made `usleep()' avalable on MinGW.
6555
6556 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
6557
6558 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
6559
6560 * win32-uname.c: Include "win32-uname.h", not "uname.h".
6561
6562 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
6563
6564 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
6565 Don't apply scm_uniform_vector_length on arrays.
6566
6567 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
6568
6569 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
6570 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
6571 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
6572 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
6573 scm_list_<n> over scm_cons[2]?.
6574
6575 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
6576 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
6577 SCM_C[AD][AD]R instead of explicit form.
6578
6579 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
6580 comparison parameters.
6581
6582 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
6583 !SCM_NULLP instead of SCM_NIMP.
6584
6585 (scm_m_case): Don't copy the form. Renamed proc to clause and
6586 minimized its scope. Renamed x to clauses. Removed side
6587 effecting operation from macro call.
6588
6589 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
6590 minimized its scope. Renamed x to clauses. Minimized the scope
6591 of variable 'len'. Make sure the else clause is treated specially
6592 even in case of '=>' occurences. Don't change the else to #t in
6593 order to be able to distinguish this case in the evaluator. Leave
6594 type checking of the recipient to the evaluator.
6595
6596 (scm_c_improper_memq): Made the comment somewhat clearer.
6597
6598 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
6599 test for SCM_IM_LET at the place of the formal parameters.
6600 Simplified the formal parameter checking.
6601
6602 (scm_m_letstar): Added Comment. Renamed proc to bindings.
6603 Renamed arg1 to binding and minimized its scope. Eliminated
6604 unnecessary consing.
6605
6606 (scm_m_do): Renamed proc to bindings. Minimized the scope of
6607 variable 'len'.
6608
6609 (build_binding_list): New static function.
6610
6611 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
6612 Further, split up the 'letrec' unmemoizing code to the
6613 corresponding parts for 'do', 'let' and 'letrec', adding comments
6614 to each form. Cleanup the handling of the do form (This removes
6615 some *real* code :-).
6616
6617 (SCM_CEVAL): Removed side effecting operation from macro call.
6618 Handle the 'else clause of the 'cond form specially - the symbol
6619 'else is not replaced with #t any more.
6620
6621 2001-10-14 Gary Houston <ghouston@arglist.com>
6622
6623 * version.c (scm_version): use sprintf instead of snprintf,
6624 for portability. thanks to Bill Schottstaedt.
6625
6626 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
6627
6628 * read.c (scm_lreadr): When user-defined hash procedure returns
6629 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
6630 an exception. (This prevents parsing of uniform vectors from
6631 interfering with parsing of numbers.)
6632
6633 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6634
6635 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
6636 PTRDIFF_MIN. Thanks to Ken Raeburn.
6637
6638 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
6639
6640 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
6641
6642 * eval.c (scm_m_atbind): First try to find the variable without
6643 defining it locally; when it has not been found, define it
6644 locally.
6645
6646 * modules.c (module_variable): Pass over variables that exist but
6647 are unbound.
6648
6649 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
6650
6651 * backtrace.c (display_backtrace_file_and_line): Only use
6652 scm_basename when POSIX support is compiled in. Thanks to Chris
6653 Cramer.
6654
6655 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6656
6657 * numbers.c (mem2uinteger): Return number read so far when coming
6658 across a hexdigit after having read a # or if not reading a hex
6659 value. This will enable the calling code to correctly handle
6660 forms like 1e2. (The background is, that the exponent markers d,
6661 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
6662 providing this patch.
6663
6664 (mem2complex): Fix erroneous double-negation. Now, numbers like
6665 1-i will be read correctly.
6666
6667 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
6668
6669 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
6670
6671 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
6672
6673 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
6674
6675 * print.c (scm_print_state_vtable, print_state_pool):
6676 Initialize. These variables are now registered as gc roots.
6677
6678 (scm_current_pstate): Update documentation.
6679
6680 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
6681 scm_prin1, scm_init_print): print_state_pool is registered as a
6682 gc root and thus does not need to be protected by a surrounding
6683 pair any more.
6684
6685 (make_print_state): The car of print_state_pool no longer holds
6686 the scm_print_state_vtable.
6687
6688 (scm_current_pstate, scm_make_print_state, print_circref,
6689 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
6690 SCM_N<foo>.
6691
6692 (scm_prin1): When building lists, prefer scm_list_<n> over
6693 scm_cons[2]?.
6694
6695 (scm_iprlist): Removed a redundant SCM_IMP test.
6696
6697 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
6698
6699 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
6700
6701 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
6702
6703 (scm_memcons, scm_mem_to_proc): When building lists, prefer
6704 scm_list_<n> over scm_cons[2]?.
6705
6706 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
6707
6708 (scm_procedure_name): Use SCM_CADR instead of explicit form.
6709
6710 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
6711 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
6712 for some reason his patch didn't make it into the cvs.
6713
6714 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
6715
6716 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
6717 little bit - should even be somewhat more accurate now.
6718
6719 2001-10-08 Rob Browning <rlb@defaultvalue.org>
6720
6721 * gc.c: support ia64 register backing store.
6722 (SCM_MARK_BACKING_STORE): new macro.
6723
6724 * continuations.h: support ia64 register backing store.
6725 (struct scm_t_contregs): add ia64 register backing store.
6726
6727 * continuations.c: support ia64 register backing store.
6728 (continuation_mark): mark ia64 register backing store.
6729 (continuation_free): free ia64 register backing store.
6730 (scm_make_continuation): capture ia64 register backing store.
6731 (copy_stack_and_call): copy ia64 register backing store.
6732
6733 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
6734
6735 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
6736 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
6737 instead of SCM_NIMP to test for that case.
6738
6739 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
6740 scm_t_bits instead of long.
6741
6742 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
6743
6744 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
6745 SCM_T_SIGNED_BITS_MIN): New.
6746 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
6747 Use them to make these macros computable by the preprocessor.
6748
6749 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
6750 whether the integral type fits in a fixnum, not the compiler.
6751 This removes a spurious compiler warning. Also, honor the
6752 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
6753 needed for `long long's.
6754
6755 * numbers.c: Define NO_PREPRO_MAGOC when including
6756 num2integral.c.i for `long long' and `signed long long'.
6757
6758 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
6759
6760 These changes fixes a race condition in the Guile coop - pthread
6761 compatibility code.
6762
6763 * coop.c (mother_awake_p): New variable.
6764 (coop_create): Set mother_awake_p before creating or signalling
6765 mother; wait until mother is going to sleep before returning.
6766 (mother): Reset mother_awake_p before going to sleep.
6767
6768 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6769
6770 * options.c (protected_objects, scm_init_options): The content of
6771 protected_objects is now protected from garbage collection using
6772 scm_gc_register_root instead of scm_permanent_object.
6773
6774 (get_option_setting): New static function that computes an option
6775 setting as it was formerly done in the function scm_options.
6776
6777 (get_documented_option_setting): New static function that
6778 returns option documentation as it was formerly done in the
6779 function scm_options. Note that documentation C strings are no
6780 longer precomputed into SCM objects. Instead, they are converted
6781 into SCM strings every time get_documented_option_setting is
6782 called.
6783
6784 (change_option_setting): New static functions that modifies the
6785 option setting as it was formerly done in the function
6786 scm_options. The function is now exception safe, i. e. won't
6787 cause a memory leak when interrupted. Further, only non-immediate
6788 option values are added to the protection list.
6789
6790 (scm_options): This function now has only the purpose to dispatch
6791 to to get_option_setting, get_documented_option_setting or
6792 change_option_setting, depending on the arguments given to
6793 scm_options.
6794
6795 (scm_init_opts): Don't convert documentation C strings into SCM
6796 strings. Further, don't protect any object values: They _must_
6797 be immediate values, otherwise there is no guarantee that they
6798 have not been collected before anyway.
6799
6800 * options.[ch] (scm_t_option): Made type unsigned, name into a
6801 constant char* and val into a scm_t_bits type.
6802
6803 (scm_options, scm_init_opts): The number of options is guaranteed
6804 to be larger or equal to zero. Thus, the type is changed to
6805 unsigned.
6806
6807 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6808
6809 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
6810 testing an unsigned value for being >= 0.
6811
6812 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6813
6814 * numbers.h: Removed old comment about using SCM_CAR to access
6815 non-pair cells.
6816
6817 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
6818 the return value is signed. Thanks to Brian Crowder for the bug
6819 report.
6820
6821 (SCM_SRS): Avoid unnecessary casting and don't unpack input
6822 values. With this patch, SCM_SRS can be safely used for other
6823 types than scm_t_signed_bits. However, it should still better be
6824 an internal macro and thus be renamed to SCM_I_SRS.
6825
6826 (SCM_MAKINUM, SCM_INUM): Use proper casting.
6827
6828 2001-10-03 Gary Houston <ghouston@arglist.com>
6829
6830 * continuations.h, unif.h: in the descriptions of the bit patterns
6831 of the heap cells, make bit 0 the least significant.
6832
6833 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
6834
6835 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
6836 Thanks to Golubev I. N.
6837
6838 2001-09-25 Gary Houston <ghouston@arglist.com>
6839
6840 * ports.c (scm_drain_input): extended the docstring. thanks to
6841 Alex Schroeder and Thien-Thi Nguyen.
6842
6843 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
6844
6845 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
6846 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
6847 macros. (The NUM names might soon change.)
6848
6849 * numbers.h: Added missing declarations.
6850
6851 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
6852
6853 * Makefile.am: Distribute num2float.i.c.
6854
6855 * num2float.i.c: New file, multiply included by numbers.c, used
6856 to "templatize" the float <-> num conversion routines.
6857
6858 * numbers.c: New functions: scm_num2float, scm_float2num,
6859 scm_num2double, scm_double2num.
6860
6861 2001-09-21 Rob Browning <rlb@defaultvalue.org>
6862
6863 * .cvsignore: really add version.h
6864
6865 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
6866 Otherwise it fails on the alpha. However, we might rather choose
6867 this size conditionally.
6868
6869 * numbers.c (scm_gcd): change "k" to a long from an int.
6870 Otherwise it fails on the alpha. However, we might rather choose
6871 this size conditionally.
6872
6873 * error.c (scm_wta): coerce char* to intptr_t before int
6874 assignment.
6875
6876 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
6877 int.
6878
6879 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
6880
6881 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
6882
6883 * numbers.c (scm_integer_expt): Accept inexact integer in second
6884 argument. (Thanks to Bill Schottstaedt.)
6885
6886 2001-09-20 Rob Browning <rlb@defaultvalue.org>
6887
6888 * .cvsignore: add version.h
6889
6890 * versiondat.h.in: removed (obsolete).
6891
6892 * version.h.in: renamed from version.h.
6893 (SCM_GUILE_MAJOR_VERSION): new public macro.
6894 (SCM_GUILE_MINOR_VERSION): new public macro.
6895 (SCM_GUILE_MICRO_VERSION): new public macro.
6896
6897 * version.h: renamed to version.h.in.
6898
6899 * version.c
6900 (scm_major_version): support integer *_VERSION macros.
6901 (scm_minor_version): support integer *_VERSION macros.
6902 (scm_micro_version): support integer *_VERSION macros.
6903 (scm_version): support integer *_VERSION macros.
6904
6905 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
6906
6907 * error.c, error.h: Made error keys globally accessible.
6908 Applications might want to test for these or use them in a direct
6909 call to scm_error.
6910
6911 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
6912 routines are passed an inexact. This change in behavior is
6913 motivated by concordance with R5RS: It is more common that a
6914 primitive doesn't want to accept an inexact for an exact.
6915
6916 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
6917
6918 The following patch partially undoes my patch from 2001-06-30,
6919 where I added the function scm_gc_mark_cell_conservatively. The
6920 function is buggy, since it breaks guile during conservative
6921 marking if a pointer on the stack points directly into the list of
6922 free cells on the heap: With conservative cell marking this will
6923 cause the whole free list to be scanned and marked - boom!
6924
6925 * gc.c (allocated_mark, MARK, heap_segment,
6926 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
6927 (scm_gc_mark_cell_conservatively): Remove function
6928 scm_gc_mark_cell_conservatively and update the corresponding
6929 comments and uses accordingly. Thanks to Christopher Cramer for
6930 the patch. (Minor corrections by me.)
6931
6932 2001-09-15 Gary Houston <ghouston@arglist.com>
6933
6934 * root.h (scm_root_state): removed the continuation_stack and
6935 continuation_stack_ptr members, which have no apparent purpose.
6936 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
6937 removed.
6938
6939 * root.c (root_mark), init.c (restart_stack, start_stack), gc
6940 (scm_igc): remove all references to contination_stack and
6941 continuation_stack_ptr, avoiding allocation of a vector and
6942 useless processing during gc.
6943
6944 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6945
6946 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
6947
6948 (TCONC_IN): Make sure that the cell word 0 is initialized last.
6949
6950 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
6951
6952 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
6953
6954 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
6955 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
6956
6957 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6958
6959 * guardians.c (mark_dependencies_in_tconc,
6960 whine_about_self_centered_zombies, scm_init_guardians): Register
6961 the static global variable `self_centered_zombies' via
6962 scm_gc_register_root, to make some cdr-ing unnecessary.
6963
6964 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6965
6966 * backtrace.c (display_backtrace_file,
6967 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
6968 values, use SCM_FALSEP when comparing SCM values against #f.
6969 Thanks to Rob Browning for the bug report.
6970
6971 2001-09-12 Martin Baulig <martin@home-of-linux.org>
6972
6973 * strings.[ch] (scm_str2string): New function.
6974
6975 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
6976
6977 * gc.c (scm_done_free): Always subtract size from scm_mallocated
6978 when computing nm, even if it's negative.
6979 (scm_must_malloc): Abort on overflow of scm_mtrigger.
6980 (scm_must_realloc): Likewise.
6981
6982 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
6983
6984 * numbers.c (scm_sys_check_number_conversions): new function,
6985 defined if Guile is compiled in debugging mode. currently checks
6986 `scm_num2ulong', should check much much more.
6987
6988 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
6989 unsigned, ensure that it's positive. thanks to Martin Baulig!
6990
6991 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6992
6993 * __scm.h: Added new section about compile time selectable
6994 features.
6995
6996 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
6997 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
6998 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
6999 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
7000 Removed.
7001
7002 * deprecation.c (scm_include_deprecated_features): Simplified.
7003
7004 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
7005 `SCM_IMP´ instead of `!SCM_CELLP´.
7006
7007 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
7008 Extract side-effecting operations from macros.
7009
7010 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
7011 scm_top_level_lookup_closure_var and scm_system_transformer.
7012
7013 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
7014
7015 (heap_segment): Use CELL_P instead of SCM_CELLP.
7016
7017 * init.c (start_stack): Don't initialize
7018 scm_top_level_lookup_closure_var and scm_system_transformer.
7019
7020 * modules.c (scm_set_current_module): Don't access
7021 scm_top_level_lookup_closure_var and scm_system_transformer.
7022
7023 (scm_sym2var): Don't call scm_variable_set_name_hint.
7024
7025 (scm_post_boot_init_modules): Removed deprecated initializations.
7026
7027 * print.c (scm_ipruk): Don't access cell contents of non cells.
7028
7029 * strings.c (scm_string_set_x): All strings are writable.
7030
7031 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
7032 type. There is only one string type now.
7033
7034 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
7035
7036 * tags.h: Remove comments about two different string types.
7037
7038 (SCM_CELLP, SCM_NCELLP): Deprecated.
7039
7040 * variable.c (make_variable): Remove code variant for vcells.
7041
7042 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
7043 SCM_VARIABLE_LOC): Remove code variant for vcells.
7044
7045 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
7046 SCM_ENABLE_DEPRECATED with the logic reversed.
7047
7048 * dynl.c (moddata, registered_mods), dynl.[ch]
7049 (scm_register_module_xxx, scm_registered_modules,
7050 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
7051 (*top-level-lookup-closure*), eval.[ch]
7052 (scm_top_level_lookup_closure_var, scm_system_transformer,
7053 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
7054 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
7055 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
7056 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
7057 scm_unprotect_object), modules.c (root_module_lookup_closure,
7058 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
7059 beautify_user_module_x_var, try_module_autoload_var,
7060 scm_module_full_name), modules.[ch] (scm_the_root_module,
7061 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
7062 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
7063 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
7064 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
7065 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
7066 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
7067 scm_make_shared_substring), tags.h (scm_tc7_substring,
7068 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
7069 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
7070 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
7071 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
7072 Removed.
7073
7074 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
7075 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
7076 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
7077 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
7078 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
7079 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
7080 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
7081 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
7082 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
7083 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
7084 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
7085 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
7086 (setzone, scm_strftime, scm_strptime), vports.c
7087 (scm_make_soft_port): Remove calls to
7088 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
7089 gone, all strings are 0-terminated anyway.
7090
7091 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
7092 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
7093 double inclusion of the same headers to the SCM_<filename>_H
7094 format.
7095
7096 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
7097 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
7098 print.c (scm_iprin1): The type scm_tc7_substring does not exist
7099 any more.
7100
7101 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
7102 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
7103 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
7104 !SCM_<foo> over SCM_N<foo>.
7105
7106 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
7107
7108 * Makefile.am: Remove references to symbols-deprecated.c.
7109
7110 * symbols.c (scm_init_symbols): Don't initialize deprecated
7111 symbol functions.
7112
7113 * symbols-deprecated.c: Removed.
7114
7115 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
7116 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
7117 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
7118 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
7119 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
7120 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
7121 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
7122 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
7123 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
7124 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
7125 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
7126 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
7127 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
7128 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
7129 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
7130 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
7131 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
7132 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
7133 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
7134 scm_intern0, scm_sysintern, scm_sysintern0,
7135 scm_sysintern0_no_module_lookup, scm_symbol_value0,
7136 scm_string_to_obarray_symbol, scm_intern_symbol,
7137 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
7138 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
7139 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
7140 vectors.[ch] (scm_vector_set_length_x): Removed.
7141
7142 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
7143 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
7144 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
7145 Renamed the macros that are defined to inhibit double inclusion of
7146 the same headers to the SCM_<filename>_H format.
7147
7148 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
7149 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
7150 SCM_N<foo>.
7151
7152 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
7153
7154 * continuations.h (scm_contregs), debug.h (scm_debug_info,
7155 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
7156 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
7157 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
7158 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
7159 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
7160 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
7161 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
7162 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
7163 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
7164 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
7165 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
7166
7167 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
7168 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
7169 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
7170 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
7171 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
7172 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
7173 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
7174 double inclusion of the same headers to the SCM_<filename>_H
7175 format.
7176
7177 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
7178 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
7179 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
7180 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
7181 !SCM_<foo> over SCM_N<foo>.
7182
7183 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
7184
7185 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
7186 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
7187 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
7188 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
7189 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
7190 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
7191 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
7192 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
7193 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
7194 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
7195 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
7196 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
7197 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
7198 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
7199 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
7200 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
7201 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
7202 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
7203 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
7204 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
7205 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
7206 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
7207 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
7208 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
7209 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
7210 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
7211 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
7212 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
7213 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
7214 the macros that are defined to inhibit double inclusion of the
7215 same headers to the SCM_<filename>_H format.
7216
7217 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
7218
7219 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
7220 "scm_t_portable" with "scm_port_table" which was an artifact from
7221 the great "scm_*_t -> scm_t_" renaming.
7222
7223 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
7224
7225 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
7226 used; nfc. Thanks to Bill Schottstaedt.
7227
7228 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
7229 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
7230 Thanks to Chris Cramer.
7231
7232 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
7233
7234 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
7235
7236 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
7237 dynamic scope.
7238 * dynwind.h (scm_swap_bindings): Declare.
7239 * dynwind.c (scm_swap_bindings): Make non-static.
7240
7241 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
7242
7243 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
7244 doing exactly nothing about them). thanks Neil!
7245
7246 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
7247
7248 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
7249
7250 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
7251
7252 * gc.c: Fix omission bug: Add `heap_segment' forward decl
7253 (proto) in the case when either `GUILE_DEBUG' or
7254 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
7255
7256 (map_free_list): Fix typo: Ref `f' correctly.
7257
7258 Thanks to Chris Cramer.
7259
7260 2001-08-15 Rob Browning <rlb@defaultvalue.org>
7261
7262 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
7263 variables.
7264 (libpath.h): change libguileversion to libguileinterface.
7265
7266 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
7267
7268 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
7269 ChangeLog-2000. Thanks to Daniel Skarda!
7270
7271 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
7272
7273 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
7274 do it from the Makefile.
7275
7276 * Makefile.am: rearrange the snarfing slightly, so that .doc files
7277 are of a reasonable size.
7278
7279 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
7280
7281 * stacks.c (scm_make_stack): Improve docstring by explaining use
7282 of cutting args.
7283
7284 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
7285
7286 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
7287 scm_char_whitespace_p, scm_char_upper_case_p,
7288 scm_char_lower_case_p, scm_char_is_both_p): Do not require
7289 characters to fulfill isascii in addition to the primary
7290 predicate.
7291
7292 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7293
7294 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
7295 scm_istr2flo, scm_istring2number): Removed.
7296
7297 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
7298 SCM_SLOPPY_<foo>.
7299
7300 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
7301 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
7302 Added.
7303
7304 (scm_string_to_number): Use new number parser.
7305
7306 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
7307 handles complex numbers.
7308
7309 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
7310 SCM_<foo>_H.
7311
7312 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
7313 SCM_N<pred>.
7314
7315 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
7316
7317 (scm_i_mem2number): Added.
7318
7319 (scm_exact_to_inexact): Changed signature.
7320
7321 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
7322 here instead of within scm_i_mem2number. Call scm_i_mem2number
7323 instead of scm_istr2int and scm_istring2number.
7324
7325 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7326
7327 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
7328 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
7329 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
7330 !SCM_<pred> over SCM_N<pred>.
7331
7332 (scm_eval_body): Remove side effecting code from macro call.
7333
7334 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
7335 SCM_NIMP test.
7336
7337 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7338
7339 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
7340
7341 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
7342
7343 Removed vcell slot from structs.
7344
7345 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
7346 subsequent indices.
7347
7348 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
7349 zero. Use scm_vtable_index_layout instead of "0" when accessing
7350 said slot.
7351 (scm_init_struct): Remove vcell slot layout code from
7352 required_vtable_fields.
7353
7354 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
7355
7356 * goops.c (build_class_class_slots): Removed vcell slot
7357 definition.
7358
7359 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
7360 Removed vcell slot layout code.
7361 (scm_si_vcell): Removed.
7362
7363 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
7364
7365 "Glocs" have been removed.
7366
7367 * tags.h: Update tag system docs.
7368 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
7369 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
7370 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
7371 or SCM_NCONSP, respectively.
7372
7373 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
7374 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
7375 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
7376
7377 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
7378 tell glocs from structs.
7379
7380 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
7381
7382 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
7383 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
7384 instead of with glocs.
7385 (EVALCAR): Do not test for glocs.
7386 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
7387 condition.
7388 (scm_unmemocar): Do not handle glocs.
7389 (scm_m_atfop): Memoize as a variable, not as a gloc.
7390 (scm_eval_args, scm_deval_args): Do not handle glocs.
7391 (scm_ceval, scm_deval): Likewise.
7392
7393 * eval.h (SCM_XEVALCAR): Do not test for glocs.
7394 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
7395 Removed.
7396
7397 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
7398
7399 * dynwind.c (scm_swap_bindings): Likewise.
7400 (scm_dowinds): Updated to recognize lists of variables instead of
7401 lists of glocs.
7402
7403 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
7404
7405
7406 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
7407 where it is needed.
7408
7409 2001-07-25 Gary Houston <ghouston@arglist.com>
7410
7411 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
7412 docstrings to reflect the n-ary implementation.
7413
7414 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
7415
7416 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
7417 value of a variable, not the plain "return" statement.
7418
7419 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
7420
7421 * eval.c: Allow variables in memoized code (in addition to glocs).
7422 (scm_lookupcar): Handle variables in lost races. Replace symbol
7423 with variable directly, do not make a gloc.
7424 (scm_unmemocar): Rewrite variables using a reverse lookup, just
7425 like glocs.
7426 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
7427 the main switch.
7428
7429 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7430
7431 * variable.c (scm_i_variable_print): Use "value" instead of
7432 "binding" since a binding is the mapping between symbols and
7433 variables, not between variables and their values.
7434
7435 * tags.h (scm_tc7_variable): New.
7436 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
7437 * print.c (scm_iprin1): Likewise.
7438
7439 * variable.h (scm_tc16_variable): Removed.
7440 (SCM_VARIABLEP): Test for new tc7 code.
7441 (scm_i_variable_print): New.
7442 * variable.c (scm_tc16_variable): Removed.
7443 (variable_print): Renamed to scm_i_variable_print and made
7444 non-static.
7445 (variable_equal_p): Removed.
7446 (make_variable): Construct a tc7 object instead of a smob.
7447 (scm_init_variable): Do not register smob.
7448
7449 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
7450
7451 * tags.h: Include inttypes.h when we have it.
7452
7453 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
7454
7455 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
7456 is taken by the new SCM_IM_CALL_WITH_VALUES.
7457 * print.c (scm_isymnames): Update table accordingly.
7458
7459 2001-07-22 Gary Houston <ghouston@arglist.com>
7460
7461 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
7462 SCM_MAKINUM to convert regoff_t value to SCM.
7463
7464 2001-07-21 Gary Houston <ghouston@arglist.com>
7465
7466 * scmsigs.c: include sys/time.h for itimer stuff.
7467
7468 2001-07-19 Rob Browning <rlb@defaultvalue.org>
7469
7470 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
7471
7472 * c-tokenize.lex: add option %nounput to quiet warning.
7473 Add prototype for yylex to quiet warning.
7474
7475 * scmconfig.h.in: add flags for setitimer and getitimer.
7476
7477 * scmsigs.h (scm_init_scmsigs): new prototype.
7478 (scm_init_scmsigs): new prototype.
7479
7480 * scmsigs.c (s_scm_setitimer): new function.
7481 (s_scm_setitimer): new function.
7482
7483 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
7484
7485 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
7486 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
7487 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
7488 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
7489 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
7490 guile-func-name-check.in, guile-snarf-docs-texi.in,
7491 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
7492 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
7493 objprop.c, objprop.h, options.c, options.h, random.h,
7494 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
7495 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
7496 version.c, version.h: Updated copyright notice.
7497
7498 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7499
7500 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
7501 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
7502 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
7503 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
7504 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
7505 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
7506 sym_environment, scm_sym_change_class): New static variables to
7507 hold predefined symbols.
7508
7509 (build_class_class_slots): Build the list using scm_list_n
7510 instead of cons. Also, slots are already created as lists, thus
7511 making a call to maplist unnecessary.
7512
7513 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
7514 scm_class_direct_subclasses, scm_class_direct_methods,
7515 scm_class_precedence_list, scm_class_slots, scm_class_environment,
7516 scm_method_procedure, create_standard_classes, purgatory): Use
7517 predefined symbols.
7518
7519 (build_slots_list, compute_getters_n_setters,
7520 scm_sys_initialize_object, scm_sys_inherit_magic_x,
7521 get_slot_value_using_name, set_slot_value_using_name,
7522 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
7523 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
7524 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
7525
7526 (scm_sys_prep_layout_x): Minimize variable scopes.
7527
7528 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
7529 scm_sys_fast_slot_set_x): Fix signedness.
7530
7531 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
7532 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
7533 scm_memoize_method, scm_wrap_object): Use packing and unpacking
7534 when converting to and from SCM values.
7535
7536 (scm_enable_primitive_generic_x): Add rest argument checking.
7537
7538 (map, filter_cpl, maplist, scm_sys_initialize_object,
7539 scm_sys_prep_layout_x, slot_definition_using_name,
7540 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
7541 call_memoize_method, scm_make, scm_make_class): Prefer explicit
7542 predicates over SCM_N?IMP tests.
7543
7544 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
7545 checking.
7546
7547 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
7548 alias.
7549
7550 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7551
7552 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
7553
7554 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
7555
7556 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
7557
7558 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
7559
7560 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
7561
7562 * strings.c (s_scm_string): fix arg position in assert.
7563
7564 2001-07-11 Gary Houston <ghouston@arglist.com>
7565
7566 * strports.c (st_write): use memcpy, not strncpy. thanks to
7567 Dale P. Smith.
7568
7569 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
7570
7571 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
7572 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
7573 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
7574 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
7575 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
7576 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7577 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
7578 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
7579 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
7580 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
7581 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
7582 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
7583 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
7584 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
7585 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
7586 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
7587 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
7588 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
7589 weaks.c, weaks.h: Remove "face-lift" comment.
7590
7591 2001-07-08 Rob Browning <rlb@defaultvalue.org>
7592
7593 * .cvsignore: add stamp-h.in.
7594
7595 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
7596
7597 * hooks.c (scm_make_hook, scm_add_hook_x),
7598 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
7599 value info to the docstrings.
7600
7601 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
7602
7603 Some more compatibility patches for Windows.
7604
7605 * posix.c (getlogin): getlogin() implementation for Windows.
7606
7607 * backtrace.c, ioext.c: Include <stdio.h>.
7608
7609 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
7610 exist.
7611
7612 * cpp_sig_symbols.in: Added SIGBREAK.
7613
7614 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
7615
7616 * strports.c (scm_read_0str, scm_eval_0str): Call
7617 scm_c_read_string and scm_c_eval_string respectively, not
7618 themselves. Thanks to Dale P. Smith!
7619
7620 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7621
7622 * unif.c (scm_array_set_x): The variable args does not
7623 necessarily have to be a list. Further, got rid of a redundant
7624 SCM_NIMP test.
7625
7626 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7627
7628 * list.c (SCM_I_CONS): Make sure the cell type is initialized
7629 last.
7630
7631 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
7632 init_heap_seg): Fixed signedness.
7633
7634 (init_heap_seg): Replaced strange for-loop with a while loop.
7635
7636 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
7637
7638 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
7639
7640 The following patch adds conservative marking for the elements of
7641 free or allocated cells.
7642
7643 * gc.c (allocated_mark, heap_segment): New static functions.
7644
7645 (which_seg): Deleted, since the functionality is now provided by
7646 function heap_segment.
7647
7648 (map_free_list): Use heap_segment instead of which_seg.
7649
7650 (MARK): If cell debugging is disabled, mark free cells
7651 conservatively.
7652
7653 (scm_mark_locations, scm_cellp): Extracted the search for the
7654 heap segment of a SCM value into function heap_segment.
7655
7656 (scm_init_storage): Allocated cells must be marked
7657 conservatively.
7658
7659 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
7660
7661 The following patch changes the representation of weak vectors to
7662 double cells instead of using an extension of the vector's
7663 allocated memory.
7664
7665 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
7666 the result of SCM_WVECT_GC_CHAIN.
7667
7668 (scm_gc_sweep): Weak vectors don't have extra fields any more.
7669
7670 * weaks.c (allocate_weak_vector): New static function. It does
7671 not patch any previously created vector object during the
7672 construction of a weak vector, and thus doesn't need to switch
7673 off interrupts during vector creation.
7674
7675 (scm_make_weak_vector, scm_make_weak_key_hash_table,
7676 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7677 Use allocate_weak_vector to provide the new weak vector object.
7678
7679 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
7680 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
7681 now stored in the double cell.
7682
7683 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
7684 Use SCM_WVECT_TYPE.
7685
7686 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
7687 using an entry of the double cell.
7688
7689 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
7690
7691 * stamp-h.in: bye bye
7692
7693 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
7694
7695 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
7696 scm_eval_0str.
7697
7698 * load.c, load.h (scm_c_primitive_load,
7699 scm_c_primitive_load_path): New.
7700
7701 * strports.c, strports.h (scm_c_read_string): Renamed from
7702 scm_read_0str. Also, added "const" qualifier to argument.
7703 (scm_c_eval_string): Renamed from scm_eval_0str.
7704 (scm_read_0str, scm_eval_0str): Deprecated.
7705
7706 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
7707
7708 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
7709 SCM_LIST1.
7710
7711 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
7712
7713 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
7714 scm_list_n): New functions.
7715 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
7716 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
7717 (lots of files): Use the new functions.
7718
7719 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
7720
7721 * strings.c: #include "libguile/deprecation.h".
7722
7723 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
7724
7725 * read.c (scm_lreadr): When reading a hash token, check for a
7726 user-defined hash procedure first, so that overriding the builtin
7727 hash characters is possible (this was needed for implementing
7728 SRFI-4's read synax `f32(...)').
7729
7730 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
7731 because the latter is unsigned now and breaks comparisons like
7732 (n < (scm_t_signed_bits)MIN_VALUE).
7733
7734 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
7735
7736 * eval.h, eval.c (scm_call_4): New function.
7737
7738 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
7739 directly rather than dispatching to them via scm_ithrow and a lazy
7740 catch.
7741
7742 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
7743 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
7744 for trap handler procedures.
7745
7746 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
7747 procedures not being #f.
7748
7749 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
7750
7751 * Makefile.am (c-tokenize.c): add rule to generate it.
7752 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
7753
7754 filter-doc-snarfage.c: remove.
7755
7756 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
7757
7758 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
7759
7760 The following set of changes makes compiling Guile under various
7761 Windows compilers easier. Compilation under GNU systems should
7762 not be affected at all.
7763
7764 Thanks to Stefan Jahn for all necessary information, patches and
7765 testing.
7766
7767 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
7768 getpgrp, ttyname, primitive-fork and some header inclusion for
7769 Windows.
7770
7771 * random.c: Define M_PI, if not predefined and use __int64 for
7772 LONG64 under Windows.
7773
7774 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
7775 Windows and conditionalize some signal names.
7776
7777 * socket.c (scm_getsockopt): Added missing comma.
7778 Include socket library header under Windows.
7779
7780 * stime.c (CLKTCK): Add cast to int, to make it compile under
7781 Windows.
7782
7783 * ports.c (truncate): New function, compiled only under Windows.
7784
7785 * net_db.c: Do not declare errno under Windows.
7786
7787 * iselect.h, inet_aton.c: Include socket library headers under
7788 Windows.
7789
7790 * guile.c (inner_main): Under Windows, initialize socket library
7791 and initialize gdb_interface data structures.
7792
7793 * gdb_interface.h: Under Windows, gdb_interface cannot be
7794 initialized statically. Initialize at runtime instead.
7795
7796 * fports.c (write_all): ssize_t -> size_t.
7797 (fport_print): Conditionalize call to ttyname().
7798 (getflags): New function, compiled only under Windows.
7799
7800 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
7801 primitives chown, link, fcntl.
7802 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
7803 as path seperator.
7804
7805 * backtrace.c: Include <io.h> under Windows.
7806
7807 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
7808
7809 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
7810 declaration.
7811
7812 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
7813
7814 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
7815 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
7816 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
7817 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
7818 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
7819 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
7820 (scm_dynamic_wind, scm_dowinds), environments.c
7821 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
7822 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
7823 goops.c (GETVAR, purgatory, make_class_from_template,
7824 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
7825 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
7826 (scm_primitive_load), modules.c (scm_resolve_module,
7827 scm_c_define_module, scm_c_use_module, scm_c_export,
7828 module_variable, scm_eval_closure_lookup, scm_sym2var,
7829 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
7830 ports.c (scm_port_for_each), print.c (scm_printer_apply),
7831 properties.c (scm_primitive_property_ref), ramap.c (ramap,
7832 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
7833 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
7834 (scm_object_to_string, scm_call_with_output_string,
7835 scm_call_with_input_string), throw.c (scm_body_thunk,
7836 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
7837 scm_make_shared_array), vports.c (sf_flush, sf_write,
7838 sf_fill_input, sf_close): Use one of the above functions.
7839 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
7840
7841 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7842
7843 * filesys.c (scm_close), ports.c (scm_close_port,
7844 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
7845 instead of SCM_NEGATE_BOOL.
7846
7847 * filesys.c (scm_stat): Clean up type dispatch.
7848
7849 * filesys.c (scm_stat), ports.c (scm_input_port_p,
7850 scm_output_port_p): Get rid of redundant IM type check.
7851
7852 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
7853 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
7854 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
7855 scm_return_entry), numbers.c (scm_number_to_string), objects.c
7856 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
7857 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
7858 scm_addr_vector), stime.c (scm_strftime), strings.c
7859 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
7860 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
7861 scm_string_split), strports.c (scm_strport_to_string), symbols.c
7862 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
7863 instead of scm_makfromstr.
7864
7865 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
7866 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
7867 scm_read_hash_extend), stime.c (scm_strftime), strings.c
7868 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
7869 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
7870 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
7871 !SCM_<pred> over SCM_N<pred>.
7872
7873 * strings.[ch] (scm_makfromstr): Deprecated.
7874
7875 (scm_mem2string): New function, replaces scm_makfromstr.
7876
7877 * strings.c (scm_substring), strop.c (string_copy,
7878 scm_string_split), strports.c (scm_strport_to_string), symbols.c
7879 (scm_symbol_to_string): Fix gc problem.
7880
7881 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
7882 SCM_<foo>_H.
7883
7884 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
7885 warning about comparing signed and unsigned values. This fix is
7886 not optimal, since it won't work reliably if sizeof (c_start) >
7887 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
7888 solution is to define this macro as an inline function, thus
7889 allowing to specifiy the types of c_start and c_end.
7890
7891 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7892
7893 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
7894 scm_t_debug_frame*.
7895
7896 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
7897 Rename <foo>H to SCM_<foo>_H.
7898
7899 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
7900 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
7901
7902 (narrow_stack): Make i unsigned. Don't use side-effecting
7903 operations in conditions.
7904
7905 (narrow_stack, scm_make_stack, scm_stack_id,
7906 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
7907
7908 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
7909 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
7910 more.
7911
7912 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
7913 signedness.
7914
7915 (scm_last_stack_frame): Remove bogus `;´.
7916
7917 * stacks.h (SCM_FRAMEP): Fix type check.
7918
7919 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
7920
7921 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
7922 c-tokenize.c when doing maintainer-clean.
7923
7924 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
7925
7926 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
7927 simplify.
7928
7929 * eval.c: all hash signs are in column 0.
7930
7931 * Makefile.am (guile_filter_doc_snarfage): build using
7932 c-tokenize.c, not filter-doc-snarfage.c.
7933 rearrange snarfing dependencies a bit.
7934
7935 * c-tokenize.lex: new file.
7936
7937 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
7938
7939 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
7940 scm_t_srcpropso_plist. See the big type renaming.
7941 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
7942 Thanks to Seth Alves!
7943
7944 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
7945 they aren't defined already.
7946
7947 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7948
7949 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
7950 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
7951 problem.
7952
7953 * backtrace.c (display_expression, scm_set_print_params_x,
7954 display_application, display_frame, scm_backtrace), numbers.c
7955 (scm_istring2number), objects.c (scm_class_of,
7956 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
7957 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
7958
7959 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
7960 always positive.
7961
7962 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
7963 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
7964
7965 * objects.c (scm_class_of): Type fix.
7966
7967 (scm_mcache_lookup_cmethod): Improved comment, simplified,
7968 eliminated goto.
7969
7970 * pairs.h (scm_error_pair_access): The function can return if
7971 called recursively.
7972
7973 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
7974
7975 * init.c (scm_init_guile_1): Removed initialization of tag.c.
7976
7977 * gdbint.c, init.c: Removed inclusion of tag.h.
7978
7979 * tag.h, tag.c: Removed files.
7980
7981 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
7982
7983 2001-06-20 Gary Houston <ghouston@arglist.com>
7984
7985 * deprecation.c, extensions.c, rw.c: include string.h.
7986
7987 2001-06-19 Gary Houston <ghouston@arglist.com>
7988
7989 * filter-doc-snarfage.c (process): added ungetc in
7990 MULTILINE_COOKIE case since otherwise it fails when there's no
7991 space between the '(' and the quote of the following string
7992 (gcc 3.0).
7993
7994 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
7995
7996 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
7997
7998 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
7999
8000 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
8001 extension takes place.
8002 * strings.h (SCM_STRING_LENGTH): Likewise.
8003 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
8004
8005 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
8006 it.
8007
8008 * tags.h: Include <stdint.h> when we have it.
8009 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
8010 available. Else use "unsigned long".
8011 (scm_signed_bits_t): New.
8012
8013 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
8014 (SCM_INUM): Cast result to scm_signed_bits_t.
8015
8016 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
8017
8018 * mkstemp.c: Update path to #include file scmconfig.h.
8019 Thanks to Golubev I. N.
8020
8021 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8022
8023 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
8024
8025 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
8026 the macro definition.
8027
8028 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
8029 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
8030 instead of SCM_INST_TYPE.
8031
8032 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
8033 the object is a struct before accessing its struct flags.
8034
8035 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
8036
8037 2001-06-10 Gary Houston <ghouston@arglist.com>
8038
8039 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
8040 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
8041 work reliably anymore. try it from boot-9.scm instead.
8042
8043 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
8044
8045 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
8046 Thanks to Matthias Köppe!
8047
8048 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
8049
8050 * snarf.h, filter-doc-snarfage.c: more changes to cope with
8051 space-happy C preprocessors.
8052
8053 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
8054 inside cookies. thanks to Matthias Köppe!
8055
8056 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8057
8058 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
8059 keywords. Fix gc protection.
8060
8061 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
8062 operations in macro calls.
8063
8064 * pairs.c (scm_error_pair_access): Avoid recursion.
8065
8066 Thanks to Matthias Koeppe for reporting the bugs that correspond
8067 to the following set of patches.
8068
8069 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
8070 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
8071 bitvector base address using SCM_BITVECTOR_BASE.
8072
8073 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
8074 unsigned long*.
8075
8076 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8077
8078 * goops.c (SCM_CLASS_REDEF): Removed.
8079
8080 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
8081 SCM_<foo>_H.
8082
8083 Thanks to Matthias Koeppe for reporting the bugs that correspond
8084 to the following set of patches.
8085
8086 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
8087 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
8088 scm_sys_allocate_instance, clear_method_cache,
8089 scm_sys_invalidate_method_cache_x, scm_make,
8090 create_standard_classes, scm_make_port_classes, scm_make_class,
8091 scm_add_slot): Use SCM_SET_SLOT to set slot values.
8092
8093 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
8094
8095 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
8096
8097 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
8098 UNARY_ELTS_CODE): Remove bogus break statement.
8099
8100 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
8101 Don't access bit vectors elements as SCM objects.
8102
8103 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
8104 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
8105 Don't assign to an unpacked value.
8106
8107 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
8108
8109 * __scm.h (SCM_NORETURN): Moved here from error.h.
8110
8111 (SCM_UNUSED): New macro.
8112
8113 (SCM_DEBUG_PAIR_ACCESSES): New macro.
8114
8115 * backtrace.c (display_error_handler), continuations.c
8116 (continuation_print), debug.c (debugobj_print), dynwind.c
8117 (guards_print), environments.c (observer_print,
8118 core_environments_finalize, leaf_environment_cell,
8119 leaf_environment_print, eval_environment_print,
8120 eval_environment_observer, import_environment_define,
8121 import_environment_undefine, import_environment_print,
8122 import_environment_observer, export_environment_define,
8123 export_environment_undefine, export_environment_print,
8124 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
8125 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
8126 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
8127 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
8128 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
8129 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
8130 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
8131 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
8132 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
8133 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
8134 set_slot_value, test_slot_existence, scm_change_object_class,
8135 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
8136 default_setter), guardians.c (guardian_print, guardian_gc_init,
8137 guardian_zombify, whine_about_self_centered_zombies), guile.c
8138 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
8139 mallocs.c (malloc_print), numbers.c (scm_print_real,
8140 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
8141 end_input_default, scm_port_print, fill_input_void_port,
8142 write_void_port), root.c (root_print), smob.c (scm_mark0,
8143 scm_free0, scm_smob_print, scm_smob_apply_1_error,
8144 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
8145 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
8146 (scm_struct_free_0, scm_struct_free_standard,
8147 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
8148 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
8149 scm_handle_by_throw, scm_ithrow), weaks.c
8150 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
8151 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
8152 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
8153
8154 * error.h (SCM_NORETURN): Moved to __scm.h.
8155
8156 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
8157 Renamed <foo>H to SCM_<foo>_H.
8158
8159 * gc.c (debug_cells_gc_interval): New static variable.
8160
8161 (scm_assert_cell_valid): If selected by the user, perform
8162 additional garbage collections.
8163
8164 (scm_set_debug_cell_accesses_x): Extended to let the user specify
8165 if additional garbage collections are desired.
8166
8167 (mark_gc_async): If additional garbage collections are selected
8168 by the user, don't call the after-gc-hook. Instead require the
8169 user to run the hook manually.
8170
8171 * pairs.c (scm_error_pair_access): New function. Only compiled
8172 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
8173
8174 * pairs.h (SCM_VALIDATE_PAIR): New macro.
8175
8176 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
8177 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
8178 is a real pair object. (Glocs are also accepted, but that may
8179 change.) If not, abort with an error message.
8180
8181 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8182
8183 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
8184
8185 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
8186 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
8187
8188 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
8189
8190 * extensions.c (scm_c_register_extension): Allow NULL as library
8191 name.
8192 (load_extension): Ignore NULL library names when comparing.
8193
8194 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
8195 non-pointers are being compared. Thanks to Alexander Klimov!
8196
8197 2001-06-04 Gary Houston <ghouston@arglist.com>
8198
8199 * rw.c (scm_write_string_partial): new procedure implementing
8200 write-string/partial in (ice-9 rw).
8201 * rw.h: declare scm_write_string_partial.
8202
8203 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
8204
8205 * keywords.c (keyword_print): Substract 1 from length of symbol
8206 name, accounting for the silly dash.
8207
8208 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
8209 Do not emit deprecation warning.
8210
8211 Added exception notice to all files.
8212
8213 * dynl.c: Include "deprecation.h".
8214
8215 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
8216
8217 * dynl.c (scm_register_module_xxx, scm_registered_modules,
8218 scm_clear_registered_modules): Deprecated.
8219
8220 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
8221
8222 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
8223 guile-snarf-docs-texi.
8224
8225 * fports.c: HAVE_ST_BLKSIZE changed to
8226 HAVE_STRUCT_STAT_ST_BLKSIZE.
8227 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
8228 HAVE_STRUCT_STAT_ST_BLKSIZE.
8229
8230 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
8231 HAVE_STRUCT_STAT_ST_RDEV.
8232 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
8233 HAVE_STRUCT_STAT_ST_BLKSIZE.
8234 (scm_stat2scm): HAVE_ST_BLOCKS changed to
8235 HAVE_STRUCT_STAT_ST_BLOCKS.
8236
8237 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
8238
8239 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
8240 of scm_eval_x to allow module changes between the forms in the
8241 string. Set/restore module using scm_c_call_with_current_module.
8242
8243 * mkstemp.c: New file, slightly modified from libiberties
8244 mkstemps.c.
8245
8246 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
8247
8248 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
8249 filter-doc-snarfage.c: new files.
8250
8251 * Makefile.am: add stuff to [build,] use and distribute
8252 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
8253
8254 * guile-snarf.in: grok the new snarf output.
8255
8256 * snarf.h: make the output both texttools- and `read'-friendly.
8257
8258 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
8259 guile-snarf-docs. (should also deprecate, I guess. maybe not).
8260
8261 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
8262
8263 * print.c (scm_simple_format): Support "~~" and "~%". Signal
8264 error for unsupported format controls and for superflous
8265 arguments. Thanks to Daniel Skarda!
8266
8267 * print.h, print.c (scm_print_symbol_name): Factored out of
8268 scm_iprin1.
8269 (scm_iprin1): Call it.
8270
8271 * keywords.c (keyword_print): Use scm_print_symbol_name so that
8272 weird names are printed correctly.
8273
8274 * print.c (scm_print_symbol_name): Symbols whose name starts with
8275 `#' or `:' or ends with `:' are considered weird.
8276
8277 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8278
8279 * numbers.c (scm_difference, scm_divide): Clarified comments for -
8280 and /.
8281
8282 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8283
8284 * debug.h: Removed prototype for scm_eval_string.
8285
8286 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8287
8288 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
8289 (make-string 2000 #\!))' in an older version).
8290
8291 Change strncpy to memcpy to allow embedded NUL characters in
8292 symbol prefix.
8293
8294 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
8295
8296 * hooks.c (scm_create_hook): deprecated.
8297 (make_hook): deleted.
8298 (scm_make_hook): all the hook creation code is now here.
8299
8300 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
8301 a hook, make it permanent, and do a `scm_c_define' on it.
8302
8303 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
8304
8305 * socket.c (s_scm_inet_pton): fix docstring quoting.
8306 (s_scm_inet_ntop): ditto.
8307
8308 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
8309
8310 * hashtab.c (scm_internal_hash_fold): fix argument position in
8311 SCM_ASSERT.
8312
8313 * environments.c (s_scm_import_environment_set_imports_x): fix
8314 argument position in SCM_ASSERT.
8315
8316 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
8317 (s_scm_make_iloc): ditto.
8318
8319 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8320
8321 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
8322
8323 * eval.c (promise_print): Read the promise's value as an object.
8324
8325 (SCM_CEVAL): Don't perform side-effecting operations in macro
8326 parameters.
8327
8328 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
8329 conditional expression.
8330
8331 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
8332 initializer.
8333
8334 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
8335 text, removed redundant computation of effective_length and fixed
8336 the overflow check.
8337
8338 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
8339 values.
8340
8341 (wrap_init): Don't use SCM_C[AD]R for non pairs.
8342
8343 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
8344
8345 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
8346 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
8347
8348 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
8349
8350 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
8351 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
8352 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
8353 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
8354
8355 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
8356
8357 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
8358
8359 * ramap.c (ramap_rp): Removed bogus `;´.
8360
8361 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
8362 problem.
8363
8364 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
8365 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
8366 Read SCM objects rather than scm_bits_t values.
8367
8368 * tags.h (SCM_VOIDP_TEST): Removed.
8369
8370 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
8371 value of 2 now corresponds to the former 1, the current 1
8372 corresponds to the former situation that SCM_VOIDP_TEST was
8373 defined.
8374
8375 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
8376 If this appears to be not ANSI compliant, we will change it to
8377 typedef struct scm_unused_struct { } * SCM;
8378 Thanks to Han-Wen Nienhuys for the suggestion.
8379
8380 * unif.c (scm_array_set_x): Fix typing problem, and use
8381 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
8382 dealing with uniform vectors.
8383
8384 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
8385
8386 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
8387 (scm_igc): mark from them, too (precisely, not conservatively!).
8388
8389 * root.h (scm_gc_registered_roots): new object in
8390 scm_sys_protects.
8391
8392 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
8393 `scm_protect_object'. shouldn't call it at all, though, it seems.
8394
8395 * gc.c (scm_[un]protect_object): deprecated.
8396 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
8397 (scm_gc_[un]register_root[s]): new.
8398
8399 * gc.h: add prototypes for scm_gc_[un]protect_object,
8400 scm_gc_[un]register_root[s].
8401
8402 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
8403
8404 revert the controversial part of the 2001-05-24 changes.
8405
8406 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
8407
8408 * modules.c (scm_env_module): Exported to Scheme.
8409
8410 * eval.c (scm_debug_opts): New option `show-file-name'.
8411
8412 * debug.h (SCM_SHOW_FILE_NAME): New.
8413
8414 * backtrace.c: Include "libguile/filesys.h".
8415 (sym_base, display_backtrace_get_file_line,
8416 display_backtrace_file, display_backtrace_file_and_line): New.
8417 (display_frame): Call display_backtrace_file_and_line if that is
8418 requested.
8419 (display_backtrace_body): Call scm_display_backtrace_file if
8420 requested.
8421
8422 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
8423 Prototypes removed since there's no definition for these
8424 functions.
8425
8426 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8427
8428 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
8429 Changed use of scm_array->scm_array_t and
8430 scm_array_dim->scm_array_dim_t to enable build with
8431 --disable-deprecated.
8432
8433 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
8434
8435 The purpose of this set of changes is to regularize Guile's usage
8436 of ANSI C integral types, with the following ideas in mind:
8437
8438 - SCM does not nesessarily have to be long.
8439 - long is not nesessarily enough to store pointers.
8440 - long is not nesessarily the same size as int.
8441
8442 The changes are incomplete and possibly buggy. Please test on
8443 something exotic.
8444
8445 * validate.h
8446 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
8447 new macros.
8448
8449 * unif.h: type renaming:
8450 scm_array -> scm_array_t
8451 scm_array_dim -> scm_array_dim_t
8452 the old names are deprecated, all in-Guile uses changed.
8453
8454 * tags.h (scm_ubits_t): new typedef, representing unsigned
8455 scm_bits_t.
8456
8457 * stacks.h: type renaming:
8458 scm_info_frame -> scm_info_frame_t
8459 scm_stack -> scm_stack_t
8460 the old names are deprecated, all in-Guile uses changed.
8461
8462 * srcprop.h: type renaming:
8463 scm_srcprops -> scm_srcprops_t
8464 scm_srcprops_chunk -> scm_srcprops_chunk_t
8465 the old names are deprecated, all in-Guile uses changed.
8466
8467 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
8468 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
8469 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
8470 vectors.c, vports.c, weaks.c:
8471 various int/size_t -> size_t/scm_bits_t changes.
8472
8473 * random.h: type renaming:
8474 scm_rstate -> scm_rstate_t
8475 scm_rng -> scm_rng_t
8476 scm_i_rstate -> scm_i_rstate_t
8477 the old names are deprecated, all in-Guile uses changed.
8478
8479 * procs.h: type renaming:
8480 scm_subr_entry -> scm_subr_entry_t
8481 the old name is deprecated, all in-Guile uses changed.
8482
8483 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
8484 type renaming:
8485 scm_option -> scm_option_t
8486 the old name is deprecated, all in-Guile uses changed.
8487
8488 * objects.c: various long -> scm_bits_t changes.
8489 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
8490
8491 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
8492 SCM_I_FIXNUM_BIT.
8493
8494 * num2integral.i.c: new file, multiply included by numbers.c, used
8495 to "templatize" the various integral <-> num conversion routines.
8496
8497 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
8498 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
8499 deprecated.
8500 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
8501 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
8502 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
8503 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
8504 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
8505 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
8506 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
8507 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
8508 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
8509 scm_num2size): new functions.
8510
8511 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
8512
8513 * load.c: change int -> size_t in various places (where the
8514 variable is used to store a string length).
8515 (search-path): call scm_done_free, not scm_done_malloc.
8516
8517 * list.c (scm_ilength): return a scm_bits_t, not long.
8518 some other {int,long} -> scm_bits_t changes.
8519
8520 * hashtab.c: various [u]int -> scm_bits_t changes.
8521 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
8522 (scm_ihashx): n: uint -> scm_bits_t
8523 use scm_bits2num instead of scm_ulong2num.
8524
8525 * gsubr.c: various int -> scm_bits_t changes.
8526
8527 * goops.[hc]: various {int,long} -> scm_bits_t changes.
8528
8529 * gh_data.c (gh_num2int): no loss of precision any more.
8530
8531 * gh.h (gh_str2scm): len: int -> size_t
8532 (gh_{get,set}_substr): start: int -> scm_bits_t,
8533 len: int -> size_t
8534 (gh_<num>2scm): n: int -> scm_bits_t
8535 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
8536 (gh_length): return scm_bits_t, not unsigned long.
8537
8538 * gc.[hc]: various small changes relating to many things stopping
8539 being long and starting being scm_[u]bits_t instead.
8540 scm_mallocated should no longer wrap around.
8541
8542 * fports.h: type renaming:
8543 scm_fport -> scm_fport_t
8544 the old name is deprecated, all in-Guile uses changed.
8545
8546 * fports.c (fport_fill_input): count: int -> scm_bits_t
8547 (fport_flush): init_size, remaining, count: int -> scm_bits_t
8548
8549 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
8550 those prototypes, as the functions they prototype don't exist.
8551
8552 * fports.c (default_buffer_size): int -> size_t
8553 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
8554 default_size: int -> size_t
8555 (scm_setvbuf): csize: int -> scm_bits_t
8556
8557 * fluids.c (n_fluids): int -> scm_bits_t
8558 (grow_fluids): old_length, i: int -> scm_bits_t
8559 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
8560 scm_bits_t
8561 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
8562
8563 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
8564 the new and shiny SCM_NUM2INT.
8565
8566 * extensions.c: extension -> extension_t (and made a typedef).
8567
8568 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
8569 there are no nasty surprises if/when the various deeply magic tag
8570 bits move somewhere else.
8571
8572 * eval.c: changed the locals used to store results of SCM_IFRAME,
8573 scm_ilength and such to be of type scm_bits_t (and not int/long).
8574 (iqq): depth, edepth: int -> scm_bits_t
8575 (scm_eval_stack): int -> scm_bits_t
8576 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
8577 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
8578 i: int -> scm_bits_t
8579
8580 * environments.c: changed the many calls to scm_ulong2num to
8581 scm_ubits2num.
8582 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
8583
8584 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
8585
8586 * debug.h: type renaming:
8587 scm_debug_info -> scm_debug_info_t
8588 scm_debug_frame -> scm_debug_frame_t
8589 the old names are deprecated, all in-Guile uses changed.
8590 (scm_debug_eframe_size): int -> scm_bits_t
8591
8592 * debug.c (scm_init_debug): use scm_c_define instead of the
8593 deprecated scm_define.
8594
8595 * continuations.h: type renaming:
8596 scm_contregs -> scm_contregs_t
8597 the old name is deprecated, all in-Guile uses changed.
8598 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
8599 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
8600
8601 * continuations.c (scm_make_continuation): change the type of
8602 stack_size from long to scm_bits_t.
8603
8604 * ports.h: type renaming:
8605 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
8606 scm_port -> scm_port_t
8607 scm_ptob_descriptor -> scm_ptob_descriptor_t
8608 the old names are deprecated, all in-Guile uses changed.
8609 (scm_port_t.entry): int -> scm_bits_t.
8610 (scm_port_t.line_number): int -> long.
8611 (scm_port_t.putback_buf_size): int -> size_t.
8612
8613 * __scm.h (long_long, ulong_long): deprecated (they pollute the
8614 global namespace and have little value beside that).
8615 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
8616 SCM handle).
8617 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
8618 exist (for size_t & ptrdiff_t).
8619 (scm_sizet): deprecated.
8620
8621 * Makefile.am (noinst_HEADERS): add num2integral.i.c
8622
8623 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
8624
8625 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
8626 SCM_VARIABLE_INIT since that it what it used to be.
8627
8628 * deprecation.c (scm_include_deprecated_features): Make docstring
8629 ANSIsh. Thanks to Matthias Köppe!
8630
8631 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
8632
8633 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
8634 needed for weak-key hashtables.
8635
8636 * procs.c (scm_make_subr_with_generic): Add missing last argument
8637 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
8638
8639 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
8640 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
8641
8642 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
8643
8644 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
8645
8646 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
8647 `duplicate_string'. Do not use an indirect cell, store symbol
8648 directly in collision list of hash table.
8649 (duplicate_string): Removed.
8650
8651 * init.c (scm_init_guile_1): Call scm_init_extensions.
8652
8653 * Makefile.am: Add "extensions.c" and related files in all the
8654 right places.
8655
8656 * extensions.h, extension.c: New files.
8657
8658 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
8659
8660 * modules.h (scm_system_module_env_p): Move out of deprecated
8661 section.
8662
8663 * rw.h (scm_init_rw): Added prototype.
8664
8665 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
8666 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
8667 New functions. They replace scm_make_gsubr and
8668 scm_make_gsubr_with_generic. The `make' variants only create the
8669 gsubr object, while the `define' variants also put it into the
8670 current module. Changed all callers.
8671 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
8672
8673 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
8674 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
8675 functions. They replace scm_make_subr, scm_make_subr_opt and
8676 scm_make_subr_with_generic. The `make' variants only create the
8677 subr object, while the `define' variants also put it into the
8678 current module. Changed all callers.
8679 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
8680 Deprecated.
8681
8682 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
8683 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
8684 the comments above.
8685
8686 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
8687
8688 * throw.c (scm_lazy_catch): Slight docstring clarification.
8689
8690 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
8691
8692 * throw.c: Lazy-catch handlers are no longer allowed to return.
8693 Fixed comments throughout.
8694 (scm_ithrow): Signal an error when a lazy-catch handler returns.
8695 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
8696 recognized as such.
8697
8698 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
8699 refered to s_scm_minor_version previously.
8700
8701 * modules.h, modules.c: Moved around a lot of code so that
8702 deprecated features appear at the bottom.
8703 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
8704 module_prefix, make_modules_in_var, beautify_user_module_x_var,
8705 scm_the_root_module, scm_make_module, scm_ensure_user_module,
8706 scm_load_scheme_module): Deprecated.
8707 (scm_system_module_env_p): Return SCM_BOOL_T directly for
8708 environments corresponding to the root module.
8709 (convert_module_name, scm_c_resolve_module,
8710 scm_c_call_with_current_module, scm_c_define_module,
8711 scm_c_use_module, scm_c_export): New.
8712 (the_root_module): New static variant of scm_the_root_module. Use
8713 it everywhere instead of scm_the_root_module.
8714
8715 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
8716 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
8717 (scm_c_with_fluid): New.
8718 (scm_with_fluids): Use scm_c_with_fluids instead of
8719 scm_internal_with_fluids.
8720
8721 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
8722 `scm_init_goops'. Do not explicitly create/switch modules.
8723 Return SCM_UNSPECIFIED.
8724 (scm_init_goops): Only register `%init-goops-builtins' procedure.
8725 (scm_load_goops): Use scm_c_resolve_module instead of
8726 scm_resolve_module.
8727
8728 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
8729 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
8730 `scm_init_rw' prior to loading the startup files.
8731
8732 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
8733 scm_init_rdelim. Do not explicitly create/switch modules.
8734 Return SCM_UNSPECIFIED.
8735 (scm_init_rdelim): Only register `%init-rdelim-builtins'
8736 procedure.
8737
8738 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
8739 explicitly create/switch modules. Return SCM_UNSPECIFIED.
8740 (scm_init_rw): Only register `%init-rw-builtins' procedure.
8741
8742 * script.c (scm_shell): Evaluate the compiled switches in the
8743 current module, not in the root module.
8744
8745 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
8746
8747 * fluids.c (scm_c_with_fluids): Rename from
8748 scm_internal_with_fluids.
8749 (scm_internal_with_fluids): Deprecated.
8750 (scm_c_with_fluid): New.
8751
8752 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8753
8754 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
8755
8756 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
8757 accessed with SCM_C[AD]R.
8758
8759 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
8760
8761 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
8762
8763 * version.c (s_scm_major_version): doc fixes.
8764 (s_scm_minor_version): doc fixes.
8765 (s_scm_minor_version): new function.
8766
8767 * version.h (scm_init_version): new function.
8768
8769 * versiondat.h.in: add GUILE_MICRO_VERSION.
8770
8771 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8772
8773 * deprecation.c (scm_init_deprecation): Renamed
8774 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
8775
8776 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
8777
8778 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
8779 dependent on cpp_cnvt.awk
8780
8781 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8782
8783 * script.c (scm_compile_shell_switches): New command line option
8784 `--use-srfi' for loading a list of SRFIs on startup.
8785 (scm_shell_usage): Added `--use-srfi' to help message.
8786
8787 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
8788
8789 Merged from mvo-vcell-cleanup-1-branch.
8790
8791 The concept of vcells has been removed from Guile. With it,
8792 explicit obarrays and associated operations are gone. Use
8793 hashtables instead of obarrays.
8794
8795 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
8796 result as variable instead of vcell. Glocs no longer point to a
8797 vcell but to a variable. Use scm_c_define instead of
8798 scm_sysintern and treat the result as a variable (which it is),
8799 not a vcell.
8800
8801 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
8802 SCM_DEFVARIABLEP): Deprecated.
8803 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
8804 (variable_print): Do not print name of variable.
8805 (variable_equalp): Compare values, not vcells.
8806 (anonymous_variable_sym): Removed.
8807 (make_vcell_variable): Removed.
8808 (make_variable): New, as replacement.
8809 (scm_make_variable, scm_make_undefined_variable): Do not take name
8810 hint parameter.
8811 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
8812 error in that case.
8813 (scm_builtin_variable): Deprecated.
8814
8815 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
8816 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
8817 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
8818 scm_sysintern, scm_sysintern0, scm_symbol_value0,
8819 scm_string_to_obarray_symbol, scm_intern_symbol,
8820 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
8821 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
8822 Deprecated and moved to "symbols-deprecated.c".
8823 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
8824 (scm_init_symbols): Call scm_init_symbols_deprecated.
8825 * symbols-deprecated.c: New file.
8826 * Makefile.am: Added symbols-deprecated.c and related files in all
8827 the right places.
8828
8829 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8830 SCM_GLOBAL_VCELL_INIT): Deprecated.
8831 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
8832 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
8833
8834 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
8835 SCM_GLOC_SYM.
8836
8837 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
8838 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
8839 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
8840 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
8841 Changed according to the `throughout' comments.
8842
8843 * modules.h, modules.c (scm_module_system_booted_p): Changed type
8844 to `int'.
8845 (scm_module_type): Removed.
8846 (the_root_module): Renamed to the_root_module_var. Now points to
8847 a variable instead of a vcell. Updated all uses.
8848 (scm_the_root_module): Return SCM_BOOL_F when module systems
8849 hasn't been booted yet.
8850 (SCM_VALIDATE_STRUCT_TYPE): Removed.
8851 (scm_post_boot_init_modules): Made static.
8852 (scm_set_current_module): Call scm_post_boot_init_modules on first
8853 call.
8854 (make_modules_in, beautify_user_module_x, resolve_module,
8855 try_module_autoload, module_make_local_var_x): Tacked on "_var"
8856 suffix. Now point to variables instead of vcells. Updated all
8857 uses.
8858 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
8859 and return SCM_BOOL_F in that case.
8860 (scm_module_transformer): Likewise.
8861 (sym_module, scm_lookup_closure_module, scm_env_module): New.
8862 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
8863 (scm_eval_closure_lookup): Do not allow new definitions when
8864 `interface' flag is set.
8865 (scm_standard_interface_eval_closure): New.
8866 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
8867 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
8868 scm_c_lookup, scm_c_module_define, scm_c_define,
8869 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
8870 scm_modules_prehistory): New.
8871 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
8872 instead of scm_intern0.
8873
8874 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
8875 symbol.
8876
8877 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
8878 hashtable operations to maintain the keywords, not obarray ones.
8879
8880 * init.c (scm_load_startup_files): Do not call
8881 scm_post_boot_init_modules. This is done by
8882 scm_set_current_module now.
8883 (scm_init_guile_1): Call scm_modules_prehistory. Call
8884 scm_init_variable early on.
8885
8886 * goops.c (s_scm_sys_goops_loaded): Get
8887 var_compute_applicable_methods from scm_sym2var, not from a direct
8888 invocation of scm_goops_lookup_closure.
8889
8890 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
8891
8892 * gc.c: Added simple debugging hack to mark phase of GC: When
8893 activated, do not tail-call scm_gc_mark. This gives nice
8894 backtraces.
8895 (scm_unhash_name): Removed.
8896
8897 * feature.c (features): Renamed to features_var. Now points to a
8898 variable instead of a vcell. Updated all uses.
8899
8900 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
8901 `scm_current_module_lookup_closure' which will do the right thing
8902 when the module system hasn't been booted yet.
8903 (SCM_GLOC_SYM): Removed.
8904 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
8905 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
8906
8907 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
8908 instead of with vcells. Do not overwrite `var' with the result of
8909 the lookup, use the new `real_var' instead. Remove `var2' in
8910 exchange (which was only used with threads).
8911 (sym_three_question_marks): New.
8912 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
8913 `SCM_GLOC_SYM'.
8914 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
8915 (scm_m_atfop): Expect the function definition to be a variable
8916 instead of a vcell.
8917 (scm_macroexp): Do not use `unmemocar', explicitely remember the
8918 symbol instead.
8919 (scm_unmemocopy): Removed thoughts about anti-macro interface.
8920 (scm_eval_args): Use more explicit code in the gloc branch of the
8921 atrocious struct ambiguity test. The optimizer will sort this
8922 out.
8923 (scm_deval_args): Likewise.
8924 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
8925 remember the symbol instead. Added some comments where
8926 scm_tc3_cons_gloc really exclusively refers to structs.
8927 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
8928 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
8929 of scm_sysintern in general.
8930
8931 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
8932 explicit magic.
8933
8934 * debug.c (s_scm_make_gloc): Only allow proper variables, no
8935 pairs. Put the variable directly in the gloc.
8936 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
8937 (scm_init_debug): Use scm_c_define instead scm_sysintern.
8938
8939 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
8940
8941 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
8942 scm_the_last_stack_fluid_var. It now points to a variable instead
8943 of a vcell. Updated all uses.
8944 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
8945 instead of a vcell. Updated all uses.
8946
8947 * _scm.h: Include "variables.h" and "modules.h" since almost
8948 everybody needs them now.
8949
8950 * root.h (scm_symhash, scm_symhash_vars): Removed.
8951 * gc.c (scm_init_storage): Do not initialize them.
8952
8953 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8954
8955 * eval.c (scm_init_eval): Initialize scm_undefineds and
8956 scm_listofnull.
8957
8958 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
8959 like the SCM_NEWCELL macro counterparts.
8960
8961 (scm_init_storage, scm_init_gc): Moved initialization of
8962 scm_tc16_allocated from scm_init_gc to scm_init_storage.
8963
8964 (scm_init_storage): Moved initialization of scm_undefineds and
8965 scm_listofnull to eval.c, initializion of scm_nullstr to
8966 strings.c, initializion of scm_nullvect to vectors.c.
8967
8968 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
8969 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
8970
8971 * init.c (scm_init_guile_1): Reordered some initializations and
8972 added dependcy information comments.
8973
8974 * load.c (scm_init_load): Use scm_nullstr.
8975
8976 * strings.c (scm_init_strings): Initialize scm_nullstr.
8977
8978 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
8979
8980 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
8981
8982 * values.c (print_values): Print as a unreadable object, not as
8983 multiple lines. Thanks to Matthias Köppe!
8984
8985 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8986
8987 * deprecation.c: Fixed copyright date.
8988
8989 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
8990 DEPRECATION_H to SCM_DEPRECATION_H.
8991
8992 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
8993
8994 * guile-doc-snarf.in: Update copyright.
8995 Fix relative path bug. Thanks to Sergey Poznyakoff.
8996
8997 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
8998
8999 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
9000 accept open ports. Thanks to Quetzalcoatl Bradley!
9001
9002 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9003
9004 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
9005 has 779 primitives on startup.
9006
9007 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
9008
9009 * eval.c (scm_i_eval): Copy expression before passing it to
9010 SCM_XEVAL. The copy operation was removed unintendedly during my
9011 change on 2001-03-25.
9012
9013 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
9014
9015 from Matthias Köppe (thanks!):
9016
9017 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
9018 portable.
9019
9020 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
9021 docstring.
9022
9023 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9024
9025 * gc.c (scm_init_gc): Added FIXME comment.
9026
9027 * hooks.c: Since hooks don't have a name any more, it is not
9028 necessary to include objprop.h.
9029
9030 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
9031
9032 (symbol_name, scm_make_hook_with_name): Removed.
9033
9034 (scm_create_hook): Don't set the hook's name property.
9035
9036 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
9037
9038 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
9039
9040 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
9041
9042 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
9043 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
9044 FLOBUFLEN and define it unconditionally.
9045
9046 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
9047
9048 * gh_data.c (gh_lookup): Call gh_module_lookup with
9049 `scm_current_module ()', not `#f'.
9050 (gh_module_lookup): Expect a module instead of an obarray as first
9051 argument and do lookup in that module.
9052
9053 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
9054 arrays. The length of array is already determined differently and
9055 scm_uniform_vector_length does not work on arrays.
9056
9057 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
9058
9059 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
9060 as well. "SCM (*)(...)" does not work on RedHat 7.1.
9061
9062 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
9063 they are not used. Changed `wrong type' error into `wrong num
9064 args' error. Changed all callers.
9065
9066 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
9067 arguments are supplied.
9068
9069 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
9070
9071 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
9072 describe `regexp/notbol' and `regexp/noteol' execution flags.
9073
9074 * strop.c (scm_substring_move_x): Doc fix; nfc.
9075
9076 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
9077
9078 * objects.c, objects.h (scm_valid_object_procedure_p): New.
9079 (scm_set_object_procedure_x): Use it to check argument. Fix
9080 docstring.
9081
9082 * evalext.c (scm_definedp): Fix docstring.
9083
9084 2001-05-05 Gary Houston <ghouston@arglist.com>
9085
9086 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
9087 support.
9088
9089 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
9090
9091 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
9092 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
9093 Change R4RS references to R5RS.
9094
9095 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
9096 docstring source are correctly reproduced in the output (ii)
9097 we don't anymore get occasional trailing quotes. Also reorganized
9098 and commented the code a little.
9099
9100 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
9101 fixes.
9102
9103 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9104
9105 * strop.c (scm_string_split): New procedure.
9106
9107 * strop.h (scm_string_split): Added prototype.
9108
9109 2001-05-04 Gary Houston <ghouston@arglist.com>
9110
9111 * socket.c: define uint32_t if netdb.h doesn't. thanks to
9112 Dale P. Smith.
9113
9114 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
9115
9116 * rw.c: Include "modules.h" and "strports.h".
9117
9118 * net_db.h (scm_gethost): Added prototype.
9119
9120 * deprecation.h, deprecation.c: New.
9121 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
9122 (DOT_X_FILES): Added "deprecation.x".
9123 (modinclude_HEADERS): Added "deprecation.h".
9124
9125 * init.c: Include "deprecation.h".
9126 (scm_init_guile_1): Call scm_init_deprecation.
9127
9128 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
9129
9130 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
9131 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
9132 New.
9133
9134 2001-04-29 Gary Houston <ghouston@arglist.com>
9135
9136 * rw.c: new file, implementing C part of module (ice-9 rw).
9137 (scm_read_string_x_partial): moved from ioext.c
9138 (scm_init_rw): new proc.
9139 * rw.h: new file.
9140 init.c: include rw.h and call scm_init_rw.
9141 Makefile.am: include rw.c and rw.h.
9142
9143 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
9144
9145 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
9146 know what's supposed to happen to it.
9147
9148 * list.h (scm_list_star): deprecation expired - removed.
9149
9150 * numbers.h (scm_dblproc): deprecation expired - removed.
9151 (SCM_UNEGFIXABLE): deprecation expired - removed.
9152 (SCM_FLOBUFLEN): deprecation expired - removed.
9153 (SCM_INEXP): deprecation expired - removed.
9154 (SCM_CPLXP): deprecation expired - removed.
9155 (SCM_REAL): deprecation expired - removed.
9156 (SCM_IMAG): deprecation expired - removed.
9157 (SCM_REALPART): deprecation expired - removed.
9158 (scm_makdbl): deprecation expired - removed.
9159 (SCM_SINGP): deprecation expired - removed.
9160 (SCM_NUM2DBL): deprecation expired - removed.
9161 (SCM_NO_BIGDIG): deprecation expired - removed.
9162
9163 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
9164 (scm_tc_dblr): deprecation expired - removed.
9165 (scm_tc_dblc): deprecation expired - removed.
9166 (scm_tc16_flo): deprecation expired - removed.
9167 (scm_tc_flo): deprecation expired - removed.
9168
9169 * tag.h (scm_tag): deprecation expired - removed.
9170
9171 * tag.c: (scm_tag): deprecation expired - removed.
9172
9173 * ioext.c: (scm_fseek): deprecation expired - removed.
9174
9175 * ioext.h (scm_fseek): deprecation expired - removed.
9176
9177 * gh_data.c (gh_int2scmb): deprecation expired - removed.
9178
9179 * gh.h (gh_int2scmb): deprecation expired - removed.
9180
9181 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
9182
9183 * stacks.c (scm_make_stack): Fix typo in docstring.
9184
9185 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
9186
9187 * error.c (scm_sysmissing): deprecation expired - removed.
9188
9189 * error.h (scm_sysmissing): deprecation expired - removed.
9190
9191 * gc.c
9192 (scm_init_gc): gc-thunk deprecation expired - removed.
9193 (scm_gc_vcell): deprecation expired - removed.
9194 (gc_async_thunk): scm_gc_vcell related code removed.
9195
9196 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
9197
9198 * strings.h
9199 (SCM_NSTRINGP): deprecation expired - removed.
9200 (SCM_NRWSTRINGP): deprecation expired - removed.
9201
9202 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
9203
9204 * chars.h
9205 (SCM_ICHRP): deprecation expired - removed.
9206 (SCM_ICHR): deprecation expired - removed.
9207 (SCM_MAKICHR): deprecation expired - removed.
9208
9209 * ports.h
9210 (SCM_INPORTP): deprecation expired - removed.
9211 (SCM_OUTPORTP): deprecation expired - removed.
9212
9213 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
9214
9215 * modules.c (scm_module_type): New.
9216 (scm_post_boot_init_modules): Initialize from Scheme value.
9217 (the_module, scm_current_module, scm_init_modules): the_module is
9218 now a C only fluid.
9219 (scm_current_module): Export to Scheme.
9220 (scm_set_current_module): Do not call out to Scheme, do all the
9221 work in C. Export procedure to Scheme. Only accept modules, `#f'
9222 is no longer valid as the current module. Only set
9223 scm_top_level_lookup_closure_var and scm_system_transformer when
9224 they are not deprecated.
9225 (scm_module_transformer, scm_current_module_transformer): New.
9226
9227 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
9228 scm_current_module_transformer, scm_module_transformer): New.
9229
9230 * gh_data.c: Removed FIXME comment about gh_lookup returning
9231 SCM_UNDEFINED. That's the right thing to do.
9232
9233 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
9234 into the conditionally compiled sections.
9235 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
9236 scm_current_module_transformer instead of scm_system_transformer.
9237 * init.c (start_stack): Move initialization of
9238 scm_system_transformer to the deprecated section.
9239
9240 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
9241
9242 * throw.c (scm_throw): Correct docstring.
9243
9244 2001-04-22 Gary Houston <ghouston@arglist.com>
9245
9246 * socket.c: attempted to improve the docstrings slightly.
9247
9248 * net_db.c: remove bogus "close" declaration.
9249 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
9250 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
9251 moved to socket.c.
9252 * net_db.h: declarations moved too.
9253
9254 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
9255 long.
9256 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
9257 (VALIDATE_INET6): new macro.
9258 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
9259 inet-pton and inet-ntop.
9260 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
9261 (scm_addr_vector): use ipv6_net_to_num.
9262
9263 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9264
9265 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
9266 smob number explicitly. Use SCM_TC2SMOBNUM instead.
9267
9268 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
9269 when compiled in debug mode.
9270
9271 (scm_gc_sweep): Only call smob's free function if it is defined.
9272
9273 * print.c (scm_iprin1): No need to check for validity of smob
9274 type or existence of print function.
9275
9276 * smob.[ch] (scm_smobs): Made into a fixed size global array.
9277 Resizing will not work well with preemptive threading.
9278
9279 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
9280
9281 (scm_make_smob_type): Extracted initialization of smob
9282 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
9283 of the critical section.
9284
9285 (scm_smob_prehistory): Initialize all smob descriptors. By
9286 default, don't assign a smob free function: Most smob types don't
9287 need one.
9288
9289 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
9290
9291 2001-04-21 Gary Houston <ghouston@arglist.com>
9292
9293 * socket.c (FLIP_NET_HOST_128): new macro.
9294 (scm_fill_sockaddr): use new macro.
9295 (scm_addr_vector): completed IPv6 address support. added const
9296 to the address parameter.
9297
9298 2001-04-20 Gary Houston <ghouston@arglist.com>
9299
9300 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
9301 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
9302 is defined.
9303 (scm_addr_vector): use a switch instead of multiple if statements.
9304 Add support for IPv6 (incomplete) .
9305 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
9306
9307 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
9308
9309 * struct.c (scm_free_structs): Only pairs may be accessed with
9310 SCM_C[AD]R.
9311
9312 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
9313
9314 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
9315
9316 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
9317 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
9318 parentheses in order to get the correct associativity.
9319
9320 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
9321
9322 * unif.c (scm_array_to_list): Added missing handling of arrays of
9323 bytes. Thanks to Masao Uebayashi for the bug report.
9324
9325 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
9326
9327 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
9328 consistently.
9329
9330 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
9331
9332 * procs.h (SCM_CLOSURE_FORMALS): New macro.
9333
9334 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
9335 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
9336 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
9337 SCM_CLOSURE_FORMALS.
9338
9339 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
9340 (scm_i_procedure_arity): Prefer stronger predicates like
9341 SCM_NULLP or SCM_FALSEP over SCM_IMP.
9342
9343 * macros.c (macro_print): Extracted macro printing code from
9344 print.c and simplified it.
9345
9346 (scm_macro_type): Use SCM_MACRO_TYPE;
9347
9348 (scm_init_macros): Use macro_print for printing macros.
9349
9350 * print.c (scm_print_opts): Improved option documentation.
9351
9352 (scm_iprin1): Extracted printing of macros to macros.c.
9353 Simplified printing of ordinary closures.
9354
9355 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
9356 Martin Grabmueller for the bug report.
9357
9358 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
9359
9360 This patch eliminates some further applications of SCM_C[AD]R to
9361 non pair cells.
9362
9363 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
9364 never been applied to real pairs.
9365
9366 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
9367
9368 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
9369
9370 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
9371 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
9372 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
9373
9374 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
9375 Added.
9376
9377 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
9378 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
9379
9380 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
9381 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
9382 SCM_SET{AND,OR}_CAR.
9383
9384 2001-04-17 Gary Houston <ghouston@arglist.com>
9385
9386 * some initial support for IPv6:
9387
9388 * socket.c (scm_fill_sockaddr): improve the argument validation.
9389 don't allocate memory until all args are checked. instead of
9390 unconditional memset of soka, try setting sin_len to 0 if
9391 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
9392 (scm_socket, scm_connect): extend docstrings for IPv6.
9393 (scm_init_socket): intern AF_INET6 and PF_INET6.
9394
9395 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
9396
9397 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
9398 matches SCM_DEFER_INTS at the beginning of the function.
9399
9400 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
9401
9402 * gc.c (scm_igc): Unconditionally call
9403 SCM_CRITICAL_SECTION_START/END.
9404
9405 * fluids.c (next_fluid_num): Unconditionally call
9406 SCM_CRITICAL_SECTION_START/END.
9407 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
9408
9409 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
9410 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
9411 Removed.
9412
9413 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
9414 Defined as nothing for the case of !defined(USE_THREADS).
9415 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
9416 Removed.
9417 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
9418 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
9419 LINE.
9420 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
9421 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
9422 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
9423 SCM_CRITICAL_SECTION_START/END.
9424 (SCM_REALLOW_INTS: Bug fix. Don't call
9425 SCM_THREAD_SWITCHING_CODE.
9426 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
9427 SCM_THREAD_SWITCHING_CODE directly.
9428 (SCM_ENTER_A_SECTION): Unconditionally use
9429 SCM_CRITICAL_SECTION_START/END. (was:
9430 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
9431
9432 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9433
9434 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
9435 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
9436 allowed to explicitly set this macro via the CFLAGS variable
9437 during make.
9438
9439 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
9440 (SCM_THREAD_CRITICAL_SECTION_START,
9441 SCM_THREAD_CRITICAL_SECTION_END): Renamed
9442 SCM_THREAD_CRITICAL_SECTION_START/END to
9443 SCM_CRITICAL_SECTION_START/END.
9444
9445 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
9446
9447 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
9448 instead of bzero.
9449
9450 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
9451 (MISSING_BZERO_DECL): Remove the declaration.
9452
9453 Thanks to NIIBE Yutaka.
9454
9455 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
9456
9457 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
9458 goops module should be registered in order to work for an
9459 application which uses libguile statically linked.)
9460
9461 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9462
9463 * numbers.[ch] (scm_num2long, scm_num2long_long,
9464 scm_num2ulong_long, scm_num2ulong): Argument position is an
9465 unsigned integer.
9466
9467 * environments.c (eval_environment_folder,
9468 import_environment_folder), gh_data.c (gh_scm2longs,
9469 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
9470 for integers and pointers, respectively.
9471
9472 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
9473 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
9474 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
9475 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
9476
9477 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
9478 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
9479 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
9480 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
9481 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
9482 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
9483
9484 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
9485
9486 * strings.c (scm_read_only_string_p): Update docstring to reflect
9487 current (non-)usage of "read only" strings.
9488 (scm_make_shared_substring): Clarify docstring by changing
9489 "semantics" to "arguments".
9490
9491 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9492
9493 * hooks.c (scm_make_hook, scm_make_hook_with_name),
9494 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
9495 improvements.
9496
9497 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9498
9499 The following changes make the documentation more consistent.
9500
9501 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
9502 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
9503 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
9504 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
9505 ... @end lisp.
9506
9507 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
9508 (scm_array_dimensions, scm_make_shared_array),
9509 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
9510 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
9511 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
9512 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
9513 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
9514 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
9515 macros.c (scm_makmmacro), list.c (scm_append), environments.c
9516 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
9517 @example ... @end example to @lisp ... @end lisp.
9518
9519 * weaks.c (scm_weak_vector): Corrected docstring.
9520
9521 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
9522 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
9523 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
9524 (scm_hashx_set_x, scm_hashx_get_handle),
9525 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
9526 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
9527 vectors.c (scm_vector_fill_x), strings.c
9528 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
9529 objprop.c (scm_set_object_properties_x):
9530 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
9531 strports.c (scm_call_with_input_string), ports.c
9532 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
9533 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
9534 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
9535 (scm_make_weak_vector,scm_weak_vector_p),
9536 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
9537 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
9538 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
9539 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
9540 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
9541 Made parameter names match documentation by renaming parameters
9542 and/or fixing docstrings.
9543
9544 * numbers.c (scm_ash): Corrected Texinfo markup.
9545
9546 * strop.c (scm_string_index, scm_string_rindex),
9547 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
9548
9549 * vports.c (scm_make_soft_port), unif.c
9550 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
9551 (scm_dimensions_to_uniform_array, scm_transpose_array),
9552 (scm_array_in_bounds_p, scm_uniform_vector_ref),
9553 (scm_bit_count, scm_bit_position, scm_bit_count_star),
9554 (scm_array_to_list, scm_list_to_uniform_array),
9555 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
9556 (scm_open_input_string, scm_open_output_string),
9557 (scm_get_output_string), strop.c (scm_string_copy),
9558 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
9559 (scm_get_internal_real_time, scm_times),
9560 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
9561 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
9562 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
9563 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
9564 simpos.c (scm_system), random.c (scm_random_uniform),
9565 (scm_random_normal, scm_random_exp), ramap.c
9566 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
9567 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
9568 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
9569 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
9570 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
9571 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
9572 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
9573 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
9574 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
9575 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
9576 (scm_logand, scm_logior, scm_logxor, scm_lognot),
9577 (scm_integer_expt, scm_bit_extract, scm_logcount),
9578 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
9579 net_db.c (scm_inet_netof, scm_lnaof), modules.c
9580 (scm_interaction_environment), macros.c (scm_makacro),
9581 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
9582 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
9583 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
9584 (scm_fluid_ref), filesys.c (scm_open_fdes),
9585 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
9586 Docstring correction: `Returns' -> `Return'
9587
9588 * gc.c (scm_set_debug_cell_accesses_x):
9589 (s_scm_gc_set_debug_check_freelist_x):
9590 * fluids.c (scm_fluid_p): Added texinfo markup.
9591
9592 * error.c (scm_strerror): Made docstring more precise.
9593
9594 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
9595 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
9596 (scm_symbol_p, scm_symbol_to_string), strorder.c
9597 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
9598 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
9599 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
9600 (scm_string_ci_geq_p), strop.c (scm_string_copy),
9601 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
9602
9603 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9604
9605 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
9606 mode, as suggested by Michael Livshin.
9607
9608 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
9609
9610 * backtrace.c (display_backtrace_body): since the `print_state'
9611 variable is not used (instead its data field is used directly as
9612 `pstate'), protect it from the hungry compiler optimizations.
9613 thanks to Bill Schottstaedt for the report.
9614
9615 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9616
9617 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
9618 It is only defined and used if guile is compiled with
9619 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
9620 let cells with a free_cell type tag be visible outside of the
9621 garbage collector when in debug mode.
9622
9623 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
9624
9625 (scm_assert_cell_valid): Use a local static variable to avoid
9626 recursion.
9627
9628 (MARK): Only check for rogue cell pointers in debug mode. Use
9629 scm_cellp for this purpose and place all checks for rogue pointers
9630 into that function. Further, since due to conservative scanning
9631 we may encounter free cells during marking, don't use the standard
9632 cell type accessor macro to determine the cell type.
9633
9634 (scm_cellp): Check if the cell pointer actually points into a
9635 card header.
9636
9637 (scm_init_gc): Initalize scm_tc16_allocated.
9638
9639 * gc.h (GCH): Renamed to SCM_GC_H.
9640
9641 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
9642 might be unnecessary, but I feel better this way :-)
9643
9644 (SCM_GC_CELL_TYPE): New macro.
9645
9646 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
9647 in guile, and it is unlikely that they will be applied to real
9648 pairs anyway.
9649
9650 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
9651
9652 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
9653 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
9654
9655 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
9656 make sure that in debug mode no free cell will ever be visible
9657 outside of the garbage collector.
9658
9659 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9660
9661 * async.c (scm_asyncs_pending): Don't use != to compare SCM
9662 values.
9663
9664 * async.c (scm_system_async), variable.c (scm_make_variable,
9665 scm_make_undefined_variable): Use scm_cons to create a pair.
9666
9667 * debug.c (scm_reverse_lookup): Perform proper type checking.
9668 Remove suspicious use of SCM_SLOPPY_CONSP.
9669
9670 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
9671 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
9672 the corresponding optimization.
9673
9674 * eval.c (iqq): Use proper type check.
9675
9676 (scm_m_expand_body): Remove redundant type checks.
9677
9678 (promise_print): Don't access promise cells as pairs.
9679
9680 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
9681 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
9682 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
9683 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
9684 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
9685
9686 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
9687 (scm_iprin1): Use new macro predicate and accessors.
9688
9689 * eval.h (scm_tc16_macro): Removed declaration. It is declared
9690 in macros.h.
9691
9692 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
9693 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
9694 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
9695 SCM_VARIABLE_H. Even the macros that are used to inhibit
9696 including a header file twice should be in the SCM_ namespace.
9697
9698 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
9699 properties.c (scm_primitive_property_ref,
9700 scm_primitive_property_del_x): Prefer stronger predicates like
9701 SCM_NULLP or SCM_FALSEP over SCM_IMP.
9702
9703 * gc.c (MARK): Use proper macros to access procedure-with-setter
9704 cell elements and closure cell elements.
9705
9706 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
9707 access free cells as pairs.
9708
9709 (scm_unprotect_object): scm_hashq_get_handle returns #f if
9710 no hashtab entry is found.
9711
9712 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
9713 SCM_CLR_PORT_OPEN_FLAG.
9714
9715 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
9716 use SCM_SET_C[AD]R for uninitialized cells.
9717
9718 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
9719 If the hashtable has no slots, return #f instead of '(). This
9720 unifies the return value with most assoc-functions.
9721
9722 (scm_hash_fn_ref): Use proper type check.
9723
9724 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
9725 Removed references to non-existing functions from documentation.
9726
9727 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
9728 access keyword cell elements.
9729
9730 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
9731 macros.
9732
9733 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
9734
9735 * print.c (scm_iprlist): Added comment. Improved loop
9736 conditions.
9737
9738 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
9739 pairs.
9740
9741 * smob.c (scm_markcdr): Don't access smob cells as pairs.
9742
9743 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
9744
9745 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
9746 cells as pairs.
9747
9748 * variable.c (variable_print, variable_equalp, scm_variable_ref,
9749 scm_variable_set_x): Use proper macros to access variable cell
9750 elements.
9751
9752 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
9753
9754 * variable.h (SCM_VARVCELL): Don't access variable cells as
9755 pairs.
9756
9757 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
9758 added FIXME comment, removed register specifier.
9759
9760 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
9761
9762 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
9763 * init.c (scm_init_guile_1): Don't init goopscore module.
9764
9765 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
9766
9767 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
9768
9769 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9770
9771 * strop.c (scm_string_to_list): Fixed docstring markup.
9772 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
9773 (scm_string_downcase, scm_string_capitalize_x),
9774 (scm_string_capitalize): Rewrote and corrected docstrings.
9775 (scm_string_ci_to_symbol): Made docstring more explicit.
9776
9777 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
9778
9779 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
9780 eval.c can use it.
9781 (scm_call_with_values): Removed.
9782 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
9783 so that it can be exported.
9784 (scm_call_with_values): Removed.
9785
9786 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
9787 * eval.c: Include "libguile/values.h"
9788 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
9789 New.
9790 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
9791 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
9792 New delcarations to support above change.
9793
9794 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
9795 errors with last change.
9796
9797 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
9798
9799 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
9800 scm_i_eval): Moved the application of the system transformer from
9801 scm_i_eval to scm_primitive_eval.
9802
9803 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
9804
9805 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
9806
9807 * strop.c (scm_string_index): Fix docstring line break
9808 regression.
9809
9810 * list.c (scm_cons_star): Fix docstring typo.
9811
9812 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9813
9814 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
9815 (big2str), ports.c (scm_drain_input), read.c (scm_read,
9816 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
9817 scm_make_string, scm_string_append), strports.c (st_resize_port,
9818 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
9819 scm_makstr with calls to scm_allocate_string.
9820
9821 * strings.[ch] (scm_allocate_string): New function.
9822
9823 * strings.[ch] (scm_makstr): Deprecated.
9824
9825 2001-03-18 Gary Houston <ghouston@arglist.com>
9826
9827 * posix.c (scm_tmpnam): check that return value from tmpnam is not
9828 NULL. rewrote the docstring.
9829 (scm_mkstemp): new procedure implementing "mkstemp!".
9830 * posix.h: declare scm_mkstemp.
9831
9832 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
9833 normally it would be found in netdb.h.
9834
9835 2001-03-17 Gary Houston <ghouston@arglist.com>
9836
9837 * sort.c (scm_sort): move sortvec variable to avoid a compiler
9838 warning when HAVE_ARRAYS is not defined. move len too.
9839
9840 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
9841 (EXTRA_DOT_X_FILES): let configure set the value.
9842 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
9843
9844 * gc.c (scm_must_malloc): changed the comment explaining when
9845 scm_must variants of malloc/free etc., should be used, based on
9846 explanation from Dirk Herrmann.
9847 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
9848 string with procedure name. use scm_must_malloc instead of malloc.
9849 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
9850 of malloc/free.
9851 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
9852 scm_ungetc): use scm_must variants of malloc/realloc/free.
9853 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
9854
9855 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9856
9857 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
9858 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
9859 scm_wrong_type_arg instead.
9860
9861 (SCM_WNA): Deprecated.
9862
9863 * error.[ch] (scm_wta): Deprecated.
9864
9865 * numbers.c (s_i_log): Minor comment fix.
9866
9867 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
9868 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
9869 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
9870 wrong-num-args or misc errors.
9871
9872 * unif.c (scm_make_shared_array, scm_transpose_array,
9873 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
9874 Validate the rest argument (note: this is only done when guile is
9875 built with SCM_DEBUG_REST_ARGUMENT=1)
9876
9877 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
9878 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
9879
9880 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
9881 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
9882
9883 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9884
9885 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
9886 instead of scm_wrong_num_args.
9887
9888 * coop-threads.c: Don't include libguile/strings.h. (Was only
9889 needed for former implementation of SCM_WRONG_NUM_ARGS.)
9890
9891 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
9892 wrong-num-args errors.
9893
9894 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9895
9896 * error.[ch] (scm_error_num_args_subr): New function.
9897
9898 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9899
9900 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
9901 (scm_length, scm_append, scm_reverse, scm_list_ref),
9902 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
9903 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
9904 (scm_delete1_x), gc.c (scm_map_free_list),
9905 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
9906 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
9907 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
9908 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
9909 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
9910 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
9911 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
9912
9913 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
9914 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
9915 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
9916 symbols.c (scm_symbol_interned_p), numbers.c
9917 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
9918 markup.
9919
9920 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
9921
9922 * snarf.h (SCM_CONST_LONG): Deprecated.
9923 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
9924
9925 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9926
9927 * numbers.c (scm_num2ulong): Check that a bignum is positive
9928 before looking at the magnitude. Correctly check for overflow
9929 during conversion.
9930 (scm_num2long_long): Likewise.
9931 (scm_num2ulong_long): New.
9932 (ULONG_LONG_MAX): Define if not already defined.
9933 * numbers.h: (scm_num2ulong_long): New prototype.
9934
9935 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9936
9937 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
9938
9939 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
9940 (SCM_OPOUTSTRPORTP): New predicate macros.
9941 (scm_open_input_string, scm_open_output_string),
9942 (scm_get_output_string): New prototypes.
9943
9944 * strports.c (scm_open_input_string, scm_open_output_string),
9945 (scm_get_output_string): New procedures (SRFI-6 compliant).
9946 Made scm_tc16_strport non-static.
9947
9948 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9949
9950 * macros.h (SCM_ASSYNT): Removed unused object argument from
9951 signature.
9952
9953 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
9954 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
9955 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
9956 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
9957 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
9958 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
9959 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
9960 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
9961 scm_m_atdispatch): Removed unused object argument from call to
9962 SCM_ASSYNT.
9963
9964 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9965
9966 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
9967 const int* to reflect that the input array of integers remains
9968 unchanged. Thanks to Brett Viren for the hint.
9969
9970 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9971
9972 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
9973 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
9974 in various places.
9975 (gh_scm2newstr, gh_symbol2newstr): Change call to
9976 scm_must_malloc() to malloc(), because user-free()able memory is
9977 allocated.
9978
9979 * gc.c: Added declaration of `scm_debug_check_freelist'.
9980
9981 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9982
9983 * ports.c (scm_port_mode): Changed `mode' array size to 4.
9984
9985 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
9986
9987 * strports.c (scm_object_to_string): New procedure.
9988 (scm_strprint_obj): Deprecated.
9989 * strports.h: Reflect the changes.
9990
9991 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9992
9993 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
9994
9995 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
9996 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
9997 SCM_ASSYNT to check for correct argument types. Either use some
9998 SCM_VALIDATE_* macro or an explicit test.
9999
10000 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
10001 misc-errors.
10002
10003 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
10004 instead of calling scm_wta.
10005
10006 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10007
10008 * load.c (scm_primitive_load, scm_primitive_load_path),
10009 (scm_sys_search_load_path): Corrected docstrings (file ->
10010 filename).
10011
10012 * eval.c (scm_force): Added texinfo markup to docstring.
10013 (scm_promise_p): Renamed parameter to `obj' to match docstring.
10014
10015 * debug-malloc.c: Reinserted #include <stdio.h>.
10016
10017 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
10018
10019 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
10020
10021 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
10022 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
10023 Use SCM_LISTn instead of scm_listify.
10024
10025 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10026
10027 * _scm.h: Removed #include <errno.h>.
10028
10029 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
10030 errno variable (can be a macro on some systems, for example when
10031 using linux libc with threads).
10032
10033 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
10034 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
10035 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
10036 #include <errno.h> in these 20 out of 100 files.
10037
10038 2001-03-10 Gary Houston <ghouston@arglist.com>
10039
10040 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
10041 not already defined.
10042
10043 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10044
10045 * coop.c: Inserted #include <stdio.h>.
10046
10047 * iselect.c: Reinserted #include <stdio.h>.
10048
10049 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
10050
10051 * posix.c: Replaced `#define' of __USE_XOPEN right before
10052 including unistd.h with a define of _GNU_SOURCE at the very top of
10053 the file.
10054
10055 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
10056
10057 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
10058 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
10059 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
10060 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
10061 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
10062 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
10063 print.c, procprop.c, procs.c, properties.c, ramap.c,
10064 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
10065 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
10066 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
10067 Remove #include <stdio.h>
10068 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
10069
10070 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
10071
10072 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10073
10074 * posix.c (scm_gethostname): Set initial name length to 256 for
10075 Solaris.
10076
10077 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10078
10079 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
10080 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
10081 (scm_sethostname, scm_gethostname): New prototypes.
10082
10083 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
10084 <sys/file.h>, if present.
10085 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
10086 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
10087 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
10088 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
10089 (scm_sethostname, scm_gethostname): New procedures.
10090
10091 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
10092
10093 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
10094 not optional (ii) "recommend" spelling correction.
10095
10096 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10097
10098 * ramap.c (racp): Removed optimization which caused array copying
10099 to fail if the two arrays shared storage. Re-inserted the IVDEP
10100 macros removed in the change of 2000-03-09. (Don't really have a
10101 complete grasp of what they are for, but they seem to be necessary
10102 on Crays. This needs testing!) Thanks to Miroslav Silovic.
10103
10104 * hash.c (scm_string_hash): Don't downcase characters.
10105
10106 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10107
10108 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
10109 size from 277 --> 1009.
10110
10111 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
10112 function.
10113
10114 * coop-threads.c: Fixed change of 2001-03-06.
10115
10116 * validate.h: Code formatting.
10117
10118 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
10119
10120 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
10121 (*.doc): Add dependency on guile-snarf.awk.in.
10122
10123 * guile-snarf.awk.in: Neglect spaces at the end of
10124 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
10125 middle of docstrings. (To avoid the problem with gcc-2.96.)
10126
10127 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
10128
10129 * coop-threads.c (scm_call_with_new_thread), load.c
10130 (scm_primitive_load, scm_sys_search_load_path), random.c
10131 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
10132 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
10133 (potentially) issue a scm-misc-error or wrong-num-args error
10134 message.
10135
10136 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
10137 about the expected type with the wrong-type-arg error message.
10138
10139 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
10140 a C level bug that can't be fixed from scheme anyway.
10141
10142 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10143
10144 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
10145 Duplicate bindings are OK in a let* since a let* is semantically
10146 equivalent to a nested set of let:s.
10147
10148 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10149
10150 * print.c (scm_print_options): Fixed texinfo in docstring.
10151
10152 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
10153 the underlying functions getservent, getprotoent or getnetent
10154 return NULL instead of signalling an error.
10155
10156 2001-03-04 Gary Houston <ghouston@arglist.com>
10157
10158 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
10159 taking an unexpectedly large filename for an AF_UNIX socket from
10160 bind/connect/sendto (thanks to Martin Grabmueller).
10161
10162 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
10163 former and adjusted the latter.
10164 (scm_socket, scm_socketpair): cosmetic changes.
10165 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
10166 size_t as socklen_t substitute. don't restrict args/return values
10167 to INUM: allow full range of int or size_t.
10168 (scm_fill_sockaddr): check arguments before allocating memory, to
10169 avoid leakage. use malloc, not scm_must_malloc.
10170 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
10171 substitute. free the sockaddr structure before throwing an error.
10172 (scm_init_add_buffer): procedure removed, together with its static
10173 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
10174 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
10175 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
10176 scm_sendto): use a local buffer instead of scm_addr_buffer.
10177 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
10178 not size_t.
10179 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
10180 call to detect whether recvfrom could be bothered to set the address.
10181 (scm_init_socket): don't call scm_init_addr_buffer.
10182
10183 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
10184
10185 * debug.c (scm_procedure_source, scm_procedure_environment),
10186 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
10187 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
10188 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
10189 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
10190 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
10191 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
10192 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
10193 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
10194 scm_array_to_list, scm_array_prototype), validate.h
10195 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
10196 scm_misc_error or scm_wrong_type_arg instead.
10197
10198 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
10199
10200 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10201
10202 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
10203 (scm_sys_tag_body): Added.
10204
10205 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
10206
10207 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
10208 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
10209 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
10210 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
10211 options.c (scm_options), ports.c (scm_remove_from_port_table),
10212 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
10213 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
10214 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
10215 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
10216 instead.
10217
10218 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10219
10220 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
10221
10222 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
10223
10224 * eval.c (scm_s_duplicate_bindings): New error message.
10225 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
10226
10227 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
10228
10229 * eval.h (SCM_EVALIM2): New macro. Use it when a
10230 immediate, literal constant should be evaluated.
10231 * eval.c (scm_s_duplicate_formals): New error message string.
10232 (scm_c_improper_memq): New function.
10233 (scm_m_lambda): Check for duplicate arguments.
10234 (scm_ceval, scm_deval): When executing a body: only cons a new
10235 toplevel environment frame when it is different from the
10236 existing one; use EVALCAR instead of SIDEVAL so that we can properly
10237 check for empty combinations; use SCM_EVALIM2 for the same reason
10238 in the non-toplevel loop.
10239 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
10240 New labels with the meaning of their non-"nontoplevel" partners,
10241 but they are used when it is known that the body is not evaluated at
10242 top-level.
10243 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
10244 reporting for empty combinations.
10245
10246 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
10247
10248 * Remove dump facilities.
10249 * dump.c, dump.h: Removed.
10250 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
10251 * init.c: Remove #include "libguile/dump.h".
10252 (scm_init_guile_1): Remove scm_init_dump.
10253 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
10254 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
10255 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
10256 (scm_set_smob_dump, scm_set_smob_undump): Removed.
10257
10258 * keywords.c: Remove #include "libguile/dump.h".
10259 (keyword_dump, keyword_undump): Removed.
10260 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
10261
10262 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10263
10264 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
10265 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
10266 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
10267 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
10268 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
10269 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
10270 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
10271 to @code{} as the texinfo manual recommends, converted the
10272 examples to use a @lisp{}-environment.
10273
10274 * strports.c (scm_eval_string): Cleaned up the docstring.
10275
10276 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
10277 markup.
10278
10279 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
10280 (scm_number_to_string, scm_string_to_number, scm_number_p)
10281 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
10282 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
10283 (scm_ash): Added texinfo markup and removed obsolete @refill.
10284 (scm_gr_p): Corrected comment.
10285 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
10286 docstring) comments.
10287 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
10288 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
10289 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
10290 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
10291 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
10292 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
10293 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
10294 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
10295
10296 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
10297
10298 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
10299 (Obviously nobody compiles with SCM_RECKLESS defined...)
10300
10301 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
10302
10303 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10304
10305 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
10306
10307 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
10308
10309 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
10310
10311 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
10312 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
10313 since use of `z' suggests that the arguments may be complex.
10314
10315 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
10316 typos.
10317
10318 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
10319
10320 * dump.c (scm_binary_write, scm_binary_read), eval.c
10321 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
10322 scm_guardian_greedy_p, scm_make_guardian), fports.c
10323 (scm_file_port_p): Minor docstring fixes.
10324
10325 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
10326
10327 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
10328
10329 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
10330 scm_i_eval.
10331 (make_class_from_template): Do not bother to set the current
10332 module around the call to DEFVAR, scm_eval takes care of that.
10333 (scm_init_goops): Make scm_module_goops and
10334 scm_goops_lookup_closure permanent objects.
10335
10336 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
10337 top level, create a fresh top-level environment for each
10338 expression instead of mutating the exisint frame. This is
10339 important when that frame is closed over.
10340
10341 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
10342 SCM_DIGSPERLONG instead of DIGSPERLONG.
10343
10344 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
10345
10346 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
10347 before applying arrow procedure in `cond' and before applying
10348 receiver procedure in call-with-current-continuation.
10349 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
10350 macro. The argument is expanded more than one time.
10351
10352 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
10353 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
10354
10355 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
10356
10357 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
10358 notice and license.
10359
10360 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10361
10362 * variable.c (scm_make_variable, scm_make_undefined_variable)
10363 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
10364 (scm_variable_bound_p), values.c (scm_values)
10365 (scm_call_with_values), unif.c (scm_bit_count)
10366 (scm_bit_set_star_x), symbols.c (scm_gentemp)
10367 (scm_gensym), strings.c (scm_string_p, scm_make_string)
10368 (scm_read_only_string_p, scm_string_length, scm_string_ref)
10369 (scm_string_set_x, scm_substring, scm_string_append), stime.c
10370 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
10371 (scm_copy_random_state, scm_random), print.c (scm_newline)
10372 (scm_write_char, scm_simple_format), debug-malloc.c
10373 (scm_malloc_stats), environments.c (scm_environment_p)
10374 (scm_environment_bound_p, scm_environment_ref)
10375 (scm_environment_fold, scm_environment_define)
10376 (scm_environment_undefine, scm_environment_set_x)
10377 (scm_environment_cell, scm_environment_observe)
10378 (scm_environment_observe_weak, scm_environment_unobserve)
10379 (scm_make_eval_environment, scm_eval_environment_p)
10380 (scm_eval_environment_set_local_x, scm_eval_environment_local)
10381 (scm_eval_environment_imported)
10382 (scm_eval_environment_set_imported_x, scm_make_import_environment)
10383 (scm_import_environment_p, scm_import_environment_imports)
10384 (scm_import_environment_set_imports_x, scm_make_export_environment)
10385 (scm_export_environment_p, scm_export_environment_private)
10386 (scm_export_environment_set_private_x)
10387 (scm_export_environment_signature)
10388 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
10389 Added texinfo markup.
10390
10391 * ports.c (scm_drain_input): Lowercased argument to @var.
10392 (scm_current_input_port, scm_current_output_port): Filled in
10393 missing explanation.
10394 (scm_current_load_port, scm_set_current_output_port)
10395 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
10396 Added texinfo markup.
10397
10398 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
10399 (scm_release_arbiter): Added texinfo markup to docstrings.
10400 Changed `Returns' to `Return'.
10401 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
10402
10403 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
10404
10405 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
10406 by doubling them to `@@'.
10407
10408 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10409
10410 * numbers.c (scm_lognot), random.c (scm_random,
10411 scm_random_normal, scm_random_solid_sphere_x,
10412 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
10413 scm_random_exp), dynwind.c
10414 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
10415
10416 * goops.c (scm_sys_initialize_object, scm_instance_p,
10417 scm_class_name, scm_class_precedence_list, scm_class_slots,
10418 scm_class_environment, scm_generic_function_name,
10419 scm_generic_function_methods, scm_method_generic_function,
10420 scm_method_specializers, scm_method_procedure, scm_make_unbound,
10421 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
10422 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
10423 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
10424 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
10425 scm_class_direct_supers, scm_class_direct_slots,
10426 scm_class_direct_subclasses, scm_class_direct_methods,
10427 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
10428 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
10429 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
10430 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
10431 scm_memoized_environment, scm_procedure_name,
10432 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
10433 objects.c
10434 (scm_class_of, scm_entity_p, scm_operator_p,
10435 scm_set_object_procedure_x, scm_object_procedure,
10436 scm_make_class_object), hooks.c (scm_make_hook_with_name,
10437 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
10438 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
10439 scm_hook_to_list), lang.c
10440 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
10441 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
10442 (scm_print_options, scm_port_with_print_state,
10443 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
10444 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
10445 scm_make_procedure_with_setter, scm_procedure), throw.c
10446 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
10447 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
10448 scm_stack_ref, scm_stack_length, scm_frame_p,
10449 scm_last_stack_frame, scm_frame_number, scm_frame_source,
10450 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
10451 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
10452 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
10453 (scm_dirname, scm_basename), dynwind.c
10454 (scm_wind_chain), read.c (scm_read_options, scm_read,
10455 scm_read_hash_extend), gc.c
10456 (scm_unhash_name), eval.c (scm_eval_options_interface,
10457 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
10458 (scm_display_error, scm_set_print_params_x,
10459 scm_display_application, scm_display_backtrace, scm_backtrace),
10460 async.c (scm_async, scm_system_async, scm_async_mark,
10461 scm_system_async_mark, scm_run_asyncs, scm_noop,
10462 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
10463 scm_mask_signals): Added docstrings.
10464
10465 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
10466
10467 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
10468 address of car/cdr. (Thanks to Dirk Herrmann)
10469 Use scm_sizet to obtain the length of strings.
10470 (Thanks to Matthias Koeppe)
10471
10472 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
10473
10474 * symbols.c (scm_mem2symbol): Put a empty statement after the
10475 next_symbol label. This is mandated by ANSI, appearantly.
10476
10477 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10478
10479 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
10480 sense to compile for a specific kernel version. Do not include
10481 <asm/signal.h> while defining __KERNEL__. This hack should no
10482 longer be needed and caused problems.
10483
10484 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
10485
10486 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
10487 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
10488 can not deal with immediates.
10489
10490 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
10491
10492 * list.c (scm_list_copy): Validate the first argument.
10493
10494 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
10495
10496 Fix evaluator so that top-level expressions are correctly
10497 evaluated with respect to the module system.
10498
10499 * modules.h. modules.c (scm_current_module_lookup_closure): New
10500 function.
10501
10502 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
10503 prototypes.
10504 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
10505 names to better reflect their meaning.
10506
10507 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
10508 evaluated at top-level and synronize lookup closure before
10509 executing every subform.
10510 (scm_primitve_eval_x, scm_primitive_eval): New functions.
10511 (scm_eval_x, scm_eval): Reimplement in terms of
10512 scm_primitive_eval_x and scm_primitive_eval, respectively.
10513
10514 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
10515
10516 * macros.c (scm_macro_name, scm_macro_transformer): Use
10517 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
10518 Thanks!
10519
10520 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
10521
10522 * dump.c (scm_store_bytes): Store data size before data.
10523 (scm_restore_bytes): Restore data size. Takes a pointer to size.
10524 * dump.h (scm_restore_bytes): Updated.
10525
10526 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
10527
10528 * dump.c: Use double cells for update schedule.
10529
10530 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
10531
10532 * ports.c (scm_unread_char): Take an optional argument.
10533
10534 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10535
10536 * modules.h (scm_selected_module, scm_current_module): Renamed
10537 scm_selected_module to scm_current_module to synchronize Scheme
10538 and C names.
10539 (scm_select_module, scm_set_current_module): Likewise. Changed
10540 all uses.
10541
10542 * ports.c (scm_port_for_each): Make a snapshot of the port table
10543 before iterating over it. The table might change while the user
10544 code is running. With the snapshot, the user can depend on the
10545 fact that each port that existed at the start of the iteration is
10546 encountered exactly once. (ice-9 popen) depends on this.
10547
10548 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10549
10550 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
10551
10552 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
10553 range checking for the size parameter. Thanks to Martin
10554 Grabmueller for the hint.
10555
10556 (scm_makstr): Reordered string initialization to make interrupt
10557 deferring unnecessary.
10558
10559 * vectors.c (scm_make_vector): Fixed range checking.
10560
10561 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10562
10563 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
10564
10565 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
10566 checking of the size parameter for type correctness and valid
10567 range. Thanks to Rob Browning for reporting the problem. Instead
10568 of deferring interrupts, scm_remember_upto_here_1 is used.
10569
10570 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
10571
10572 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
10573 (scm_dump_cell_update): Removed.
10574 (scm_dump_update): Renamed from scm_dump_object_update.
10575 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
10576 a pointer instead of returning a value.
10577 * keywords.c (keyword_undump): Updated.
10578
10579 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
10580
10581 * dump.c, dump.h: Modified a lot.
10582 (SCM_DUMP_COOKIE): Version 0.1
10583 (scm_dump_mark): Removed.
10584 (scm_restore_cell_object, scm_store_cell_object): New functions.
10585
10586 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
10587 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
10588 New slots: dump, undump.
10589 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
10590 Updated.
10591
10592 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
10593 (keyword_undump): Renamed from keyword_alloc.
10594 (scm_init_keywords): Set keyword_dump and keyword_undump.
10595
10596 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
10597
10598 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
10599 the deprecated SCM_DOUBLE_CELLP.
10600
10601 * tags.h (SCM_DOUBLE_CELLP): deprecated.
10602
10603 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
10604
10605 * dump.c, dump.h: New files.
10606 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
10607 * init.c: #include "libguile/dump.h".
10608 (scm_init_guile_1): Call scm_init_dump.
10609 * smob.h (scm_smob_descriptor): New slots: dump_mark,
10610 dump_dealloc, dump_store, undump_alloc, undump_restore,
10611 undump_init.
10612 * smob.c (scm_make_smob_type): Init the new slots.
10613 (scm_set_smob_dump, scm_set_smob_undump): New functions.
10614 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
10615
10616 * keywords.c: #include "libguile/dump.h".
10617 (keyword_dealloc, keyword_alloc): New functions.
10618 (scm_init_keywords): Set smob_dump and smob_undump.
10619
10620 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
10621
10622 * vectors.c (scm_c_make_vector): New function.
10623 * vectors.h (scm_c_make_vector): Declared.
10624 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
10625 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
10626 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
10627 (scm_make_method_cache, scm_i_vector2list,
10628 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
10629 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
10630 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
10631 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
10632 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
10633 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
10634 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
10635 (scm_vector, scm_make_vector): Use scm_c_make_vector.
10636
10637 * hashtab.c (scm_c_make_hash_table): New function.
10638 * hashtab.h (scm_c_make_hash_table): Declared.
10639 * environments.c (scm_make_leaf_environment,
10640 scm_make_eval_environment), gc.c (scm_init_storage),
10641 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
10642 Use scm_c_make_hash_table.
10643
10644 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10645
10646 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
10647
10648 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10649
10650 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
10651 end of docstring.
10652
10653 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
10654 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
10655 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
10656 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
10657 srcprop.c (scm_source_properties, scm_set_source_properties_x,
10658 scm_source_property, scm_set_source_property_x), sort.c
10659 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
10660 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
10661 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
10662 docstrings.
10663
10664 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10665
10666 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
10667 really get that arg.
10668
10669 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
10670
10671 * goops.c (s_scm_get_keyword): Bug fix.
10672
10673 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10674
10675 The following patch was sent by Martin Grabmueller. It makes sure
10676 that in case of parameter errors the correct function name is
10677 shown, and that parameter types are only checked once.
10678
10679 * strop.c (string_copy, string_upcase_x, string_downcase_x,
10680 string_capitalize_x): New functions. Each one performs the core
10681 functionality of the corresponding scm_* function.
10682
10683 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
10684 scm_string_downcase_x, scm_string_downcase,
10685 scm_string_capitalize_x, scm_string_capitalize): Reduced to
10686 parameter checking wrappers of the above functions.
10687
10688 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10689
10690 * continuations.c, dynl.c, keywords.c, load.c: Include
10691 strings.h. Thanks to Bill Schottstaedt for the bug report.
10692
10693 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
10694
10695 * backtrace.c (display_header): Make sure that line and column
10696 information is shown independent of whether the port the code was
10697 read from had an associated filename. Thanks to Martin
10698 Grabmueller for providing this patch.
10699
10700 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
10701
10702 * fports.[ch] (scm_file_port_p): New primitive.
10703
10704 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
10705
10706 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
10707 These are now defined in fports.c, strports.c and vports.c.
10708
10709 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
10710 vports.c (scm_tc16_sfport): Made variables (were macros defined in
10711 tags.h).
10712
10713 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
10714 (scm_make_sfptob): Made static. These return a type code now.
10715
10716 fports.c (scm_init_fports), strports.c (scm_init_strports),
10717 vports.c (scm_init_vports): Create the corresponding port types.
10718
10719 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
10720 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
10721
10722 * init.c (scm_init_guile_1): Make sure strports are initialized
10723 before gdbint.
10724
10725 * ports.[ch] (scm_make_port_type): Changed the return type to
10726 scm_bits_t.
10727
10728 * ports.c (scm_ports_prehistory): Don't create any port types
10729 here.
10730
10731 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
10732 against scm_tc16_fport directly.
10733
10734 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
10735
10736 * srcprop.c (scm_set_source_property_x): Fix to handle
10737 (set-source-property! <obj> 'copy <datum>) correctly.
10738
10739 2001-01-24 Gary Houston <ghouston@arglist.com>
10740
10741 * filesys.c (scm_link): docstring fix.
10742 * fports.h (scm_setfileno): obsolete declaration removed.
10743 * posix.c: bogus popen declaration removed.
10744
10745 * rdelim.c: new file, split from ioext.c.
10746 * rdelim.h: new file, split from ioext.h
10747 * Makefile.am: add rdelim.c and related files.
10748 * init.c: call scm_init_rdelim. include rdelim.h.
10749
10750 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
10751
10752 This patch was sent by Martin Grabmueller and makes sure that
10753 parameter errors are reported correctly by the lexicographic
10754 ordering predicates.
10755
10756 * strorder.c (string_less_p, string_ci_less_p): New functions.
10757
10758 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
10759 functionality into string_less_p, string_ci_less_p respectively.
10760 The remaining code is just a wrapper to do the parameter
10761 checking.
10762
10763 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
10764 parameters and call string_less_p instead of scm_string_less_p.
10765
10766 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
10767 Check the parameters and call string_less_ci_p instead of
10768 scm_string_ci_less_p.
10769
10770 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
10771
10772 This patch modifies scm_display_error to perform parameter
10773 checking. Thanks to Neil Jerram for the bug report.
10774
10775 * backtrace.[ch] (scm_i_display_error): New function.
10776
10777 * backtrace.c (scm_display_error): Added parameter check and
10778 extracted the core functionality into function
10779 scm_i_display_error.
10780
10781 * throw.c (handler_message): Call scm_i_display_error to display
10782 the error message.
10783
10784 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10785
10786 * eval.c (SCM_APPLY): Added # args check for application of
10787 procedures with arity 3. (Thanks to Anders Holst.)
10788
10789 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
10790
10791 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
10792
10793 (SCM_OPDIRP): Deprecated.
10794
10795 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
10796 SCM_OPN.
10797
10798 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
10799 Instead, give an explicit error message in case the directory is
10800 closed.
10801
10802 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
10803 instead of SCM_OPENP and SCM_CLOSEDP.
10804
10805 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
10806
10807 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
10808
10809 * eval.c (inner_eval, scm_eval): Move all real functionality into
10810 inner_eval. Avoid to copy the expression twice by inlining some
10811 code from scm_i_eval.
10812
10813 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10814
10815 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
10816 now has to be the last clause, as required by R5RS. Thanks to
10817 Martin Grabmueller for the patch.
10818
10819 2001-01-18 Gary Houston <ghouston@arglist.com>
10820
10821 * ioext.c: further simplify scm_read_string_x_partial by defining
10822 a macro SCM_EBLOCK.
10823
10824 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
10825
10826 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
10827
10828 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
10829
10830 * __scm.h: Added comment about architecture and compiler
10831 properties that are required by guile.
10832
10833 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
10834 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
10835
10836 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
10837
10838 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
10839
10840 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
10841 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
10842
10843 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10844
10845 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
10846 to the names in limits.h.
10847
10848 * numbers.c (abs_most_negative_fixnum): Added.
10849
10850 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
10851 fixnum-min) special case.
10852
10853 (scm_big_and): Fix for negative first parameter.
10854
10855 (scm_bit_extract): Fix for fixnum paramters.
10856 Thanks to Rob Browning for the bug report.
10857
10858 (scm_init_numbers): Initialize abs_most_negative_fixnum.
10859
10860 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10861
10862 * symbols.c (scm_symbol_bound_p): Fixed comment.
10863 Thanks to Chris Cramer.
10864
10865 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10866
10867 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
10868 Thanks to Bill Schottstaedt.
10869
10870 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
10871
10872 from Matthias Köppe:
10873
10874 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
10875 casts its result, so doesn't yield an lvalue per ANSI C.
10876
10877 * goops.c (s_scm_sys_set_object_setter_x): use
10878 SCM_SET_ENTITY_SETTER.
10879 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
10880
10881 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
10882 its result, so doesn't yield an lvalue per ANSI C.
10883 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
10884 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
10885 SCM_GC_SET_CARD_FLAGS.
10886 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
10887
10888 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
10889
10890 2001-01-08 Gary Houston <ghouston@arglist.com>
10891
10892 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
10893 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
10894 socket.c (scm_recvfrom): use the new macro, plus minor docstring
10895 changes.
10896 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
10897 for fdes. if current input port is used, check that it's a file
10898 port.
10899
10900 2001-01-06 Gary Houston <ghouston@arglist.com>
10901
10902 * ioext.c (scm_read_string_x_partial): new procedure, implements
10903 read-string!/partial.
10904 * ports.c (scm_take_from_input_buffers): new procedure used by
10905 scm_read_string_x_partial.
10906 (scm_drain_input): use scm_take_from_input_buffers.
10907
10908 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
10909
10910 * validate.h (SCM_VALIDATE_NUMBER): New.
10911
10912 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
10913
10914 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
10915 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
10916 SET_DESTROYED): new defines/macros.
10917 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
10918 (add_to_live_list): takes a `guardian_t *' now, not SCM.
10919 (guardian_print): print more info.
10920 (guardian_apply): check if the guardian is destroyed, and throw an
10921 error if so. take one more optional argument `throw_p'.
10922 (scm_guard): depending on the value of `throw_p', return a boolean
10923 result.
10924 (scm_get_one_zombie): remove redundant property test.
10925 (guardian_t): represent the various (currently 3, I hope nothing
10926 more gets added) boolean fields as bit flags.
10927 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
10928 (scm_destroy_guardian_x): new procedure.
10929
10930 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
10931 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
10932
10933 2001-01-01 Gary Houston <ghouston@arglist.com>
10934
10935 * fports.c (fport_write): bugfix: handle short writes for
10936 unbuffered ports too. optimize the buffered case by minimizing
10937 the number of write/flush calls.
10938 (write_all): new helper procedure.
10939
10940 The ChangeLog continues in the file: "ChangeLog-2000"