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