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