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