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