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