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