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