* eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
f12745b6
DH
12002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
4 Added lots of comments regarding the implementation of #@dispatch.
5 Changed intra-procedure communication to use t.arg1 instead of
6 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7 variables. Introduced temporary variables with hopefully
8 descriptive names for clarification. Replaced SCM_N?IMP by a more
9 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
10 of computing the expression explicitly. Eliminate now unused
11 label nontoplevel_cdrxbegin.
12
13 * goops.h (SCM_INSTANCE_HASH): New macro.
14
15 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
16
1ebf1566
TTN
172002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
18
19 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
20 "guile-snarf" moved back from `noinst_SCRIPTS'.
21
020c890c
NJ
222002-03-08 Neil Jerram <neil@ossau.uklinux.net>
23
58d233cc
NJ
24 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
25 exists when adding a source property other than those that are
26 handled explicitly, add the new property to the SRCPROPS obj's
27 plist.
28
020c890c
NJ
29 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
30 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
31
32 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
33 debug.status. It isn't needed, and it can overflow the bits
34 reserved for it (which may lead to a segv or a GC abort).
35
3f04400d
DH
362002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
37
38 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
39 side-effecting operations from conditions and macro calls.
40 Replaced SCM_N?IMP by a more explicit predicate in some places.
41 Minimized the scope of some variables.
42
97820583
SJ
432002-03-02 Stefan Jahn <stefan@lkcc.org>
44
45 * convert.i.c: Fixed int <-> long conversions which would have
46 failed if their sizes were different.
47
38ace99e
DH
482002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
49
50 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
51 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
52 as temporary variables. Removed side-effecting operations from
53 conditions and macro calls. Introduced temporary variables with
54 hopefully descriptive names for clarification. Replaced SCM_N?IMP
55 by a more explicit predicate in some places. Removed code that
56 was conditionally compiled if SICP was defined - which it never
57 is.
58
e5cb71a0
DH
592002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
60
61 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
62 Removed some uses of t.arg1 and proc as temporary variables.
63 Removed side-effecting operations from conditions and macro calls.
64 Introduced temporary variables with hopefully descriptive names
65 for clarification. Replaced SCM_N?IMP by a more explicit
66 predicate in some places.
67
6a0f6ff3
DH
682002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
69
70 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
71 explicit predicate in some places.
72
73 (CHECK_EQVISH): Removed.
74
75 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
76 variables. Removed side-effecting operations from conditions and
77 macro calls. Introduced temporary variables for clarification.
78 Sorted if-else-if check for the type of the last form in a list by
79 frequency. Avoided some unnecessary tail-recursion calls.
80
228a24ef
DH
812002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
82
83 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
84 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
85 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
86 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
87 scm_cell and all its uses to scm_t_cell in accordance to Guile's
88 naming scheme for types.
89
90 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
91 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
92 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
93 (scm_make_environment), eval.c (scm_closure), fports.c
94 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
95 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
96 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
97 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
98 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
99 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
100 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
101 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
102 scm_alloc_cell to scm_cell.
103
104 * environments.c (core_environments_observe), gc.c
105 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
106 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
107 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
108 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
109 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
110 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
111 (allocate_weak_vector): Renamed scm_alloc_double_cell to
112 scm_double_cell.
113
edb810bb
SJ
1142002-02-27 Stefan Jahn <stefan@lkcc.org>
115
116 * convert.i.c, convert.c: Better range checking.
117
118 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
119
1ebf1566 120 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
121 Windows (MinGW).
122
327d4dd3
TTN
1232002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
124
125 * Makefile.am: Update path to pre-inst-guile automake frag.
126
89d7a92c 1272002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
128
129 * gc.c (scm_gc_sweep): Make it compile even when deprecated
130 features are excluded.
131
89d7a92c 1322002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
133
134 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
135
4f2716b6
GH
1362002-02-25 Gary Houston <ghouston@arglist.com>
137
138 * convert.c: include <string.h> for convert_i.c.
139
46151112
RB
1402002-02-24 Rob Browning <rlb@defaultvalue.org>
141
142 * .cvsignore: add stamp-h1.
143
cd328b4f
NJ
1442002-02-21 Neil Jerram <neil@ossau.uklinux.net>
145
146 * unif.c (scm_array_to_list): Correct name, which had been
147 accidentally changed to scm_t_arrayo_list!
148
c709de7f
MD
1492002-02-20 Mikael Djurfeldt <mdj@linnaeus>
150
151 * gc.c (scm_gc_sweep): Print an error message when aborting due to
152 underflowing scm_mallocated.
153
c1965d31
MV
1542002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
155
156 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
157 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
158 Reimplemented using the new scm_gc_malloc, etc., functions and
159 deprecated.
160
b606945b
TTN
1612002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
162
163 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
164 to `noinst_PROGRAMS'.
165 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
166 (noinst_PROGRAMS, noinst_SCRIPTS): New.
167
7c686ba8
MV
1682002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
169
170 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
171 non-zero is returned from a port or smob free function.
172 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
173 scm_gc_register_collectable_memory,
174 scm_gc_unregister_collectable_memory, scm_gc_malloc,
175 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
176
177 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
178 debug-malloc.c, dynl.c, environments.c, environments.h,
179 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
180 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
181 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
182 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
183 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
184 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
185 appropriate. Return zero from smob and port free functions.
186
187 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
188
189 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
190 messages while the GC is running.
191 (scm_c_issue_deprecation_warning_fmt): New.
192
193 * fports.c (scm_setvbuf): Reset read buffer to saved values when
194 it is pointing to the putback buffer.
195
66adc0a6
TTN
1962002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
197
198 * gsubr.c (create_gsubr): On "too many args" error,
199 also display arg count and name. Thanks to Bill Schottstaedt.
200
0187b4f4
TTN
2012002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
202
203 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
204
205 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
206 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
207 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
208
209 * guile-snarf-docs-texi.in: Bye bye.
210
402e687c
MV
2112002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
212
213 * symbols.c (scm_make_symbol): Fix typo in docstring.
214
215 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
216 scm_make_symbol): New prototypes.
217
319b98ed
MV
2182002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
219
220 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
221 (SCM_SYMBOL_INTERNED_P): New.
222 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
223 SCM_MAKINUM since hash values can well be bignums.
224 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
225 This signals a interned symbol.
226 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
227 scm_make_symbol): New.
0187b4f4 228
319b98ed
MV
229 * print.c (scm_iprin1): Print uninterned symbols unreadably.
230
34472dfe
TTN
2312002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
232
233 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
234 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 235 Thanks to Dave Love.
34472dfe 236
1b39c2e3
MV
2372002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
238
239 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 240 This might help to make unintended clashes less likely.
1b39c2e3
MV
241 (scm_string_to_symbol): Protect the string until the symbols is
242 created.
243
1fa86ca5
SJ
2442002-01-31 Stefan Jahn <stefan@lkcc.org>
245
246 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 247 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
248 functions for the deprecated gh interface.
249
250 * Makefile.am: Setup rules for new `convert.*' files.
251
af68e5e5
SJ
2522002-01-28 Stefan Jahn <stefan@lkcc.org>
253
254 * symbols.c (scm_c_symbol2str): New function, replacement for
255 `gh_scm2newsymbol()'.
256
34472dfe 257 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
258 replacement for `gh_get_substr()'.
259
260 * socket.c: Include `stdint.h' if available for the `uint32_t'
261 declaration.
262
34472dfe 263 * scmsigs.c (s_scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
264 compiler warning).
265
266 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
267
c96d76b8 2682002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 269
c96d76b8 270 Other changes unrelated to Elisp...
34472dfe 271
c96d76b8
NJ
272 * eval.c (scm_m_if): Use s_if rather than repeating string literal
273 "if".
274 (comments): Fix a few typos.
275 (scm_for_each): Add parentheses around oddly unparenthesized
276 if/while conditions.
277
278 * read.c (scm_read_opts): Add full stop at end of doc for
279 `keywords' option.
280
281 * script.c (scm_compile_shell_switches): Use scm_str2symbol
282 instead of gh_symbol2scm.
283
284 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
285 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
286
287 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
288 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
289
290 First batch of changes for Elisp support...
291
292 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
293 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
294 throw.c, vectors.c, weaks.c: Add #include for lang.h.
295
296 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
297 conditionalize compilation and initialization of Elisp support
298 function.
34472dfe 299
c96d76b8
NJ
300 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
301 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
302 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
303 filesys.c (fill_select_type, retrieve_select_type), fluids.c
304 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
305 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
306 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
307 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
308 options.c (change_option_setting, scm_options), posix.c
309 (environ_list_to_c), print.c (scm_iprlist), throw.c
310 (scm_exit_status), vectors.c (scm_vector), weaks.c
311 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
312
313 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
314 just SCM_FALSEP.
34472dfe 315
c96d76b8
NJ
316 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
317 of just SCM_BOOLP.
318
319 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
320 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
321 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
322 (scm_m_atfop): Support function aliasing. Support both function
323 args, which need transformation, and macro args, which do not.
324 Add explanatory comments.
325 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
326 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
327 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
328 SCM_NULLP || SCM_NILP instead of checks against (removed)
329 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
330 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
331
332 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
333 scm_m_while, scm_nil_eq): Commented out; I don't think we need
334 these, but I don't want to remove them yet, just in case.
335 (scm_init_lang): Define `%nil' variable on Scheme level to hold
336 Elisp nil value.
337
338 * lang.h (SCM_NILP): Test against Elisp nil value instead of
339 against (removed) scm_lisp_nil.
340 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
341 (SCM_NULL_OR_NIL_P): New.
342
343 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
344 SCM_VALIDATE_NULL.
345
346 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
347 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
348 value).
349
350 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
351 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
352 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
353 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
354
355 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
356 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
357 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
358 Numbering shifted down accordingly.
359 (SCM_ELISP_NIL): New IFLAG.
360
361 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 362
a392ee15
DH
3632002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
364
365 * eval.c: Removed outdated references to "everr". Improved some
366 comments.
367
368 (scm_deval_args, deval_args): Renamed scm_deval_args to
369 deval_args, since it is not part of the interface.
370
371 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
372 use references to debug.vect[0] before it exists. Add parentheses
373 to switch statement.
374
375 * goops.h: Added local emacs variables.
376
24933780
DH
3772002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
378
379 * eval.[ch] (scm_deval_args): Made static.
380
381 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
382 test.
383
384 * strings.c (scm_c_string2str): Clarified comment. Replaced
385 THINKME by FIXME for uniformness. Removed question about whether
386 arguments need to be protected from garbage collection: Arguments
387 must be protected as any other variable.
388
f9450cdb
DH
3892002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
390
391 * procs.h (SCM_CLOSURE_BODY): New Macro.
392
393 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
394 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
395 get_slot_value, set_slot_value), procs.c
396 (scm_procedure_documentation), sort.c (closureless), stacks.c
397 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
398 SCM_CLOSURE_BODY.
399
400 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
401
5dc64f64
MV
4022001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
403
404 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
405 use "cp" instead.
406
197ee3d3
MV
4072001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
408
409 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
410 everywhere.
411
412 * continuations.c (scm_make_continuation): Do not retain the
413 throw_value when the continuation is invoked.
414
4d4528e7
SJ
4152001-12-08 Stefan Jahn <stefan@lkcc.org>
416
417 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 418 given Scheme string into a C string. Also put in two
4d4528e7
SJ
419 THINKME's regarding the malloc policy for the missing converter
420 routines.
421
98347362
NJ
4222001-12-01 Neil Jerram <neil@ossau.uklinux.net>
423
424 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
425 gh_symbol2scm.
426
1fc8902f
DH
4272001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
428
429 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
430 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
431
432 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
433 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
434 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
435 macros.
436
437 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
438
439 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
440 SCM_GC_CELL_* macros when accessing free cells.
441
4878beec
MV
4422001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
443
444 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 445 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
446 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
447 * strings.h (SCM_MAKE_STRING_TAG): New.
448 * procs.h (SCM_MAKE_CCLO_TAG): New.
449 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
450
451 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
452 !SCM_ENABLE_DEPRECATED.
453
454 * async.c, async.h (scm_system_async_mark_from_signal_handler):
455 New.
456
457 * scmsigs.c (scm_take_signal): Removed all code that assumes that
458 signal handlers are allowed to divert the flow of control. Call
459 scm_system_async_mark_from_signal_handler instead of
460 scm_system_async_mark.
461
462
463 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
464 scm_alloc_double_cell in their place.
34472dfe 465
4878beec
MV
466 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
467 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
468 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
469 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
470 scm_deprecated_newcell and scm_deprecated_newcell2.
471
472 gc.c (scm_tc16_allocated): Only define when including deprecated
473 features.
474 (scm_debug_newcell, scm_debug_newcell2): Removed.
475 (scm_init_storage): Do not initialize scm_tc16_allocated.
476 (scm_init_gc): Do it here.
477 (allocated_mark): New, from old code.
478 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 479
4878beec 480 * inline.c, inline.h: New files.
34472dfe 481 * Makefile.am: Added them in all the right places.
4878beec 482
34472dfe 483 * _scm.h: Include "libguile/inline.h".
4878beec
MV
484
485 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
486 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
487 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
488 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
489 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
490 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
491 scm_alloc_double_cell, respectively.
492
d2bc7fae
MV
4932001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
494
495 * modules.c (scm_c_use_module): Adapt to changes to
496 `process-use-modules'.
497
5eec27e9
DH
4982001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
499
500 * numbers.c (scm_divide): Fix more division by zero errors.
501
8978878f
GH
5022001-11-21 Gary Houston <ghouston@arglist.com>
503
504 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
505 obsolete. autogen.sh says:
506 invalid unused variable name: `OMIT_DEPENDENCIES'
507
164826d3
DH
5082001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
509
510 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
511 reporting the bug.
512
84aff7a7
MV
5132001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
514
515 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
516 Thanks to Eric Gillespie, Jr!
34472dfe 517
6063dc1d
SJ
5182001-11-21 Stefan Jahn <stefan@lkcc.org>
519
34472dfe
TTN
520 * win32-socket.c (getservent, setservent, endservent,
521 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
522 Appropriate replacements for M$-Windows.
523
524 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
525 these definitions for GUILE_DEBUG.
526
527 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
528 M$-Windows compiler. Include some pieces of code (protoent and
529 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
530 native M$-Windows compiler.
531
351982f6
MV
5322001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
533
534 * modules.c (scm_c_export): Do nothing when the first argument is
535 already the terminating NULL. Thanks to Han-Wen Nienhuys!
536
849038b5
TTN
5372001-11-20 Thien-Thi Nguyen <ttn@glug.org>
538
539 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
540 also include `buildstamp'.
541
5c790b44
RB
5422001-11-18 Rob Browning <rlb@defaultvalue.org>
543
544 * version.c
545 (s_scm_major_version): use SCM_MAJOR_VERSION.
546 (s_scm_minor_version): use SCM_MINOR_VERSION.
547 (s_scm_micro_version): use SCM_MICRO_VERSION.
548 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
549 SCM_MICRO_VERSION.
550
551 * version.h.in
552 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
553 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
554 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
555
694a9bb3
NJ
5562001-11-18 Neil Jerram <neil@ossau.uklinux.net>
557
558 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
559 Rewrite docstrings without reference to substring-move-left/right,
560 since the latter no longer exist.
561
302c12b4
DH
5622001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
563
564 * eval.c: Removed bogus comment about acros.
565
566 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
567 Minimize scope of local variable. Eliminate dependency on
568 macro DEBUG_EXTENSIONS.
569
570 (s_splicing): New error message string.
571
572 (scm_m_body): Issue 'bad body' message rather than 'missing
573 expression' message.
574
575 (scm_m_quote): Eliminate unnecessary copying.
576
577 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
578 checking of the body to scm_m_body.
579
580 (scm_m_do): Move comment to function header. Rename arg1 to
581 binding. Made the code a bit easier to read.
582
583 (evalcar): Removed.
584
585 (iqq): Added a comment. Changed the depth parameter to
586 unsigned. Use size_t for vector lengths. Make sure vector object
587 is gc protected as long as its contents are read. Add some syntax
588 checks. Get rid of unnecessary SCM_IMP test. Clean up the
589 control structure a bit.
590
591 (scm_m_delay): Added comment about the implementation of
592 scm_m_delay.
593
594 (scm_m_define): Add comment about guile's currying define
595 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
596 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
597
598 (scm_m_letrec1): Removed. Part of the functionality is taken
599 over by the new function 'transform_bindings'.
600
601 (transform_bindings): New function. Takes over some of the
602 functionality of removed function 'scm_m_letrec1', namely to split
603 a list of bindings into a reversed list of variables and a list of
604 initializers.
605
606 (scm_m_letrec): Call 'transform_bindings'.
607
608 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
609 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
610 test. Use 'transform_bindings'. Fixed scoping error with named
611 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
612 Jerram for suggesting the fix). Cleaned up the control structure
613 a bit.
614
615 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
616 unnecessary consing. Eliminated unnecessary
617 SCM_DEFER/ALLOW_INTS.
618
619 (SCM_CEVAL): Un-obfuscated some loops.
620
cecb4a5e
NJ
6212001-11-16 Neil Jerram <neil@ossau.uklinux.net>
622
8f85c0c6
NJ
623 * gc.h (scm_unhash_name): Old declaration removed.
624
625 * eval.c (s_scm_eval): Change @var{primitive-eval} to
626 @code{primitive-eval}.
627
628 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
629 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
630 Change @deffnx lines in docstrings to say {Scheme Procedure}
631 rather than primitive or procedure.
632
633 * posix.c (scm_execl), filesys.c (scm_close), unif.c
634 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
635 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
636 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
637 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
638 (scm_string_split, scm_string_ci_to_symbol), strings.c
639 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
640 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
641 Docstring fixes and improvements reflecting edits that have been
642 made in the reference manual source.
643
644 * objprop.c (scm_object_properties, scm_set_object_properties_x,
645 scm_object_property, scm_set_object_property_x): Remove invalid
646 @deffnx lines for corresponding procedure property primitives.
647
cecb4a5e
NJ
648 These changes add a @deffnx C function declaration and function
649 index entries for each Guile primitive to the copy of the doc
650 snarf output that is used for reference manual synchronization.
651 Online help is unchanged.
849038b5 652
cecb4a5e
NJ
653 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
654 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
655 name to SCM_SNARF_DOCS.
849038b5 656
cecb4a5e
NJ
657 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
658 snarf-check-and-output-texi.
659
660 * Makefile.am (guile-procedures.texi): New rule.
661 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
662 Changed so that the last stage of doc snarfing is now performed
663 twice, once to produce guile-procedures.txt for online help, and
664 once to produce guile.texi for reference manual synchronization.
665
ddea3325
DH
6662001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
667
668 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
669 safely usable as a single statement followed by a ';', for example
670 in an if statement.
671
672 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
673
72dd0a03
NJ
6742001-11-13 Neil Jerram <neil@ossau.uklinux.net>
675
676 * random.c (scm_random_solid_sphere_x,
677 scm_random_hollow_sphere_x): Correct "shere" typos.
678
679 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
680
681 * version.c (scm_version): Update docstring to include
682 `micro-version'.
683
6558eda6
MV
6842001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
685
409b8588
MV
686 * modules.c (scm_c_export): Call va_end after collecting the
687 symbols.
688
adb8c0f2
MV
689 * strop.h, strop.c (scm_substring_move_left_x,
690 scm_substring_move_right_x): Removed.
691
6558eda6
MV
692 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
693 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
694 configure does.
695
5d8fc640
MV
6962001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
697
698 * numbers.c: Document macros to define when including
699 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
700 now rely on SIZEOF_ macros that have been figured out at
701 configure time.
702
703 * num2integral.i.c: Adapt to new interface.
704 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
705 target type by casting it and checking whether it is still the
706 same. Do not try to handle bignums for integral types that are
707 smaller than fixnums. When handling bignums, collect the
708 magnituse first into a unsigned type, and correctly check for
709 overflow.
710 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
711 only -MIN_VALUE can still be negative of all negative numbers (in
712 twos-complement).
713
849038b5 714 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
715
716 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
717 HAVE_LONG_LONG depending on whether their size is non-zero.
718
d6b8cf11
TTN
7192001-11-11 Thien-Thi Nguyen <ttn@glug.org>
720
721 * strop.c (scm_string_null_p): Docfix; nfc.
722 Thanks to Scott Lenser.
723
9401323e
NJ
7242001-11-07 Neil Jerram <neil@ossau.uklinux.net>
725
726 * extensions.c (scm_load_extension): Canonicalize docstring
727 whitespace.
728
729 * unif.c (scm_uniform_array_write), ports.c
730 (scm_current_output_port, scm_force_output), dynwind.c
731 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
732 filesys.c (scm_open, scm_lstat), struct.c
733 (scm_make_struct_layout), random.c (scm_random,
734 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
735 (scm_i_index): Remove superfluous whitespace from end of docstring
736 lines.
737
738 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
739 strings.c (scm_make_string), variable.c (scm_make_variable,
740 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
741 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
742 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
743 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
744 newline at end of docstrings.
745
746 * modules.c (scm_set_current_module): Add missing newline to
747 docstring.
748
b4e15479
SJ
7492001-11-07 Stefan Jahn <stefan@lkcc.org>
750
751 * win32-socket.[ch]: New files. Defines Winsock-API error codes
752 and makes them available through Guile. That is because the
753 Winsock-API does not store its errors in `errno' and thus cannot
754 return error messages via `strerror (errno)'.
755
756 * socket.c (scm_init_socket): Initialize `win32-socket' part
757 here under M$-Windows.
758
d6b8cf11 759 * numbers.h: Added missing declaration of
b4e15479
SJ
760 `scm_sys_check_number_conversions()'.
761
762 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
763 and use in `(strerror)' and `(system-error)'.
764
d6b8cf11 765 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
766 `win32-socket.[ch]' to extra source and header files.
767
7ab89df1
MV
7682001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
769
770 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
771 a call to turn-on-debugging when --debug has been given instead of
772 turning it on directly. Also, handle new `--no-debug' option,
773 which might suppress the call to turn-on-debugging.
774
0233bfc1
SJ
7752001-11-05 Stefan Jahn <stefan@lkcc.org>
776
777 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
778
8f99e3f3
SJ
7792001-11-04 Stefan Jahn <stefan@lkcc.org>
780
781 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 782 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
783 correctly and allows a clean build on Win32.
784
d6b8cf11 785 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
786 into FOO.
787
788 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
789 import macros for external libraries (libcrypt, libqthreads,
790 libreadline and libregex).
791
792 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
793
794 * posix.c (flock): Added support for flock() in M$-Windows.
795
796 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
797 of __SCM_IMPORT__.
798
799 * fports.c (getflags): Differentiate reading and writing pipes
800 descriptors.
801
802 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
803 M$-Windows.
804
805 * coop.c (coop_condition_variable_timed_wait_mutex): Use
806 conditionalized error code if `ETIMEDOUT' is not available.
807 (scm_thread_usleep): Remove bogus declaration of `struct timeval
808 timeout'.
809
810 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
811 belongs. That is because NO_PREPRO_MAGIC gets undefined after
812 each inclusion of `num2integral.i.c'.
813 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
814
4e21fa60
MV
8152001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
816
817 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
818 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
819
08112c95
MD
8202001-11-02 Mikael Djurfeldt <mdj@linnaeus>
821
7663c008
MD
822 * print.c (scm_iprin1): Mark print state as revealed when
823 dispatching to generic write or display.
824
08112c95
MD
825 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
826
f712d833
MV
8272001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
828
829 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 830
f712d833
MV
831 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
832 and win32-dirent.h to extra source and header files. These
833 include the uname() and the POSIX dirent interface implementation
834 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
835 linkers which do not allow unresolved symbols inside shared
836 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
837 dependency.
838
d6b8cf11
TTN
839 * __scm.h: Defined SCM_API. This macro gets prepended to all
840 function and data definitions which should be exported or imported
f712d833
MV
841 in the resulting dynamic link library in the Win32 port.
842
843 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 844 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
845 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
846 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
847 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
848 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
849 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 850 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
851 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
852 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
853 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
854 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
855 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
856 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
857 vports.h, weaks.h:
858 Prefixed each each exported symbol with SCM_API.
859
d6b8cf11 860 * continuations.c: Added comment about the use of the extern
f712d833
MV
861 declarations of {get,set}context() functions used in the ia64 port.
862
863 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
864 is meant to be a `unsigned long *'.
865
866 * filesys.c: Include `direct.h' if possible. Use local
867 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
868 macros for M$-Windows. Implementation of `fstat_Win32()' which is
869 able to differentiate between sockets and other file descriptors.
870 Use this function as wrapper in `scm_fstat()'. Fixed typo in
871 `scm_dirname()'.
872
873 * fports.c: Include `io.h' is possible. Put `*fp' into referring
874 statement block in `scm_fport_buffer_add()'.
875 Some corrections in `getflags()'.
d6b8cf11 876
f712d833
MV
877 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
878
879 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
880 build on Win32. Disable preloaded symbols on Win2 platforms.
881
882 * ioext.c, ports.c: Include `io.h' is possible.
883
884 * mkstemp.c: Include `process.h' is possible.
885
886 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
887 too.
888 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
889
890 * posix.c: Remove unnecessary dirent includes and defines. Include
891 local `win32-uname.h' for MinGW. Extern declaration of
892 `mkstemp()' for systems where it does not exists. Make
893 `getlogin()' available on M$-Windows.
894
895 * scmsigs.c: Made `usleep()' avalable on MinGW.
896
897 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
898
899 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
900
901 * win32-uname.c: Include "win32-uname.h", not "uname.h".
902
d245ce23
MD
9032001-10-28 Mikael Djurfeldt <mdj@linnaeus>
904
905 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
906 Don't apply scm_uniform_vector_length on arrays.
907
8ea46249
DH
9082001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
909
910 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
911 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
912 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
913 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
914 scm_list_<n> over scm_cons[2]?.
915
916 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
917 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
918 SCM_C[AD][AD]R instead of explicit form.
919
920 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
921 comparison parameters.
922
923 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
924 !SCM_NULLP instead of SCM_NIMP.
925
926 (scm_m_case): Don't copy the form. Renamed proc to clause and
927 minimized its scope. Renamed x to clauses. Removed side
928 effecting operation from macro call.
929
930 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
931 minimized its scope. Renamed x to clauses. Minimized the scope
932 of variable 'len'. Make sure the else clause is treated specially
933 even in case of '=>' occurences. Don't change the else to #t in
934 order to be able to distinguish this case in the evaluator. Leave
935 type checking of the recipient to the evaluator.
936
937 (scm_c_improper_memq): Made the comment somewhat clearer.
938
939 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
940 test for SCM_IM_LET at the place of the formal parameters.
941 Simplified the formal parameter checking.
942
943 (scm_m_letstar): Added Comment. Renamed proc to bindings.
944 Renamed arg1 to binding and minimized its scope. Eliminated
945 unnecessary consing.
946
947 (scm_m_do): Renamed proc to bindings. Minimized the scope of
948 variable 'len'.
949
950 (build_binding_list): New static function.
951
952 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
953 Further, split up the 'letrec' unmemoizing code to the
954 corresponding parts for 'do', 'let' and 'letrec', adding comments
955 to each form. Cleanup the handling of the do form (This removes
956 some *real* code :-).
957
958 (SCM_CEVAL): Removed side effecting operation from macro call.
959 Handle the 'else clause of the 'cond form specially - the symbol
960 'else is not replaced with #t any more.
961
8186c4f5
GH
9622001-10-14 Gary Houston <ghouston@arglist.com>
963
964 * version.c (scm_version): use sprintf instead of snprintf,
965 for portability. thanks to Bill Schottstaedt.
966
89759084
MD
9672001-10-14 Mikael Djurfeldt <mdj@linnaeus>
968
969 * read.c (scm_lreadr): When user-defined hash procedure returns
970 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
971 an exception. (This prevents parsing of uniform vectors from
972 interfering with parsing of numbers.)
973
9c7ce563
MV
9742001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
975
976 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
977 PTRDIFF_MIN. Thanks to Ken Raeburn.
978
9792001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
980
981 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
982
983 * eval.c (scm_m_atbind): First try to find the variable without
984 defining it locally; when it has not been found, define it
985 locally.
986
987 * modules.c (module_variable): Pass over variables that exist but
988 are unbound.
989
9902001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
991
992 * backtrace.c (display_backtrace_file_and_line): Only use
993 scm_basename when POSIX support is compiled in. Thanks to Chris
994 Cramer.
995
1fe5e088
DH
9962001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
997
998 * numbers.c (mem2uinteger): Return number read so far when coming
999 across a hexdigit after having read a # or if not reading a hex
1000 value. This will enable the calling code to correctly handle
1001 forms like 1e2. (The background is, that the exponent markers d,
1002 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
1003 providing this patch.
1004
1005 (mem2complex): Fix erroneous double-negation. Now, numbers like
1006 1-i will be read correctly.
1007
68665a97
MD
10082001-10-12 Mikael Djurfeldt <mdj@linnaeus>
1009
1010 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
1011
1012 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
1013
d5cf5324
DH
10142001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1015
1016 * print.c (scm_print_state_vtable, print_state_pool):
1017 Initialize. These variables are now registered as gc roots.
1018
1019 (scm_current_pstate): Update documentation.
1020
1021 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
1022 scm_prin1, scm_init_print): print_state_pool is registered as a
1023 gc root and thus does not need to be protected by a surrounding
1024 pair any more.
1025
1026 (make_print_state): The car of print_state_pool no longer holds
1027 the scm_print_state_vtable.
1028
1029 (scm_current_pstate, scm_make_print_state, print_circref,
1030 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
1031 SCM_N<foo>.
1032
1033 (scm_prin1): When building lists, prefer scm_list_<n> over
1034 scm_cons[2]?.
1035
1036 (scm_iprlist): Removed a redundant SCM_IMP test.
1037
1038 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
1039
37c56aec
DH
10402001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1041
1042 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
1043
1044 (scm_memcons, scm_mem_to_proc): When building lists, prefer
1045 scm_list_<n> over scm_cons[2]?.
1046
1047 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
1048
1049 (scm_procedure_name): Use SCM_CADR instead of explicit form.
1050
1051 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
1052 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
1053 for some reason his patch didn't make it into the cvs.
1054
79d34f68
DH
10552001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1056
1057 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
1058 little bit - should even be somewhat more accurate now.
1059
5e137c65
RB
10602001-10-08 Rob Browning <rlb@defaultvalue.org>
1061
1062 * gc.c: support ia64 register backing store.
1063 (SCM_MARK_BACKING_STORE): new macro.
1064
1065 * continuations.h: support ia64 register backing store.
1066 (struct scm_t_contregs): add ia64 register backing store.
1067
1068 * continuations.c: support ia64 register backing store.
1069 (continuation_mark): mark ia64 register backing store.
1070 (continuation_free): free ia64 register backing store.
1071 (scm_make_continuation): capture ia64 register backing store.
1072 (copy_stack_and_call): copy ia64 register backing store.
1073
ee083ac2
DH
10742001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1075
1076 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
1077 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
1078 instead of SCM_NIMP to test for that case.
1079
1080 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
1081 scm_t_bits instead of long.
1082
71dcdbf9
MV
10832001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
1084
1085 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
1086 SCM_T_SIGNED_BITS_MIN): New.
1087 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
1088 Use them to make these macros computable by the preprocessor.
1089
1090 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
1091 whether the integral type fits in a fixnum, not the compiler.
1092 This removes a spurious compiler warning. Also, honor the
1093 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
1094 needed for `long long's.
1095
1096 * numbers.c: Define NO_PREPRO_MAGOC when including
1097 num2integral.c.i for `long long' and `signed long long'.
1098
152812c0
MD
10992001-10-06 Mikael Djurfeldt <mdj@linnaeus>
1100
1101 These changes fixes a race condition in the Guile coop - pthread
1102 compatibility code.
d6b8cf11 1103
152812c0
MD
1104 * coop.c (mother_awake_p): New variable.
1105 (coop_create): Set mother_awake_p before creating or signalling
1106 mother; wait until mother is going to sleep before returning.
1107 (mother): Reset mother_awake_p before going to sleep.
1108
11d49f54
DH
11092001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1110
1111 * options.c (protected_objects, scm_init_options): The content of
1112 protected_objects is now protected from garbage collection using
1113 scm_gc_register_root instead of scm_permanent_object.
1114
1115 (get_option_setting): New static function that computes an option
1116 setting as it was formerly done in the function scm_options.
1117
1118 (get_documented_option_setting): New static function that
1119 returns option documentation as it was formerly done in the
1120 function scm_options. Note that documentation C strings are no
1121 longer precomputed into SCM objects. Instead, they are converted
1122 into SCM strings every time get_documented_option_setting is
1123 called.
1124
1125 (change_option_setting): New static functions that modifies the
1126 option setting as it was formerly done in the function
1127 scm_options. The function is now exception safe, i. e. won't
1128 cause a memory leak when interrupted. Further, only non-immediate
1129 option values are added to the protection list.
1130
1131 (scm_options): This function now has only the purpose to dispatch
1132 to to get_option_setting, get_documented_option_setting or
1133 change_option_setting, depending on the arguments given to
1134 scm_options.
1135
1136 (scm_init_opts): Don't convert documentation C strings into SCM
1137 strings. Further, don't protect any object values: They _must_
1138 be immediate values, otherwise there is no guarantee that they
1139 have not been collected before anyway.
1140
1141 * options.[ch] (scm_t_option): Made type unsigned, name into a
1142 constant char* and val into a scm_t_bits type.
1143
1144 (scm_options, scm_init_opts): The number of options is guaranteed
1145 to be larger or equal to zero. Thus, the type is changed to
1146 unsigned.
1147
3dbacabc
DH
11482001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1149
1150 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
1151 testing an unsigned value for being >= 0.
1152
14282d0f
DH
11532001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1154
1155 * numbers.h: Removed old comment about using SCM_CAR to access
1156 non-pair cells.
1157
1158 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
1159 the return value is signed. Thanks to Brian Crowder for the bug
1160 report.
1161
1162 (SCM_SRS): Avoid unnecessary casting and don't unpack input
1163 values. With this patch, SCM_SRS can be safely used for other
1164 types than scm_t_signed_bits. However, it should still better be
1165 an internal macro and thus be renamed to SCM_I_SRS.
1166
1167 (SCM_MAKINUM, SCM_INUM): Use proper casting.
1168
2dbec7b5
GH
11692001-10-03 Gary Houston <ghouston@arglist.com>
1170
1171 * continuations.h, unif.h: in the descriptions of the bit patterns
1172 of the heap cells, make bit 0 the least significant.
1173
cf4ee841
TTN
11742001-09-25 Thien-Thi Nguyen <ttn@glug.org>
1175
1176 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
1177 Thanks to Golubev I. N.
1178
4a151b3d
GH
11792001-09-25 Gary Houston <ghouston@arglist.com>
1180
1181 * ports.c (scm_drain_input): extended the docstring. thanks to
1182 Alex Schroeder and Thien-Thi Nguyen.
1183
581ded70
MD
11842001-09-23 Mikael Djurfeldt <mdj@linnaeus>
1185
1186 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
1187 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
1188 macros. (The NUM names might soon change.)
1189
1190 * numbers.h: Added missing declarations.
1191
5437598b
MD
11922001-09-22 Mikael Djurfeldt <mdj@linnaeus>
1193
1194 * Makefile.am: Distribute num2float.i.c.
1195
1196 * num2float.i.c: New file, multiply included by numbers.c, used
1197 to "templatize" the float <-> num conversion routines.
1198
1199 * numbers.c: New functions: scm_num2float, scm_float2num,
1200 scm_num2double, scm_double2num.
1201
0b073f0f
RB
12022001-09-21 Rob Browning <rlb@defaultvalue.org>
1203
1204 * .cvsignore: really add version.h
1205
1206 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
1207 Otherwise it fails on the alpha. However, we might rather choose
1208 this size conditionally.
1209
1210 * numbers.c (scm_gcd): change "k" to a long from an int.
1211 Otherwise it fails on the alpha. However, we might rather choose
1212 this size conditionally.
1213
1214 * error.c (scm_wta): coerce char* to intptr_t before int
1215 assignment.
1216
1217 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
1218 int.
1219
1220 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
1221
2830fd91
MD
12222001-09-20 Mikael Djurfeldt <mdj@linnaeus>
1223
1224 * numbers.c (scm_integer_expt): Accept inexact integer in second
1225 argument. (Thanks to Bill Schottstaedt.)
1226
c13f0a90
RB
12272001-09-20 Rob Browning <rlb@defaultvalue.org>
1228
1229 * .cvsignore: add version.h
1230
1231 * versiondat.h.in: removed (obsolete).
1232
1233 * version.h.in: renamed from version.h.
1234 (SCM_GUILE_MAJOR_VERSION): new public macro.
1235 (SCM_GUILE_MINOR_VERSION): new public macro.
1236 (SCM_GUILE_MICRO_VERSION): new public macro.
1237
1238 * version.h: renamed to version.h.in.
1239
1240 * version.c
1241 (scm_major_version): support integer *_VERSION macros.
1242 (scm_minor_version): support integer *_VERSION macros.
1243 (scm_micro_version): support integer *_VERSION macros.
1244 (scm_version): support integer *_VERSION macros.
1245
147c18a0
MD
12462001-09-20 Mikael Djurfeldt <mdj@linnaeus>
1247
1248 * error.c, error.h: Made error keys globally accessible.
1249 Applications might want to test for these or use them in a direct
1250 call to scm_error.
1251
1252 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
1253 routines are passed an inexact. This change in behavior is
1254 motivated by concordance with R5RS: It is more common that a
1255 primitive doesn't want to accept an inexact for an exact.
1256
662c5539
DH
12572001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1258
1259 The following patch partially undoes my patch from 2001-06-30,
1260 where I added the function scm_gc_mark_cell_conservatively. The
1261 function is buggy, since it breaks guile during conservative
1262 marking if a pointer on the stack points directly into the list of
1263 free cells on the heap: With conservative cell marking this will
1264 cause the whole free list to be scanned and marked - boom!
1265
1266 * gc.c (allocated_mark, MARK, heap_segment,
1267 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 1268 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
1269 scm_gc_mark_cell_conservatively and update the corresponding
1270 comments and uses accordingly. Thanks to Christopher Cramer for
1271 the patch. (Minor corrections by me.)
1272
6c1b7628
GH
12732001-09-15 Gary Houston <ghouston@arglist.com>
1274
1275 * root.h (scm_root_state): removed the continuation_stack and
1276 continuation_stack_ptr members, which have no apparent purpose.
1277 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
1278 removed.
662c5539 1279
6c1b7628
GH
1280 * root.c (root_mark), init.c (restart_stack, start_stack), gc
1281 (scm_igc): remove all references to contination_stack and
1282 continuation_stack_ptr, avoiding allocation of a vector and
1283 useless processing during gc.
1284
455c0ac8
DH
12852001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1286
1287 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
1288
1289 (TCONC_IN): Make sure that the cell word 0 is initialized last.
1290
1291 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
1292
1293 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
1294
1295 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
1296 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
1297
22ba637b
DH
12982001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1299
1300 * guardians.c (mark_dependencies_in_tconc,
1301 whine_about_self_centered_zombies, scm_init_guardians): Register
1302 the static global variable `self_centered_zombies' via
1303 scm_gc_register_root, to make some cdr-ing unnecessary.
1304
c3c4d801
DH
13052001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1306
1307 * backtrace.c (display_backtrace_file,
1308 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
1309 values, use SCM_FALSEP when comparing SCM values against #f.
1310 Thanks to Rob Browning for the bug report.
1311
b00418df
DH
13122001-09-12 Martin Baulig <martin@home-of-linux.org>
1313
1314 * strings.[ch] (scm_str2string): New function.
1315
a0d34a0b
MV
13162001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
1317
1318 * gc.c (scm_done_free): Always subtract size from scm_mallocated
1319 when computing nm, even if it's negative.
1320 (scm_must_malloc): Abort on overflow of scm_mtrigger.
1321 (scm_must_realloc): Likewise.
1322
b10586f0
ML
13232001-09-01 Michael Livshin <mlivshin@bigfoot.com>
1324
1325 * numbers.c (scm_sys_check_number_conversions): new function,
1326 defined if Guile is compiled in debugging mode. currently checks
1327 `scm_num2ulong', should check much much more.
1328
1329 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
1330 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 1331
8c494e99
DH
13322001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
1333
1334 * __scm.h: Added new section about compile time selectable
1335 features.
1336
1337 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
1338 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
1339 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
1340 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
1341 Removed.
1342
1343 * deprecation.c (scm_include_deprecated_features): Simplified.
1344
1345 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
1346