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