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