(rstate_free): Return zero.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
35060ae9
DH
12002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * environments.c (remove_key_from_alist): Removed.
4
5 (obarray_remove): Simplified.
6
6a535440
SJ
72002-07-24 Stefan Jahn <stefan@lkcc.org>
8
9 * continuations.h: ia64: Include <signal.h> before
10 <sys/ucontext.h>.
11
bcbd25b7
DH
122002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
13
14 * modules.c (scm_sym2var): Don't compare SCM values with ==.
15
1d1559ce
HWN
162002-07-21 Han-Wen <hanwen@cs.uu.nl>
17
18 * goops.c (scm_compute_applicable_methods): use
19 scm_remember_upto_here_1 iso scm_remember_upto_here
20
21 * macros.c: include deprecation.h
22
23 * vectors.c (s_scm_vector_move_right_x): remove side effect in
24 macro arg.
25 (s_scm_vector_move_left_x): idem.
26
27 * net_db.c, posix.c, socket.c: variable naming: change ans to
28 result.
29
30 * sort.c (scm_merge_vector_x): accept vector as argument
31 iso. SCM*. This is needed for full GC correctness.
32
33 * gc.h: undo previous undocumented changes related to #ifdef
34 GENGC.
35
34d19ef6
HWN
362002-07-20 Han-Wen <hanwen@cs.uu.nl>
37
38 * *.c: add space after commas everywhere.
39
40 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
41 Document cases where SCM_WRITABLE_VELTS() is used.
42
43 * vectors.h (SCM_VELTS): prepare for write barrier, and let
44 SCM_VELTS() return a const pointer
45 (SCM_VECTOR_SET): add macro.
46
3063e30a
DH
472002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
48
49 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
50 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
51 Deprecated the special kind of built-in dynamic syntax transformer
52 that was inaccurately named "macro". Note: The built-in syntax
53 transformers that are named "mmacro" or "memoizing-macro" still
54 exist, and it is these which come much closer to what one would
55 call a macro.
56
4c5f8e8f
NJ
572002-07-13 Neil Jerram <neil@ossau.uklinux.net>
58
59 * eval.c (unmemocopy): Fix for
60 1001-local-eval-error-backtrace-segfaults (unmemoization crash
61 with internal definitions and local-eval).
62
4f6f9ae3
GH
632002-07-12 Gary Houston <ghouston@arglist.com>
64
65 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
66 defined. They don't do anything useful, especially since the
67 only case where DYNAMIC_LINKING is undefined seems to be
68 when --with-modules=no is given to configure, which is basically
69 requesting that the "dynamic linking module" be omitted.
70
71 * Makefile.am (libguile_la_SOURCES): move dynl.c from
72 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
73
74 * extensions.c (load_extension): check DYNAMIC_LINKING for
75 scm_dynamic_call.
76 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
77 scm_init_dynamic_linking.
78
c21935e6
MV
792002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
80
81 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
82 check for Cygwin when including <winsock2.h>, this is already
83 check for by configure. Thus, revert change from 2002-07-07.
84
ee95d597
GH
852002-07-10 Gary Houston <ghouston@arglist.com>
86
9540b68f 87 * eq.c: include <string.h>
ee95d597
GH
88 * dynl.c: docstring editing.
89
46732b54
GH
902002-07-09 Gary Houston <ghouston@arglist.com>
91
92 * dynl.c (scm_dynamic_call): docstring editing.
93
c09d12e0
RB
942002-07-08 Rob Browning <rlb@defaultvalue.org>
95
96 * gc_os_dep.c: HURD fixes.
97
3f6571eb
MV
982002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
99
100 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
101
102 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
103 this should be compiled for BUILD host.
104 Override default rule for
105 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
106 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
107 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
108
109 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
110 <winsock2.h> on Cygwin even when we have it.
111
bd987b8e
DH
1122002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
113
114 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
115 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
116 the code. Full number of arguments checking of closures is
117 mandatory now. However, the option to disable the checking has
118 most probably not been used anyway.
119
8505e285
DH
1202002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
121
bd987b8e
DH
122 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
123 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
124 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
125 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
126 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
127 (scm_source_properties, scm_set_source_properties_x,
128 scm_source_property): Removed compile time option SCM_RECKLESS to
129 clean up the code. Full number of arguments checking of closures
130 is mandatory now. However, the option to disable the checking has
131 most probably not been used anyway.
8505e285
DH
132
133 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
134 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
135
2ee08a28
GH
1362002-06-30 Gary Houston <ghouston@arglist.com>
137
732b9327
GH
138 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
139 do anything useful. Added a comment about need for a mutex if
140 pre-emptive threading is supported.
141
2ee08a28
GH
142 * posix.c (scm_convert_exec_args), dynl.c
143 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
144 allocate_string_pointers. 2) simplified: don't reallocate the
145 strings, just make an array of pointers 3) avoid memory leaks on
146 error 4) let the procedure report errors in its own name.
147 Consequences: 1) the procedures now assume that SCM strings are
148 nul-terminated, which should always be the case. 2) Since strings
149 are not reallocated, it's now possible for strings passed to
150 dynamic-args-call to be mutated.
151
c136c920
DH
1522002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
153
154 * __scm.h, eval.c, eval.h: Removed compile time option
155 MEMOIZE_LOCALS to clean up the code. Now, caching of local
156 variable positions during memoization is mandatory. However, the
157 option to disable the caching has most probably not been used
158 anyway.
159
e540802f
MV
1602002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
161
162 * print.c (scm_simple_format): Print missing part of format before
163 ~% control. Thanks to Daniel Skarda!
164
4c1ffcdd
MV
1652002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
166
167 * mkstemp.c: Added exception notice to license statement.
168
ba1b077b
MV
1692002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
170
8dc434c7
MV
171 * numbers.c (mem2ureal): When returning an inexact zero, make sure
172 it is represented as a floating point value so that we can change
173 its sign.
174
ba1b077b
MV
175 From John W. Eaton <jwe@bevo.che.wisc.edu>
176
177 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
178
74c58131
TTN
1792002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
180
181 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 182 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 183
8766d4b5
MV
1842002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
185
186 * eq.c (real_eqv): New.
187 (scm_eqv_p): Use it when comparing reals and complexes.
188
189 * numbers.c: Include <string.h>, for strncmp.
190 (mem2complex): Do not create negative NaNs.
191 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
192 NaN.
193 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 194
1d8c3cad
MV
1952002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
196
197 * posix.c (scm_putenv): Handle removing variables explicitely by
198 calling unsetenv.
199
200 From John W. Eaton.
74c58131 201
1d8c3cad
MV
202 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
203 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
204 and scm_nan.
205 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
206 [SCO && ! HAVE_ISINF] (isinf): New function.
207 (xisinf, xisnan): New functions.
208 (IS_INF): Delete.
209 (isfinite): Define in terms of xisinf.
210 (scm_inf_p, scm_nan_p): New functions.
211 (guile_Inf, guile_NaN): New file-scope vars.
212 (guile_ieee_init): New function.
213 (scm_inf, scm_nan): New functions.
214 (idbl2str): Handle Inf and NaN. Remove funny label and
215 corresponding gotos.
216 (ALLOW_DIVIDE_BY_ZERO): New macro.
217 (scm_divide): Allow division by zero to occur if
218 ALLOW_DIVIDE_BY_ZERO is defined.
219 Handle bignums and ints as special cases.
220
221 Additional stuff by me:
222
223 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
224 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
225 (iflo2str): Don't output a '+' for negative numbers or for Inf and
226 NaN. They will provide their own sign.
227 (scm_divide): Only allow divides by inexact zeros. Dividing by
228 exact zeros still signals an errors.
74c58131 229
7a0c65eb
TTN
2302002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
231
87b72063 232 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
233 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
234 (s_scm_slot_exists_p): Rename from s_scm_slots_exists_p.
235 Thanks to Andreas Rottmann.
236
5e423a39
GH
2372002-04-20 Gary Houston <ghouston@arglist.com>
238
239 * removal of unused fields in root state (thanks to Christopher
240 Cramer for pointing out the disuse.)
241 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 242 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 243
5e423a39
GH
244 * root.c (root_mark): don't mark them.
245 (scm_make_root): don't set them to #f.
246 * init.c (scm_init_standard_ports): don't initialise with the
247 default ports.
248
9d2cce76
MV
2492002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
250
251 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
252 cpp_sig_symbols.c.
253
2542002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
255
256 * guile-snarf.in: Do not clean input file. This would write to
257 the $(srcdir) during a VPATH build, which is not allowed. It also
258 isn't needed since it only works when an output filename has been
259 specified and in that case we don't need to clean the input file
260 because the output file will already exist.
261
6f79b6cc
MV
2622002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
263
264 * guile-snarf: Install the trap for removing $cleanfile only when
265 the value of $cleanfile is actually known.
266
21550b10
RB
2672002-04-10 Rob Browning <rlb@defaultvalue.org>
268
269 * .cvsignore: add versiondat.h and *.c.clean.c.
270
bc76d628
DH
2712002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
272
273 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
274 function, replaces macro SRCBRKP.
275
276 (SRCBRKP): Deprecated.
277
278 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
279 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
280 temporary variable.
281
5132eef0
DH
2822002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
283
284 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
285 CHECK_EXIT and removed all references to them.
286
680516ba
DH
2872002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
288
289 * debug.h (scm_ready_p, debug_print): Removed declarations.
290
291 * eval.c (EVALCELLCAR): Removed.
292
293 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
294 operation from condition.
295
e2bd68e0
MV
2962002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
297
298 * guile-snarf.in: When the output filename is "-", write to
299 stdout. When no "-o" option is given, use "-" as the output
300 filename (i.e., stdout). Only 'clean' the inputfile or remove the
301 output file on error when the output file name is not "-". Define
302 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
303
304 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
305
ab1f1094
DH
3062002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
307
308 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
309 and the corresponding goto statements. Removed redundant code.
310
42030fb2
DH
3112002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
312
313 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
314 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
315 Re-enabled handing of rpsubrs and asubrs.
316
e050d4f8
DH
3172002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
318
319 * eval.c (SIDEVAL): Removed.
320
321 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
322 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
323 argument checking order for set! to locals, variables and symbols.
324 Improvements to control structure. Removed some uses of arg1 and
325 arg2 as temporary variables.
326
a6d344d3
TTN
3272002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
328
329 * guile-snarf.in: Remove "--compat=1.4" support.
330 Add "-d" and "-D" support.
331
332 (deprecated_list): New var.
333 (compat_mode_clean_xxx): Delete.
334 (grep_deprecated): New func.
335 ("main"): If "-d" or "-D", call `grep_deprecated'.
336
3939e9df
NJ
3372002-03-15 Neil Jerram <neil@ossau.uklinux.net>
338
387d418c
NJ
339 * hooks.h: Change scm_t_c_hookype_t everywhere to
340 scm_t_c_hook_type.
341
bb2c02f2 342 Docstring fixes:
a6d344d3 343
bb2c02f2
NJ
344 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
345
346 * ports.c (scm_sys_make_void_port): Use `@file'.
347
348 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
349 than `else'.
350
351 * macros.c (scm_makmacro): Don't say that the form replaces its
352 source, because it doesn't.
353 (scm_makmmacro): Clarify difference between this and scm_makmacro.
354
355 * backtrace.c (scm_display_error), filesys.c (scm_umask,
356 scm_select, scm_basename), goops.c (scm_method_generic_function),
357 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
358 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
359 spelling mistakes.
360
3939e9df
NJ
361 * debug.c (scm_debug_options), eval.c
362 (scm_eval_options_interface), read.c (scm_read_options): Change
363 incorrect @var in docstring to @code.
364
3b3cc781
MV
3652002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
366
500b0d5b
MV
367 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
368
3b3cc781
MV
369 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
370 guile-snarf can remove trailing non-init code.
371
372 * guile-snarf.in (modern_snarf): Remove everything following and
373 including "^:^" from the output.
374
dff98306
DH
3752002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
376
377 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
378
379 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
380
2287fb53
TTN
3812002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
382
383 * guile-snarf.in: Update copyright.
384 Rewrite to internalize error handling.
385 Add "--compat=1.4" handling.
386 Add commentary.
387
388 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
389 (snarfcppopts): New var.
390 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
391 (.c.doc): Use $(snarfcppopts).
392
822250a4
TTN
393 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
394 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
395 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
396 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
397 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
398 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
399 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
400 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
401 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
402 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
403 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
404 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
405 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
406 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
407
b7798e10
DH
4082002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
409
410 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
411 The next step will be to remove the union 't' and simplify the
412 code of SCM_CEVAL that way.
413
04a98cff
NJ
4142002-03-12 Neil Jerram <neil@ossau.uklinux.net>
415
416 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
417 rreadfds, rwritefds, rexceptfds): Made static.
418
419 * gc.c (terminating), fports.c (terminating): Renamed
420 scm_i_terminating.
421
16d98032
MV
4222002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
423
5046250e
MV
424 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
425 potential overflow problems. Thanks to John W Eaton!
426
8794207d
MV
427 * strop.c (string_capitalize_x): Treat characters as unsigned so
428 that 8-bit chars work. Thanks to David Pirotte!
16d98032 429
1d15ecd3
DH
4302002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
431
432 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
433 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
434 proc as temporary variables. Introduced temporary variables with
435 hopefully descriptive names for clarification. Replaced SCM_N?IMP
436 by a more explicit predicate in some places.
437
4382002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
439
440 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
441 Added lots of comments regarding the implementation of #@dispatch.
442 Changed intra-procedure communication to use t.arg1 instead of
443 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
444 variables. Introduced temporary variables with hopefully
445 descriptive names for clarification. Replaced SCM_N?IMP by a more
446 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
447 of computing the expression explicitly. Eliminate now unused
448 label nontoplevel_cdrxbegin.
449
450 * goops.h (SCM_INSTANCE_HASH): New macro.
451
452 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
453
1ebf1566
TTN
4542002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
455
456 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
457 "guile-snarf" moved back from `noinst_SCRIPTS'.
458
020c890c
NJ
4592002-03-08 Neil Jerram <neil@ossau.uklinux.net>
460
58d233cc
NJ
461 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
462 exists when adding a source property other than those that are
463 handled explicitly, add the new property to the SRCPROPS obj's
464 plist.
465
020c890c
NJ
466 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
467 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
468
469 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
470 debug.status. It isn't needed, and it can overflow the bits
471 reserved for it (which may lead to a segv or a GC abort).
472
3f04400d
DH
4732002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
474
475 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
476 side-effecting operations from conditions and macro calls.
477 Replaced SCM_N?IMP by a more explicit predicate in some places.
478 Minimized the scope of some variables.
479
97820583
SJ
4802002-03-02 Stefan Jahn <stefan@lkcc.org>
481
482 * convert.i.c: Fixed int <-> long conversions which would have
483 failed if their sizes were different.
484
38ace99e
DH
4852002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
486
487 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
488 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
489 as temporary variables. Removed side-effecting operations from
490 conditions and macro calls. Introduced temporary variables with
491 hopefully descriptive names for clarification. Replaced SCM_N?IMP
492 by a more explicit predicate in some places. Removed code that
493 was conditionally compiled if SICP was defined - which it never
494 is.
495
e5cb71a0
DH
4962002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
497
498 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
499 Removed some uses of t.arg1 and proc as temporary variables.
500 Removed side-effecting operations from conditions and macro calls.
501 Introduced temporary variables with hopefully descriptive names
502 for clarification. Replaced SCM_N?IMP by a more explicit
503 predicate in some places.
504
6a0f6ff3
DH
5052002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
506
507 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
508 explicit predicate in some places.
509
510 (CHECK_EQVISH): Removed.
511
512 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
513 variables. Removed side-effecting operations from conditions and
514 macro calls. Introduced temporary variables for clarification.
515 Sorted if-else-if check for the type of the last form in a list by
516 frequency. Avoided some unnecessary tail-recursion calls.
517
228a24ef
DH
5182002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
519
520 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
521 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
522 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
523 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
524 scm_cell and all its uses to scm_t_cell in accordance to Guile's
525 naming scheme for types.
526
527 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
528 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
529 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
530 (scm_make_environment), eval.c (scm_closure), fports.c
531 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
532 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
533 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
534 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
535 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
536 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
537 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
538 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
539 scm_alloc_cell to scm_cell.
540
541 * environments.c (core_environments_observe), gc.c
542 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
543 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
544 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
545 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
546 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
547 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
548 (allocate_weak_vector): Renamed scm_alloc_double_cell to
549 scm_double_cell.
550
edb810bb
SJ
5512002-02-27 Stefan Jahn <stefan@lkcc.org>
552
553 * convert.i.c, convert.c: Better range checking.
554
555 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
556
1ebf1566 557 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
558 Windows (MinGW).
559
327d4dd3
TTN
5602002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
561
562 * Makefile.am: Update path to pre-inst-guile automake frag.
563
89d7a92c 5642002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
565
566 * gc.c (scm_gc_sweep): Make it compile even when deprecated
567 features are excluded.
568
89d7a92c 5692002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
570
571 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
572
4f2716b6
GH
5732002-02-25 Gary Houston <ghouston@arglist.com>
574
575 * convert.c: include <string.h> for convert_i.c.
576
46151112
RB
5772002-02-24 Rob Browning <rlb@defaultvalue.org>
578
579 * .cvsignore: add stamp-h1.
580
cd328b4f
NJ
5812002-02-21 Neil Jerram <neil@ossau.uklinux.net>
582
583 * unif.c (scm_array_to_list): Correct name, which had been
584 accidentally changed to scm_t_arrayo_list!
585
c709de7f
MD
5862002-02-20 Mikael Djurfeldt <mdj@linnaeus>
587
588 * gc.c (scm_gc_sweep): Print an error message when aborting due to
589 underflowing scm_mallocated.
590
c1965d31
MV
5912002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
592
593 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
594 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
595 Reimplemented using the new scm_gc_malloc, etc., functions and
596 deprecated.
597
b606945b
TTN
5982002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
599
600 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
601 to `noinst_PROGRAMS'.
602 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
603 (noinst_PROGRAMS, noinst_SCRIPTS): New.
604
7c686ba8
MV
6052002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
606
607 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
608 non-zero is returned from a port or smob free function.
609 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
610 scm_gc_register_collectable_memory,
611 scm_gc_unregister_collectable_memory, scm_gc_malloc,
612 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
613
614 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
615 debug-malloc.c, dynl.c, environments.c, environments.h,
616 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
617 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
618 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
619 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
620 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
621 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
622 appropriate. Return zero from smob and port free functions.
623
624 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
625
626 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
627 messages while the GC is running.
628 (scm_c_issue_deprecation_warning_fmt): New.
629
630 * fports.c (scm_setvbuf): Reset read buffer to saved values when
631 it is pointing to the putback buffer.
632
66adc0a6
TTN
6332002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
634
635 * gsubr.c (create_gsubr): On "too many args" error,
636 also display arg count and name. Thanks to Bill Schottstaedt.
637
0187b4f4
TTN
6382002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
639
640 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
641
642 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
643 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
644 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
645
646 * guile-snarf-docs-texi.in: Bye bye.
647
402e687c
MV
6482002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
649
650 * symbols.c (scm_make_symbol): Fix typo in docstring.
651
652 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
653 scm_make_symbol): New prototypes.
654
319b98ed
MV
6552002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
656
657 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
658 (SCM_SYMBOL_INTERNED_P): New.
659 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
660 SCM_MAKINUM since hash values can well be bignums.
661 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
662 This signals a interned symbol.
663 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
664 scm_make_symbol): New.
0187b4f4 665
319b98ed
MV
666 * print.c (scm_iprin1): Print uninterned symbols unreadably.
667
34472dfe
TTN
6682002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
669
670 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
671 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 672 Thanks to Dave Love.
34472dfe 673
1b39c2e3
MV
6742002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
675
676 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 677 This might help to make unintended clashes less likely.
1b39c2e3
MV
678 (scm_string_to_symbol): Protect the string until the symbols is
679 created.
680
1fa86ca5
SJ
6812002-01-31 Stefan Jahn <stefan@lkcc.org>
682
683 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 684 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
685 functions for the deprecated gh interface.
686
687 * Makefile.am: Setup rules for new `convert.*' files.
688
af68e5e5
SJ
6892002-01-28 Stefan Jahn <stefan@lkcc.org>
690
691 * symbols.c (scm_c_symbol2str): New function, replacement for
692 `gh_scm2newsymbol()'.
693
34472dfe 694 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
695 replacement for `gh_get_substr()'.
696
697 * socket.c: Include `stdint.h' if available for the `uint32_t'
698 declaration.
699
34472dfe 700 * scmsigs.c (s_scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
701 compiler warning).
702
703 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
704
c96d76b8 7052002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 706
c96d76b8 707 Other changes unrelated to Elisp...
34472dfe 708
c96d76b8
NJ
709 * eval.c (scm_m_if): Use s_if rather than repeating string literal
710 "if".
711 (comments): Fix a few typos.
712 (scm_for_each): Add parentheses around oddly unparenthesized
713 if/while conditions.
714
715 * read.c (scm_read_opts): Add full stop at end of doc for
716 `keywords' option.
717
718 * script.c (scm_compile_shell_switches): Use scm_str2symbol
719 instead of gh_symbol2scm.
720
721 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
722 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
723
724 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
725 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
726
727 First batch of changes for Elisp support...
728
729 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
730 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
731 throw.c, vectors.c, weaks.c: Add #include for lang.h.
732
733 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
734 conditionalize compilation and initialization of Elisp support
735 function.
34472dfe 736
c96d76b8
NJ
737 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
738 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
739 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
740 filesys.c (fill_select_type, retrieve_select_type), fluids.c
741 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
742 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
743 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
744 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
745 options.c (change_option_setting, scm_options), posix.c
746 (environ_list_to_c), print.c (scm_iprlist), throw.c
747 (scm_exit_status), vectors.c (scm_vector), weaks.c
748 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
749
750 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
751 just SCM_FALSEP.
34472dfe 752
c96d76b8
NJ
753 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
754 of just SCM_BOOLP.
755
756 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
757 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
758 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
759 (scm_m_atfop): Support function aliasing. Support both function
760 args, which need transformation, and macro args, which do not.
761 Add explanatory comments.
762 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
763 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
764 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
765 SCM_NULLP || SCM_NILP instead of checks against (removed)
766 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
767 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
768
769 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
770 scm_m_while, scm_nil_eq): Commented out; I don't think we need
771 these, but I don't want to remove them yet, just in case.
772 (scm_init_lang): Define `%nil' variable on Scheme level to hold
773 Elisp nil value.
774
775 * lang.h (SCM_NILP): Test against Elisp nil value instead of
776 against (removed) scm_lisp_nil.
777 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
778 (SCM_NULL_OR_NIL_P): New.
779
780 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
781 SCM_VALIDATE_NULL.
782
783 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
784 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
785 value).
786
787 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
788 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
789 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
790 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
791
792 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
793 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
794 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
795 Numbering shifted down accordingly.
796 (SCM_ELISP_NIL): New IFLAG.
797
798 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 799
a392ee15
DH
8002002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
801
802 * eval.c: Removed outdated references to "everr". Improved some
803 comments.
804
805 (scm_deval_args, deval_args): Renamed scm_deval_args to
806 deval_args, since it is not part of the interface.
807
808 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
809 use references to debug.vect[0] before it exists. Add parentheses
810 to switch statement.
811
812 * goops.h: Added local emacs variables.
813
24933780
DH
8142002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
815
816 * eval.[ch] (scm_deval_args): Made static.
817
818 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
819 test.
820
821 * strings.c (scm_c_string2str): Clarified comment. Replaced
822 THINKME by FIXME for uniformness. Removed question about whether
823 arguments need to be protected from garbage collection: Arguments
824 must be protected as any other variable.
825
f9450cdb
DH
8262002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
827
828 * procs.h (SCM_CLOSURE_BODY): New Macro.
829
830 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
831 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
832 get_slot_value, set_slot_value), procs.c
833 (scm_procedure_documentation), sort.c (closureless), stacks.c
834 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
835 SCM_CLOSURE_BODY.
836
837 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
838
5dc64f64
MV
8392001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
840
841 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
842 use "cp" instead.
843
197ee3d3
MV
8442001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
845
846 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
847 everywhere.
848
849 * continuations.c (scm_make_continuation): Do not retain the
850 throw_value when the continuation is invoked.
851
4d4528e7
SJ
8522001-12-08 Stefan Jahn <stefan@lkcc.org>
853
854 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 855 given Scheme string into a C string. Also put in two
4d4528e7
SJ
856 THINKME's regarding the malloc policy for the missing converter
857 routines.
858
98347362
NJ
8592001-12-01 Neil Jerram <neil@ossau.uklinux.net>
860
861 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
862 gh_symbol2scm.
863
1fc8902f
DH
8642001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
865
866 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
867 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
868
869 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
870 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
871 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
872 macros.
873
874 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
875
876 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
877 SCM_GC_CELL_* macros when accessing free cells.
878
4878beec
MV
8792001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
880
881 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 882 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
883 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
884 * strings.h (SCM_MAKE_STRING_TAG): New.
885 * procs.h (SCM_MAKE_CCLO_TAG): New.
886 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
887
888 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
889 !SCM_ENABLE_DEPRECATED.
890
891 * async.c, async.h (scm_system_async_mark_from_signal_handler):
892 New.
893
894 * scmsigs.c (scm_take_signal): Removed all code that assumes that
895 signal handlers are allowed to divert the flow of control. Call
896 scm_system_async_mark_from_signal_handler instead of
897 scm_system_async_mark.
898
899
900 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
901 scm_alloc_double_cell in their place.
34472dfe 902
4878beec
MV
903 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
904 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
905 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
906 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
907 scm_deprecated_newcell and scm_deprecated_newcell2.
908
909 gc.c (scm_tc16_allocated): Only define when including deprecated
910 features.
911 (scm_debug_newcell, scm_debug_newcell2): Removed.
912 (scm_init_storage): Do not initialize scm_tc16_allocated.
913 (scm_init_gc): Do it here.
914 (allocated_mark): New, from old code.
915 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 916
4878beec 917 * inline.c, inline.h: New files.
34472dfe 918 * Makefile.am: Added them in all the right places.
4878beec 919
34472dfe 920 * _scm.h: Include "libguile/inline.h".
4878beec
MV
921
922 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
923 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
924 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
925 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
926 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
927 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
928 scm_alloc_double_cell, respectively.
929
d2bc7fae
MV
9302001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
931
932 * modules.c (scm_c_use_module): Adapt to changes to
933 `process-use-modules'.
934
5eec27e9
DH
9352001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
936
937 * numbers.c (scm_divide): Fix more division by zero errors.
938
8978878f
GH
9392001-11-21 Gary Houston <ghouston@arglist.com>
940
941 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
942 obsolete. autogen.sh says:
943 invalid unused variable name: `OMIT_DEPENDENCIES'
944
164826d3
DH
9452001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
946
947 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
948 reporting the bug.
949
84aff7a7
MV
9502001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
951
952 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
953 Thanks to Eric Gillespie, Jr!
34472dfe 954
6063dc1d
SJ
9552001-11-21 Stefan Jahn <stefan@lkcc.org>
956
34472dfe
TTN
957 * win32-socket.c (getservent, setservent, endservent,
958 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
959 Appropriate replacements for M$-Windows.
960
961 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
962 these definitions for GUILE_DEBUG.
963
964 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
965 M$-Windows compiler. Include some pieces of code (protoent and
966 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
967 native M$-Windows compiler.
968
351982f6
MV
9692001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
970
971 * modules.c (scm_c_export): Do nothing when the first argument is
972 already the terminating NULL. Thanks to Han-Wen Nienhuys!
973
849038b5
TTN
9742001-11-20 Thien-Thi Nguyen <ttn@glug.org>
975
976 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
977 also include `buildstamp'.
978
5c790b44
RB
9792001-11-18 Rob Browning <rlb@defaultvalue.org>
980
981 * version.c
982 (s_scm_major_version): use SCM_MAJOR_VERSION.
983 (s_scm_minor_version): use SCM_MINOR_VERSION.
984 (s_scm_micro_version): use SCM_MICRO_VERSION.
985 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
986 SCM_MICRO_VERSION.
987
988 * version.h.in
989 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
990 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
991 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
992
694a9bb3
NJ
9932001-11-18 Neil Jerram <neil@ossau.uklinux.net>
994
995 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
996 Rewrite docstrings without reference to substring-move-left/right,
997 since the latter no longer exist.
998
302c12b4
DH
9992001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1000
1001 * eval.c: Removed bogus comment about acros.
1002
1003 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
1004 Minimize scope of local variable. Eliminate dependency on
1005 macro DEBUG_EXTENSIONS.
1006
1007 (s_splicing): New error message string.
1008
1009 (scm_m_body): Issue 'bad body' message rather than 'missing
1010 expression' message.
1011
1012 (scm_m_quote): Eliminate unnecessary copying.
1013
1014 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
1015 checking of the body to scm_m_body.
1016
1017 (scm_m_do): Move comment to function header. Rename arg1 to
1018 binding. Made the code a bit easier to read.
1019
1020 (evalcar): Removed.
1021
1022 (iqq): Added a comment. Changed the depth parameter to
1023 unsigned. Use size_t for vector lengths. Make sure vector object
1024 is gc protected as long as its contents are read. Add some syntax
1025 checks. Get rid of unnecessary SCM_IMP test. Clean up the
1026 control structure a bit.
1027
1028 (scm_m_delay): Added comment about the implementation of
1029 scm_m_delay.
1030
1031 (scm_m_define): Add comment about guile's currying define
1032 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
1033 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
1034
1035 (scm_m_letrec1): Removed. Part of the functionality is taken
1036 over by the new function 'transform_bindings'.
1037
1038 (transform_bindings): New function. Takes over some of the
1039 functionality of removed function 'scm_m_letrec1', namely to split
1040 a list of bindings into a reversed list of variables and a list of
1041 initializers.
1042
1043 (scm_m_letrec): Call 'transform_bindings'.
1044
1045 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
1046 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
1047 test. Use 'transform_bindings'. Fixed scoping error with named
1048 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
1049 Jerram for suggesting the fix). Cleaned up the control structure
1050 a bit.
1051
1052 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
1053 unnecessary consing. Eliminated unnecessary
1054 SCM_DEFER/ALLOW_INTS.
1055
1056 (SCM_CEVAL): Un-obfuscated some loops.
1057
cecb4a5e
NJ
10582001-11-16 Neil Jerram <neil@ossau.uklinux.net>
1059
8f85c0c6
NJ
1060 * gc.h (scm_unhash_name): Old declaration removed.
1061
1062 * eval.c (s_scm_eval): Change @var{primitive-eval} to
1063 @code{primitive-eval}.
1064
1065 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
1066 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
1067 Change @deffnx lines in docstrings to say {Scheme Procedure}
1068 rather than primitive or procedure.
1069
1070 * posix.c (scm_execl), filesys.c (scm_close), unif.c
1071 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1072 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
1073 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
1074 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
1075 (scm_string_split, scm_string_ci_to_symbol), strings.c
1076 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
1077 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
1078 Docstring fixes and improvements reflecting edits that have been
1079 made in the reference manual source.
1080
1081 * objprop.c (scm_object_properties, scm_set_object_properties_x,
1082 scm_object_property, scm_set_object_property_x): Remove invalid
1083 @deffnx lines for corresponding procedure property primitives.
1084
cecb4a5e
NJ
1085 These changes add a @deffnx C function declaration and function
1086 index entries for each Guile primitive to the copy of the doc
1087 snarf output that is used for reference manual synchronization.
1088 Online help is unchanged.
849038b5 1089
cecb4a5e
NJ
1090 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
1091 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
1092 name to SCM_SNARF_DOCS.
849038b5 1093
cecb4a5e
NJ
1094 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
1095 snarf-check-and-output-texi.
1096
1097 * Makefile.am (guile-procedures.texi): New rule.
1098 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
1099 Changed so that the last stage of doc snarfing is now performed
1100 twice, once to produce guile-procedures.txt for online help, and
1101 once to produce guile.texi for reference manual synchronization.
1102
ddea3325
DH
11032001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
1104
1105 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
1106 safely usable as a single statement followed by a ';', for example
1107 in an if statement.
1108
1109 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
1110
72dd0a03
NJ
11112001-11-13 Neil Jerram <neil@ossau.uklinux.net>
1112
1113 * random.c (scm_random_solid_sphere_x,
1114 scm_random_hollow_sphere_x): Correct "shere" typos.
1115
1116 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
1117
1118 * version.c (scm_version): Update docstring to include
1119 `micro-version'.
1120
6558eda6
MV
11212001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
1122
409b8588
MV
1123 * modules.c (scm_c_export): Call va_end after collecting the
1124 symbols.
1125
adb8c0f2
MV
1126 * strop.h, strop.c (scm_substring_move_left_x,
1127 scm_substring_move_right_x): Removed.
1128
6558eda6
MV
1129 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
1130 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
1131 configure does.
1132
5d8fc640
MV
11332001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
1134
1135 * numbers.c: Document macros to define when including
1136 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
1137 now rely on SIZEOF_ macros that have been figured out at
1138 configure time.
1139
1140 * num2integral.i.c: Adapt to new interface.
1141 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
1142 target type by casting it and checking whether it is still the
1143 same. Do not try to handle bignums for integral types that are
1144 smaller than fixnums. When handling bignums, collect the
1145 magnituse first into a unsigned type, and correctly check for
1146 overflow.
1147 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
1148 only -MIN_VALUE can still be negative of all negative numbers (in
1149 twos-complement).
1150
849038b5 1151 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
1152
1153 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
1154 HAVE_LONG_LONG depending on whether their size is non-zero.
1155
d6b8cf11
TTN
11562001-11-11 Thien-Thi Nguyen <ttn@glug.org>
1157
1158 * strop.c (scm_string_null_p): Docfix; nfc.
1159 Thanks to Scott Lenser.
1160
9401323e
NJ
11612001-11-07 Neil Jerram <neil@ossau.uklinux.net>
1162
1163 * extensions.c (scm_load_extension): Canonicalize docstring
1164 whitespace.
1165
1166 * unif.c (scm_uniform_array_write), ports.c
1167 (scm_current_output_port, scm_force_output), dynwind.c
1168 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
1169 filesys.c (scm_open, scm_lstat), struct.c
1170 (scm_make_struct_layout), random.c (scm_random,
1171 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
1172 (scm_i_index): Remove superfluous whitespace from end of docstring
1173 lines.
1174
1175 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
1176 strings.c (scm_make_string), variable.c (scm_make_variable,
1177 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
1178 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
1179 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
1180 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
1181 newline at end of docstrings.
1182
1183 * modules.c (scm_set_current_module): Add missing newline to
1184 docstring.
1185
b4e15479
SJ
11862001-11-07 Stefan Jahn <stefan@lkcc.org>
1187
1188 * win32-socket.[ch]: New files. Defines Winsock-API error codes
1189 and makes them available through Guile. That is because the
1190 Winsock-API does not store its errors in `errno' and thus cannot
1191 return error messages via `strerror (errno)'.
1192
1193 * socket.c (scm_init_socket): Initialize `win32-socket' part
1194 here under M$-Windows.
1195
d6b8cf11 1196 * numbers.h: Added missing declaration of
b4e15479
SJ
1197 `scm_sys_check_number_conversions()'.
1198
1199 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
1200 and use in `(strerror)' and `(system-error)'.
1201
d6b8cf11 1202 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
1203 `win32-socket.[ch]' to extra source and header files.
1204
7ab89df1
MV
12052001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
1206
1207 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
1208 a call to turn-on-debugging when --debug has been given instead of
1209 turning it on directly. Also, handle new `--no-debug' option,
1210 which might suppress the call to turn-on-debugging.
1211
0233bfc1
SJ
12122001-11-05 Stefan Jahn <stefan@lkcc.org>
1213
1214 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
1215
8f99e3f3
SJ
12162001-11-04 Stefan Jahn <stefan@lkcc.org>
1217
1218 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 1219 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
1220 correctly and allows a clean build on Win32.
1221
d6b8cf11 1222 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
1223 into FOO.
1224
1225 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
1226 import macros for external libraries (libcrypt, libqthreads,
1227 libreadline and libregex).
1228
1229 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
1230
1231 * posix.c (flock): Added support for flock() in M$-Windows.
1232
1233 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
1234 of __SCM_IMPORT__.
1235
1236 * fports.c (getflags): Differentiate reading and writing pipes
1237 descriptors.
1238
1239 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
1240 M$-Windows.
1241
1242 * coop.c (coop_condition_variable_timed_wait_mutex): Use
1243 conditionalized error code if `ETIMEDOUT' is not available.
1244 (scm_thread_usleep): Remove bogus declaration of `struct timeval
1245 timeout'.
1246
1247 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
1248 belongs. That is because NO_PREPRO_MAGIC gets undefined after
1249 each inclusion of `num2integral.i.c'.
1250 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
1251
4e21fa60
MV
12522001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
1253
1254 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
1255 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
1256
08112c95
MD
12572001-11-02 Mikael Djurfeldt <mdj@linnaeus>
1258
7663c008
MD
1259 * print.c (scm_iprin1): Mark print state as revealed when
1260 dispatching to generic write or display.
1261
08112c95
MD
1262 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
1263
f712d833
MV
12642001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
1265
1266 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 1267
f712d833
MV
1268 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
1269 and win32-dirent.h to extra source and header files. These
1270 include the uname() and the POSIX dirent interface implementation
1271 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
1272 linkers which do not allow unresolved symbols inside shared
1273 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
1274 dependency.
1275
d6b8cf11
TTN
1276 * __scm.h: Defined SCM_API. This macro gets prepended to all
1277 function and data definitions which should be exported or imported
f712d833
MV
1278 in the resulting dynamic link library in the Win32 port.
1279
1280 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 1281 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
1282 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
1283 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
1284 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
1285 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
1286 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 1287 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
1288 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
1289 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
1290 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
1291 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
1292 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
1293 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
1294 vports.h, weaks.h:
1295 Prefixed each each exported symbol with SCM_API.
1296
d6b8cf11 1297 * continuations.c: Added comment about the use of the extern
f712d833
MV
1298 declarations of {get,set}context() functions used in the ia64 port.
1299
1300 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
1301 is meant to be a `unsigned long *'.
1302
1303 * filesys.c: Include `direct.h' if possible. Use local
1304 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
1305 macros for M$-Windows. Implementation of `fstat_Win32()' which is
1306 able to differentiate between sockets and other file descriptors.
1307 Use this function as wrapper in `scm_fstat()'. Fixed typo in
1308 `scm_dirname()'.
1309
1310 * fports.c: Include `io.h' is possible. Put `*fp' into referring
1311 statement block in `scm_fport_buffer_add()'.
1312 Some corrections in `getflags()'.
d6b8cf11 1313
f712d833
MV
1314 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
1315
1316 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
1317 build on Win32. Disable preloaded symbols on Win2 platforms.
1318
1319 * ioext.c, ports.c: Include `io.h' is possible.
1320
1321 * mkstemp.c: Include `process.h' is possible.
1322
1323 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
1324 too.
1325 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
1326
1327 * posix.c: Remove unnecessary dirent includes and defines. Include
1328 local `win32-uname.h' for MinGW. Extern declaration of
1329 `mkstemp()' for systems where it does not exists. Make
1330 `getlogin()' available on M$-Windows.
1331
1332 * scmsigs.c: Made `usleep()' avalable on MinGW.
1333
1334 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
1335
1336 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
1337
1338 * win32-uname.c: Include "win32-uname.h", not "uname.h".
1339
d245ce23
MD
13402001-10-28 Mikael Djurfeldt <mdj@linnaeus>
1341
1342 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
1343 Don't apply scm_uniform_vector_length on arrays.
1344
8ea46249
DH
13452001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
1346
1347 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
1348 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
1349 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
1350 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
1351 scm_list_<n> over scm_cons[2]?.
1352
1353 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
1354 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
1355 SCM_C[AD][AD]R instead of explicit form.
1356
1357 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
1358 comparison parameters.
1359
1360 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
1361 !SCM_NULLP instead of SCM_NIMP.
1362
1363 (scm_m_case): Don't copy the form. Renamed proc to clause and
1364 minimized its scope. Renamed x to clauses. Removed side
1365 effecting operation from macro call.
1366
1367 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
1368 minimized its scope. Renamed x to clauses. Minimized the scope
1369 of variable 'len'. Make sure the else clause is treated specially
1370 even in case of '=>' occurences. Don't change the else to #t in
1371 order to be able to distinguish this case in the evaluator. Leave
1372 type checking of the recipient to the evaluator.
1373
1374 (scm_c_improper_memq): Made the comment somewhat clearer.
1375
1376 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
1377 test for SCM_IM_LET at the place of the formal parameters.
1378 Simplified the formal parameter checking.
1379
1380 (scm_m_letstar): Added Comment. Renamed proc to bindings.
1381 Renamed arg1 to binding and minimized its scope. Eliminated
1382 unnecessary consing.
1383
1384 (scm_m_do): Renamed proc to bindings. Minimized the scope of
1385 variable 'len'.
1386
1387 (build_binding_list): New static function.
1388
1389 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
1390 Further, split up the 'letrec' unmemoizing code to the
1391 corresponding parts for 'do', 'let' and 'letrec', adding comments
1392 to each form. Cleanup the handling of the do form (This removes
1393 some *real* code :-).
1394
1395 (SCM_CEVAL): Removed side effecting operation from macro call.
1396 Handle the 'else clause of the 'cond form specially - the symbol
1397 'else is not replaced with #t any more.
1398
8186c4f5
GH
13992001-10-14 Gary Houston <ghouston@arglist.com>
1400
1401 * version.c (scm_version): use sprintf instead of snprintf,
1402 for portability. thanks to Bill Schottstaedt.
1403
89759084
MD
14042001-10-14 Mikael Djurfeldt <mdj@linnaeus>
1405
1406 * read.c (scm_lreadr): When user-defined hash procedure returns
1407 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
1408 an exception. (This prevents parsing of uniform vectors from
1409 interfering with parsing of numbers.)
1410
9c7ce563
MV
14112001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
1412
1413 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
1414 PTRDIFF_MIN. Thanks to Ken Raeburn.
1415
14162001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
1417
1418 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
1419
1420 * eval.c (scm_m_atbind): First try to find the variable without
1421 defining it locally; when it has not been found, define it
1422 locally.
1423
1424 * modules.c (module_variable): Pass over variables that exist but
1425 are unbound.
1426
14272001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
1428
1429 * backtrace.c (display_backtrace_file_and_line): Only use
1430 scm_basename when POSIX support is compiled in. Thanks to Chris
1431 Cramer.
1432
1fe5e088
DH
14332001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1434
1435 * numbers.c (mem2uinteger): Return number read so far when coming
1436 across a hexdigit after having read a # or if not reading a hex
1437 value. This will enable the calling code to correctly handle
1438 forms like 1e2. (The background is, that the exponent markers d,
1439 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
1440 providing this patch.
1441
1442 (mem2complex): Fix erroneous double-negation. Now, numbers like
1443 1-i will be read correctly.
1444
68665a97
MD
14452001-10-12 Mikael Djurfeldt <mdj@linnaeus>
1446
1447 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
1448
1449 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
1450
d5cf5324
DH
14512001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1452
1453 * print.c (scm_print_state_vtable, print_state_pool):
1454 Initialize. These variables are now registered as gc roots.
1455
1456 (scm_current_pstate): Update documentation.
1457
1458 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
1459 scm_prin1, scm_init_print): print_state_pool is registered as a
1460 gc root and thus does not need to be protected by a surrounding
1461 pair any more.
1462
1463 (make_print_state): The car of print_state_pool no longer holds
1464 the scm_print_state_vtable.
1465
1466 (scm_current_pstate, scm_make_print_state, print_circref,
1467 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
1468 SCM_N<foo>.
1469
1470 (scm_prin1): When building lists, prefer scm_list_<n> over
1471 scm_cons[2]?.
1472
1473 (scm_iprlist): Removed a redundant SCM_IMP test.
1474
1475 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
1476
37c56aec
DH
14772001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1478
1479 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
1480
1481 (scm_memcons, scm_mem_to_proc): When building lists, prefer
1482 scm_list_<n> over scm_cons[2]?.
1483
1484 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
1485
1486 (scm_procedure_name): Use SCM_CADR instead of explicit form.
1487
1488 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
1489 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
1490 for some reason his patch didn't make it into the cvs.
1491
79d34f68
DH
14922001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1493
1494 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
1495 little bit - should even be somewhat more accurate now.
1496
5e137c65
RB
14972001-10-08 Rob Browning <rlb@defaultvalue.org>
1498
1499 * gc.c: support ia64 register backing store.
1500 (SCM_MARK_BACKING_STORE): new macro.
1501
1502 * continuations.h: support ia64 register backing store.
1503 (struct scm_t_contregs): add ia64 register backing store.
1504
1505 * continuations.c: support ia64 register backing store.
1506 (continuation_mark): mark ia64 register backing store.
1507 (continuation_free): free ia64 register backing store.
1508 (scm_make_continuation): capture ia64 register backing store.
1509 (copy_stack_and_call): copy ia64 register backing store.
1510
ee083ac2
DH
15112001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1512
1513 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
1514 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
1515 instead of SCM_NIMP to test for that case.
1516
1517 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
1518 scm_t_bits instead of long.
1519
71dcdbf9
MV
15202001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
1521
1522 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
1523 SCM_T_SIGNED_BITS_MIN): New.
1524 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
1525 Use them to make these macros computable by the preprocessor.
1526
1527 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
1528 whether the integral type fits in a fixnum, not the compiler.
1529 This removes a spurious compiler warning. Also, honor the
1530 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
1531 needed for `long long's.
1532
1533 * numbers.c: Define NO_PREPRO_MAGOC when including
1534 num2integral.c.i for `long long' and `signed long long'.
1535
152812c0
MD
15362001-10-06 Mikael Djurfeldt <mdj@linnaeus>
1537
1538 These changes fixes a race condition in the Guile coop - pthread
1539 compatibility code.
d6b8cf11 1540
152812c0
MD
1541 * coop.c (mother_awake_p): New variable.
1542 (coop_create): Set mother_awake_p before creating or signalling
1543 mother; wait until mother is going to sleep before returning.
1544 (mother): Reset mother_awake_p before going to sleep.
1545
11d49f54
DH
15462001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1547
1548 * options.c (protected_objects, scm_init_options): The content of
1549 protected_objects is now protected from garbage collection using
1550 scm_gc_register_root instead of scm_permanent_object.
1551
1552 (get_option_setting): New static function that computes an option
1553 setting as it was formerly done in the function scm_options.
1554
1555 (get_documented_option_setting): New static function that
1556 returns option documentation as it was formerly done in the
1557 function scm_options. Note that documentation C strings are no
1558 longer precomputed into SCM objects. Instead, they are converted
1559 into SCM strings every time get_documented_option_setting is
1560 called.
1561
1562 (change_option_setting): New static functions that modifies the
1563 option setting as it was formerly done in the function
1564 scm_options. The function is now exception safe, i. e. won't
1565 cause a memory leak when interrupted. Further, only non-immediate
1566 option values are added to the protection list.
1567
1568 (scm_options): This function now has only the purpose to dispatch
1569 to to get_option_setting, get_documented_option_setting or
1570 change_option_setting, depending on the arguments given to
1571 scm_options.
1572
1573 (scm_init_opts): Don't convert documentation C strings into SCM
1574 strings. Further, don't protect any object values: They _must_
1575 be immediate values, otherwise there is no guarantee that they
1576 have not been collected before anyway.
1577
1578 * options.[ch] (scm_t_option): Made type unsigned, name into a
1579 constant char* and val into a scm_t_bits type.
1580
1581 (scm_options, scm_init_opts): The number of options is guaranteed
1582 to be larger or equal to zero. Thus, the type is changed to
1583 unsigned.
1584
3dbacabc
DH
15852001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1586
1587 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
1588 testing an unsigned value for being >= 0.
1589
14282d0f
DH
15902001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1591
1592 * numbers.h: Removed old comment about using SCM_CAR to access
1593 non-pair cells.
1594
1595 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
1596 the return value is signed. Thanks to Brian Crowder for the bug
1597 report.
1598
1599 (SCM_SRS): Avoid unnecessary casting and don't unpack input
1600 values. With this patch, SCM_SRS can be safely used for other
1601 types than scm_t_signed_bits. However, it should still better be
1602 an internal macro and thus be renamed to SCM_I_SRS.
1603
1604 (SCM_MAKINUM, SCM_INUM): Use proper casting.
1605
2dbec7b5
GH
16062001-10-03 Gary Houston <ghouston@arglist.com>
1607
1608 * continuations.h, unif.h: in the descriptions of the bit patterns
1609 of the heap cells, make bit 0 the least significant.
1610
cf4ee841
TTN
16112001-09-25 Thien-Thi Nguyen <ttn@glug.org>
1612
1613 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
1614 Thanks to Golubev I. N.
1615
4a151b3d
GH
16162001-09-25 Gary Houston <ghouston@arglist.com>
1617
1618 * ports.c (scm_drain_input): extended the docstring. thanks to
1619 Alex Schroeder and Thien-Thi Nguyen.
1620
581ded70
MD
16212001-09-23 Mikael Djurfeldt <mdj@linnaeus>
1622
1623 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
1624 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
1625 macros. (The NUM names might soon change.)
1626
1627 * numbers.h: Added missing declarations.
1628
5437598b
MD
16292001-09-22 Mikael Djurfeldt <mdj@linnaeus>
1630
1631 * Makefile.am: Distribute num2float.i.c.
1632
1633 * num2float.i.c: New file, multiply included by numbers.c, used
1634 to "templatize" the float <-> num conversion routines.
1635
1636 * numbers.c: New functions: scm_num2float, scm_float2num,
1637 scm_num2double, scm_double2num.
1638
0b073f0f
RB
16392001-09-21 Rob Browning <rlb@defaultvalue.org>
1640
1641 * .cvsignore: really add version.h
1642
1643 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
1644 Otherwise it fails on the alpha. However, we might rather choose
1645 this size conditionally.
1646
1647 * numbers.c (scm_gcd): change "k" to a long from an int.
1648 Otherwise it fails on the alpha. However, we might rather choose
1649 this size conditionally.
1650
1651 * error.c (scm_wta): coerce char* to intptr_t before int
1652 assignment.
1653
1654 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
1655 int.
1656
1657 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
1658
2830fd91
MD
16592001-09-20 Mikael Djurfeldt <mdj@linnaeus>
1660
1661 * numbers.c (scm_integer_expt): Accept inexact integer in second
1662 argument. (Thanks to Bill Schottstaedt.)
1663
c13f0a90
RB
16642001-09-20 Rob Browning <rlb@defaultvalue.org>
1665
1666 * .cvsignore: add version.h
1667
1668 * versiondat.h.in: removed (obsolete).
1669
1670 * version.h.in: renamed from version.h.
1671 (SCM_GUILE_MAJOR_VERSION): new public macro.
1672 (SCM_GUILE_MINOR_VERSION): new public macro.
1673 (SCM_GUILE_MICRO_VERSION): new public macro.
1674
1675 * version.h: renamed to version.h.in.
1676
1677 * version.c
1678 (scm_major_version): support integer *_VERSION macros.
1679 (scm_minor_version): support integer *_VERSION macros.
1680 (scm_micro_version): support integer *_VERSION macros.
1681 (scm_version): support integer *_VERSION macros.
1682
147c18a0
MD
16832001-09-20 Mikael Djurfeldt <mdj@linnaeus>
1684
1685 * error.c, error.h: Made error keys globally accessible.
1686 Applications might want to test for these or use them in a direct
1687 call to scm_error.
1688
1689 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
1690 routines are passed an inexact. This change in behavior is
1691 motivated by concordance with R5RS: It is more common that a
1692 primitive doesn't want to accept an inexact for an exact.
1693
662c5539
DH
16942001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1695
1696 The following patch partially undoes my patch from 2001-06-30,
1697 where I added the function scm_gc_mark_cell_conservatively. The
1698 function is buggy, since it breaks guile during conservative
1699 marking if a pointer on the stack points directly into the list of
1700 free cells on the heap: With conservative cell marking this will
1701 cause the whole free list to be scanned and marked - boom!
1702
1703 * gc.c (allocated_mark, MARK, heap_segment,
1704 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 1705 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
1706 scm_gc_mark_cell_conservatively and update the corresponding
1707 comments and uses accordingly. Thanks to Christopher Cramer for
1708 the patch. (Minor corrections by me.)
1709
6c1b7628
GH
17102001-09-15 Gary Houston <ghouston@arglist.com>
1711
1712 * root.h (scm_root_state): removed the continuation_stack and
1713 continuation_stack_ptr members, which have no apparent purpose.
1714 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
1715 removed.
662c5539 1716
6c1b7628
GH
1717 * root.c (root_mark), init.c (restart_stack, start_stack), gc
1718 (scm_igc): remove all references to contination_stack and
1719 continuation_stack_ptr, avoiding allocation of a vector and
1720 useless processing during gc.
1721
455c0ac8
DH
17222001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1723
1724 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
1725
1726 (TCONC_IN): Make sure that the cell word 0 is initialized last.
1727
1728 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
1729
1730 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
1731
1732 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
1733 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
1734
22ba637b
DH
17352001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1736
1737 * guardians.c (mark_dependencies_in_tconc,
1738 whine_about_self_centered_zombies, scm_init_guardians): Register
1739 the static global variable `self_centered_zombies' via
1740 scm_gc_register_root, to make some cdr-ing unnecessary.
1741
c3c4d801
DH
17422001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1743
1744 * backtrace.c (display_backtrace_file,
1745 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
1746 values, use SCM_FALSEP when comparing SCM values against #f.
1747 Thanks to Rob Browning for the bug report.
1748
b00418df
DH
17492001-09-12 Martin Baulig <martin@home-of-linux.org>
1750
1751 * strings.[ch] (scm_str2string): New function.
1752
a0d34a0b
MV
17532001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
1754
1755 * gc.c (scm_done_free): Always subtract size from scm_mallocated
1756 when computing nm, even if it's negative.
1757 (scm_must_malloc): Abort on overflow of scm_mtrigger.
1758 (scm_must_realloc): Likewise.
1759
b10586f0
ML
17602001-09-01 Michael Livshin <mlivshin@bigfoot.com>
1761
1762 * numbers.c (scm_sys_check_number_conversions): new function,
1763 defined if Guile is compiled in debugging mode. currently checks
1764 `scm_num2ulong', should check much much more.
1765
1766 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
1767 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 1768
8c494e99
DH
17692001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
1770
1771 * __scm.h: Added new section about compile time selectable
1772 features.
1773
1774 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
1775 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
1776 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
1777 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
1778 Removed.
1779
1780 * deprecation.c (scm_include_deprecated_features): Simplified.
1781
1782 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
1783