* HACKING: Modified the Hacking It Yourself section. Removed the
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
8978878f
GH
12001-11-21 Gary Houston <ghouston@arglist.com>
2
3 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
4 obsolete. autogen.sh says:
5 invalid unused variable name: `OMIT_DEPENDENCIES'
6
164826d3
DH
72001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8
9 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
10 reporting the bug.
11
84aff7a7
MV
122001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
13
14 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
15 Thanks to Eric Gillespie, Jr!
16
6063dc1d
SJ
172001-11-21 Stefan Jahn <stefan@lkcc.org>
18
19 * win32-socket.c (getservent, setservent, endservent,
20 getprotoent, setprotoent, endprotoent): New functions.
21 Appropriate replacements for M$-Windows.
22
23 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
24 these definitions for GUILE_DEBUG.
25
26 * net_db.c: Include "win32-socket.h" if compiling with a native
27 M$-Windows compiler. Include some pieces of code (protoent and
28 servent interface) protected by HAVE_* macros when using a
29 native M$-Windows compiler.
30
351982f6
MV
312001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
32
33 * modules.c (scm_c_export): Do nothing when the first argument is
34 already the terminating NULL. Thanks to Han-Wen Nienhuys!
35
849038b5
TTN
362001-11-20 Thien-Thi Nguyen <ttn@glug.org>
37
38 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
39 also include `buildstamp'.
40
5c790b44
RB
412001-11-18 Rob Browning <rlb@defaultvalue.org>
42
43 * version.c
44 (s_scm_major_version): use SCM_MAJOR_VERSION.
45 (s_scm_minor_version): use SCM_MINOR_VERSION.
46 (s_scm_micro_version): use SCM_MICRO_VERSION.
47 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
48 SCM_MICRO_VERSION.
49
50 * version.h.in
51 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
52 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
53 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
54
694a9bb3
NJ
552001-11-18 Neil Jerram <neil@ossau.uklinux.net>
56
57 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
58 Rewrite docstrings without reference to substring-move-left/right,
59 since the latter no longer exist.
60
302c12b4
DH
612001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
62
63 * eval.c: Removed bogus comment about acros.
64
65 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
66 Minimize scope of local variable. Eliminate dependency on
67 macro DEBUG_EXTENSIONS.
68
69 (s_splicing): New error message string.
70
71 (scm_m_body): Issue 'bad body' message rather than 'missing
72 expression' message.
73
74 (scm_m_quote): Eliminate unnecessary copying.
75
76 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
77 checking of the body to scm_m_body.
78
79 (scm_m_do): Move comment to function header. Rename arg1 to
80 binding. Made the code a bit easier to read.
81
82 (evalcar): Removed.
83
84 (iqq): Added a comment. Changed the depth parameter to
85 unsigned. Use size_t for vector lengths. Make sure vector object
86 is gc protected as long as its contents are read. Add some syntax
87 checks. Get rid of unnecessary SCM_IMP test. Clean up the
88 control structure a bit.
89
90 (scm_m_delay): Added comment about the implementation of
91 scm_m_delay.
92
93 (scm_m_define): Add comment about guile's currying define
94 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
95 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
96
97 (scm_m_letrec1): Removed. Part of the functionality is taken
98 over by the new function 'transform_bindings'.
99
100 (transform_bindings): New function. Takes over some of the
101 functionality of removed function 'scm_m_letrec1', namely to split
102 a list of bindings into a reversed list of variables and a list of
103 initializers.
104
105 (scm_m_letrec): Call 'transform_bindings'.
106
107 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
108 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
109 test. Use 'transform_bindings'. Fixed scoping error with named
110 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
111 Jerram for suggesting the fix). Cleaned up the control structure
112 a bit.
113
114 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
115 unnecessary consing. Eliminated unnecessary
116 SCM_DEFER/ALLOW_INTS.
117
118 (SCM_CEVAL): Un-obfuscated some loops.
119
cecb4a5e
NJ
1202001-11-16 Neil Jerram <neil@ossau.uklinux.net>
121
8f85c0c6
NJ
122 * gc.h (scm_unhash_name): Old declaration removed.
123
124 * eval.c (s_scm_eval): Change @var{primitive-eval} to
125 @code{primitive-eval}.
126
127 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
128 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
129 Change @deffnx lines in docstrings to say {Scheme Procedure}
130 rather than primitive or procedure.
131
132 * posix.c (scm_execl), filesys.c (scm_close), unif.c
133 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
134 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
135 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
136 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
137 (scm_string_split, scm_string_ci_to_symbol), strings.c
138 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
139 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
140 Docstring fixes and improvements reflecting edits that have been
141 made in the reference manual source.
142
143 * objprop.c (scm_object_properties, scm_set_object_properties_x,
144 scm_object_property, scm_set_object_property_x): Remove invalid
145 @deffnx lines for corresponding procedure property primitives.
146
cecb4a5e
NJ
147 These changes add a @deffnx C function declaration and function
148 index entries for each Guile primitive to the copy of the doc
149 snarf output that is used for reference manual synchronization.
150 Online help is unchanged.
849038b5 151
cecb4a5e
NJ
152 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
153 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
154 name to SCM_SNARF_DOCS.
849038b5 155
cecb4a5e
NJ
156 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
157 snarf-check-and-output-texi.
158
159 * Makefile.am (guile-procedures.texi): New rule.
160 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
161 Changed so that the last stage of doc snarfing is now performed
162 twice, once to produce guile-procedures.txt for online help, and
163 once to produce guile.texi for reference manual synchronization.
164
ddea3325
DH
1652001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
166
167 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
168 safely usable as a single statement followed by a ';', for example
169 in an if statement.
170
171 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
172
72dd0a03
NJ
1732001-11-13 Neil Jerram <neil@ossau.uklinux.net>
174
175 * random.c (scm_random_solid_sphere_x,
176 scm_random_hollow_sphere_x): Correct "shere" typos.
177
178 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
179
180 * version.c (scm_version): Update docstring to include
181 `micro-version'.
182
6558eda6
MV
1832001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
184
409b8588
MV
185 * modules.c (scm_c_export): Call va_end after collecting the
186 symbols.
187
adb8c0f2
MV
188 * strop.h, strop.c (scm_substring_move_left_x,
189 scm_substring_move_right_x): Removed.
190
6558eda6
MV
191 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
192 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
193 configure does.
194
5d8fc640
MV
1952001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
196
197 * numbers.c: Document macros to define when including
198 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
199 now rely on SIZEOF_ macros that have been figured out at
200 configure time.
201
202 * num2integral.i.c: Adapt to new interface.
203 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
204 target type by casting it and checking whether it is still the
205 same. Do not try to handle bignums for integral types that are
206 smaller than fixnums. When handling bignums, collect the
207 magnituse first into a unsigned type, and correctly check for
208 overflow.
209 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
210 only -MIN_VALUE can still be negative of all negative numbers (in
211 twos-complement).
212
849038b5 213 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
214
215 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
216 HAVE_LONG_LONG depending on whether their size is non-zero.
217
d6b8cf11
TTN
2182001-11-11 Thien-Thi Nguyen <ttn@glug.org>
219
220 * strop.c (scm_string_null_p): Docfix; nfc.
221 Thanks to Scott Lenser.
222
9401323e
NJ
2232001-11-07 Neil Jerram <neil@ossau.uklinux.net>
224
225 * extensions.c (scm_load_extension): Canonicalize docstring
226 whitespace.
227
228 * unif.c (scm_uniform_array_write), ports.c
229 (scm_current_output_port, scm_force_output), dynwind.c
230 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
231 filesys.c (scm_open, scm_lstat), struct.c
232 (scm_make_struct_layout), random.c (scm_random,
233 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
234 (scm_i_index): Remove superfluous whitespace from end of docstring
235 lines.
236
237 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
238 strings.c (scm_make_string), variable.c (scm_make_variable,
239 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
240 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
241 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
242 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
243 newline at end of docstrings.
244
245 * modules.c (scm_set_current_module): Add missing newline to
246 docstring.
247
b4e15479
SJ
2482001-11-07 Stefan Jahn <stefan@lkcc.org>
249
250 * win32-socket.[ch]: New files. Defines Winsock-API error codes
251 and makes them available through Guile. That is because the
252 Winsock-API does not store its errors in `errno' and thus cannot
253 return error messages via `strerror (errno)'.
254
255 * socket.c (scm_init_socket): Initialize `win32-socket' part
256 here under M$-Windows.
257
d6b8cf11 258 * numbers.h: Added missing declaration of
b4e15479
SJ
259 `scm_sys_check_number_conversions()'.
260
261 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
262 and use in `(strerror)' and `(system-error)'.
263
d6b8cf11 264 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
265 `win32-socket.[ch]' to extra source and header files.
266
7ab89df1
MV
2672001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
268
269 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
270 a call to turn-on-debugging when --debug has been given instead of
271 turning it on directly. Also, handle new `--no-debug' option,
272 which might suppress the call to turn-on-debugging.
273
0233bfc1
SJ
2742001-11-05 Stefan Jahn <stefan@lkcc.org>
275
276 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
277
8f99e3f3
SJ
2782001-11-04 Stefan Jahn <stefan@lkcc.org>
279
280 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 281 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
282 correctly and allows a clean build on Win32.
283
d6b8cf11 284 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
285 into FOO.
286
287 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
288 import macros for external libraries (libcrypt, libqthreads,
289 libreadline and libregex).
290
291 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
292
293 * posix.c (flock): Added support for flock() in M$-Windows.
294
295 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
296 of __SCM_IMPORT__.
297
298 * fports.c (getflags): Differentiate reading and writing pipes
299 descriptors.
300
301 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
302 M$-Windows.
303
304 * coop.c (coop_condition_variable_timed_wait_mutex): Use
305 conditionalized error code if `ETIMEDOUT' is not available.
306 (scm_thread_usleep): Remove bogus declaration of `struct timeval
307 timeout'.
308
309 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
310 belongs. That is because NO_PREPRO_MAGIC gets undefined after
311 each inclusion of `num2integral.i.c'.
312 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
313
4e21fa60
MV
3142001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
315
316 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
317 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
318
08112c95
MD
3192001-11-02 Mikael Djurfeldt <mdj@linnaeus>
320
7663c008
MD
321 * print.c (scm_iprin1): Mark print state as revealed when
322 dispatching to generic write or display.
323
08112c95
MD
324 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
325
f712d833
MV
3262001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
327
328 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 329
f712d833
MV
330 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
331 and win32-dirent.h to extra source and header files. These
332 include the uname() and the POSIX dirent interface implementation
333 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
334 linkers which do not allow unresolved symbols inside shared
335 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
336 dependency.
337
d6b8cf11
TTN
338 * __scm.h: Defined SCM_API. This macro gets prepended to all
339 function and data definitions which should be exported or imported
f712d833
MV
340 in the resulting dynamic link library in the Win32 port.
341
342 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 343 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
344 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
345 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
346 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
347 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
348 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 349 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
350 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
351 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
352 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
353 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
354 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
355 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
356 vports.h, weaks.h:
357 Prefixed each each exported symbol with SCM_API.
358
d6b8cf11 359 * continuations.c: Added comment about the use of the extern
f712d833
MV
360 declarations of {get,set}context() functions used in the ia64 port.
361
362 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
363 is meant to be a `unsigned long *'.
364
365 * filesys.c: Include `direct.h' if possible. Use local
366 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
367 macros for M$-Windows. Implementation of `fstat_Win32()' which is
368 able to differentiate between sockets and other file descriptors.
369 Use this function as wrapper in `scm_fstat()'. Fixed typo in
370 `scm_dirname()'.
371
372 * fports.c: Include `io.h' is possible. Put `*fp' into referring
373 statement block in `scm_fport_buffer_add()'.
374 Some corrections in `getflags()'.
d6b8cf11 375
f712d833
MV
376 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
377
378 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
379 build on Win32. Disable preloaded symbols on Win2 platforms.
380
381 * ioext.c, ports.c: Include `io.h' is possible.
382
383 * mkstemp.c: Include `process.h' is possible.
384
385 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
386 too.
387 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
388
389 * posix.c: Remove unnecessary dirent includes and defines. Include
390 local `win32-uname.h' for MinGW. Extern declaration of
391 `mkstemp()' for systems where it does not exists. Make
392 `getlogin()' available on M$-Windows.
393
394 * scmsigs.c: Made `usleep()' avalable on MinGW.
395
396 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
397
398 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
399
400 * win32-uname.c: Include "win32-uname.h", not "uname.h".
401
d245ce23
MD
4022001-10-28 Mikael Djurfeldt <mdj@linnaeus>
403
404 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
405 Don't apply scm_uniform_vector_length on arrays.
406
8ea46249
DH
4072001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
408
409 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
410 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
411 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
412 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
413 scm_list_<n> over scm_cons[2]?.
414
415 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
416 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
417 SCM_C[AD][AD]R instead of explicit form.
418
419 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
420 comparison parameters.
421
422 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
423 !SCM_NULLP instead of SCM_NIMP.
424
425 (scm_m_case): Don't copy the form. Renamed proc to clause and
426 minimized its scope. Renamed x to clauses. Removed side
427 effecting operation from macro call.
428
429 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
430 minimized its scope. Renamed x to clauses. Minimized the scope
431 of variable 'len'. Make sure the else clause is treated specially
432 even in case of '=>' occurences. Don't change the else to #t in
433 order to be able to distinguish this case in the evaluator. Leave
434 type checking of the recipient to the evaluator.
435
436 (scm_c_improper_memq): Made the comment somewhat clearer.
437
438 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
439 test for SCM_IM_LET at the place of the formal parameters.
440 Simplified the formal parameter checking.
441
442 (scm_m_letstar): Added Comment. Renamed proc to bindings.
443 Renamed arg1 to binding and minimized its scope. Eliminated
444 unnecessary consing.
445
446 (scm_m_do): Renamed proc to bindings. Minimized the scope of
447 variable 'len'.
448
449 (build_binding_list): New static function.
450
451 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
452 Further, split up the 'letrec' unmemoizing code to the
453 corresponding parts for 'do', 'let' and 'letrec', adding comments
454 to each form. Cleanup the handling of the do form (This removes
455 some *real* code :-).
456
457 (SCM_CEVAL): Removed side effecting operation from macro call.
458 Handle the 'else clause of the 'cond form specially - the symbol
459 'else is not replaced with #t any more.
460
8186c4f5
GH
4612001-10-14 Gary Houston <ghouston@arglist.com>
462
463 * version.c (scm_version): use sprintf instead of snprintf,
464 for portability. thanks to Bill Schottstaedt.
465
89759084
MD
4662001-10-14 Mikael Djurfeldt <mdj@linnaeus>
467
468 * read.c (scm_lreadr): When user-defined hash procedure returns
469 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
470 an exception. (This prevents parsing of uniform vectors from
471 interfering with parsing of numbers.)
472
9c7ce563
MV
4732001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
474
475 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
476 PTRDIFF_MIN. Thanks to Ken Raeburn.
477
4782001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
479
480 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
481
482 * eval.c (scm_m_atbind): First try to find the variable without
483 defining it locally; when it has not been found, define it
484 locally.
485
486 * modules.c (module_variable): Pass over variables that exist but
487 are unbound.
488
4892001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
490
491 * backtrace.c (display_backtrace_file_and_line): Only use
492 scm_basename when POSIX support is compiled in. Thanks to Chris
493 Cramer.
494
1fe5e088
DH
4952001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
496
497 * numbers.c (mem2uinteger): Return number read so far when coming
498 across a hexdigit after having read a # or if not reading a hex
499 value. This will enable the calling code to correctly handle
500 forms like 1e2. (The background is, that the exponent markers d,
501 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
502 providing this patch.
503
504 (mem2complex): Fix erroneous double-negation. Now, numbers like
505 1-i will be read correctly.
506
68665a97
MD
5072001-10-12 Mikael Djurfeldt <mdj@linnaeus>
508
509 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
510
511 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
512
d5cf5324
DH
5132001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
514
515 * print.c (scm_print_state_vtable, print_state_pool):
516 Initialize. These variables are now registered as gc roots.
517
518 (scm_current_pstate): Update documentation.
519
520 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
521 scm_prin1, scm_init_print): print_state_pool is registered as a
522 gc root and thus does not need to be protected by a surrounding
523 pair any more.
524
525 (make_print_state): The car of print_state_pool no longer holds
526 the scm_print_state_vtable.
527
528 (scm_current_pstate, scm_make_print_state, print_circref,
529 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
530 SCM_N<foo>.
531
532 (scm_prin1): When building lists, prefer scm_list_<n> over
533 scm_cons[2]?.
534
535 (scm_iprlist): Removed a redundant SCM_IMP test.
536
537 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
538
37c56aec
DH
5392001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
540
541 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
542
543 (scm_memcons, scm_mem_to_proc): When building lists, prefer
544 scm_list_<n> over scm_cons[2]?.
545
546 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
547
548 (scm_procedure_name): Use SCM_CADR instead of explicit form.
549
550 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
551 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
552 for some reason his patch didn't make it into the cvs.
553
79d34f68
DH
5542001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
555
556 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
557 little bit - should even be somewhat more accurate now.
558
5e137c65
RB
5592001-10-08 Rob Browning <rlb@defaultvalue.org>
560
561 * gc.c: support ia64 register backing store.
562 (SCM_MARK_BACKING_STORE): new macro.
563
564 * continuations.h: support ia64 register backing store.
565 (struct scm_t_contregs): add ia64 register backing store.
566
567 * continuations.c: support ia64 register backing store.
568 (continuation_mark): mark ia64 register backing store.
569 (continuation_free): free ia64 register backing store.
570 (scm_make_continuation): capture ia64 register backing store.
571 (copy_stack_and_call): copy ia64 register backing store.
572
ee083ac2
DH
5732001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
574
575 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
576 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
577 instead of SCM_NIMP to test for that case.
578
579 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
580 scm_t_bits instead of long.
581
71dcdbf9
MV
5822001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
583
584 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
585 SCM_T_SIGNED_BITS_MIN): New.
586 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
587 Use them to make these macros computable by the preprocessor.
588
589 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
590 whether the integral type fits in a fixnum, not the compiler.
591 This removes a spurious compiler warning. Also, honor the
592 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
593 needed for `long long's.
594
595 * numbers.c: Define NO_PREPRO_MAGOC when including
596 num2integral.c.i for `long long' and `signed long long'.
597
152812c0
MD
5982001-10-06 Mikael Djurfeldt <mdj@linnaeus>
599
600 These changes fixes a race condition in the Guile coop - pthread
601 compatibility code.
d6b8cf11 602
152812c0
MD
603 * coop.c (mother_awake_p): New variable.
604 (coop_create): Set mother_awake_p before creating or signalling
605 mother; wait until mother is going to sleep before returning.
606 (mother): Reset mother_awake_p before going to sleep.
607
11d49f54
DH
6082001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
609
610 * options.c (protected_objects, scm_init_options): The content of
611 protected_objects is now protected from garbage collection using
612 scm_gc_register_root instead of scm_permanent_object.
613
614 (get_option_setting): New static function that computes an option
615 setting as it was formerly done in the function scm_options.
616
617 (get_documented_option_setting): New static function that
618 returns option documentation as it was formerly done in the
619 function scm_options. Note that documentation C strings are no
620 longer precomputed into SCM objects. Instead, they are converted
621 into SCM strings every time get_documented_option_setting is
622 called.
623
624 (change_option_setting): New static functions that modifies the
625 option setting as it was formerly done in the function
626 scm_options. The function is now exception safe, i. e. won't
627 cause a memory leak when interrupted. Further, only non-immediate
628 option values are added to the protection list.
629
630 (scm_options): This function now has only the purpose to dispatch
631 to to get_option_setting, get_documented_option_setting or
632 change_option_setting, depending on the arguments given to
633 scm_options.
634
635 (scm_init_opts): Don't convert documentation C strings into SCM
636 strings. Further, don't protect any object values: They _must_
637 be immediate values, otherwise there is no guarantee that they
638 have not been collected before anyway.
639
640 * options.[ch] (scm_t_option): Made type unsigned, name into a
641 constant char* and val into a scm_t_bits type.
642
643 (scm_options, scm_init_opts): The number of options is guaranteed
644 to be larger or equal to zero. Thus, the type is changed to
645 unsigned.
646
3dbacabc
DH
6472001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
648
649 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
650 testing an unsigned value for being >= 0.
651
14282d0f
DH
6522001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
653
654 * numbers.h: Removed old comment about using SCM_CAR to access
655 non-pair cells.
656
657 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
658 the return value is signed. Thanks to Brian Crowder for the bug
659 report.
660
661 (SCM_SRS): Avoid unnecessary casting and don't unpack input
662 values. With this patch, SCM_SRS can be safely used for other
663 types than scm_t_signed_bits. However, it should still better be
664 an internal macro and thus be renamed to SCM_I_SRS.
665
666 (SCM_MAKINUM, SCM_INUM): Use proper casting.
667
2dbec7b5
GH
6682001-10-03 Gary Houston <ghouston@arglist.com>
669
670 * continuations.h, unif.h: in the descriptions of the bit patterns
671 of the heap cells, make bit 0 the least significant.
672
cf4ee841
TTN
6732001-09-25 Thien-Thi Nguyen <ttn@glug.org>
674
675 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
676 Thanks to Golubev I. N.
677
4a151b3d
GH
6782001-09-25 Gary Houston <ghouston@arglist.com>
679
680 * ports.c (scm_drain_input): extended the docstring. thanks to
681 Alex Schroeder and Thien-Thi Nguyen.
682
581ded70
MD
6832001-09-23 Mikael Djurfeldt <mdj@linnaeus>
684
685 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
686 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
687 macros. (The NUM names might soon change.)
688
689 * numbers.h: Added missing declarations.
690
5437598b
MD
6912001-09-22 Mikael Djurfeldt <mdj@linnaeus>
692
693 * Makefile.am: Distribute num2float.i.c.
694
695 * num2float.i.c: New file, multiply included by numbers.c, used
696 to "templatize" the float <-> num conversion routines.
697
698 * numbers.c: New functions: scm_num2float, scm_float2num,
699 scm_num2double, scm_double2num.
700
0b073f0f
RB
7012001-09-21 Rob Browning <rlb@defaultvalue.org>
702
703 * .cvsignore: really add version.h
704
705 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
706 Otherwise it fails on the alpha. However, we might rather choose
707 this size conditionally.
708
709 * numbers.c (scm_gcd): change "k" to a long from an int.
710 Otherwise it fails on the alpha. However, we might rather choose
711 this size conditionally.
712
713 * error.c (scm_wta): coerce char* to intptr_t before int
714 assignment.
715
716 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
717 int.
718
719 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
720
2830fd91
MD
7212001-09-20 Mikael Djurfeldt <mdj@linnaeus>
722
723 * numbers.c (scm_integer_expt): Accept inexact integer in second
724 argument. (Thanks to Bill Schottstaedt.)
725
c13f0a90
RB
7262001-09-20 Rob Browning <rlb@defaultvalue.org>
727
728 * .cvsignore: add version.h
729
730 * versiondat.h.in: removed (obsolete).
731
732 * version.h.in: renamed from version.h.
733 (SCM_GUILE_MAJOR_VERSION): new public macro.
734 (SCM_GUILE_MINOR_VERSION): new public macro.
735 (SCM_GUILE_MICRO_VERSION): new public macro.
736
737 * version.h: renamed to version.h.in.
738
739 * version.c
740 (scm_major_version): support integer *_VERSION macros.
741 (scm_minor_version): support integer *_VERSION macros.
742 (scm_micro_version): support integer *_VERSION macros.
743 (scm_version): support integer *_VERSION macros.
744
147c18a0
MD
7452001-09-20 Mikael Djurfeldt <mdj@linnaeus>
746
747 * error.c, error.h: Made error keys globally accessible.
748 Applications might want to test for these or use them in a direct
749 call to scm_error.
750
751 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
752 routines are passed an inexact. This change in behavior is
753 motivated by concordance with R5RS: It is more common that a
754 primitive doesn't want to accept an inexact for an exact.
755
662c5539
DH
7562001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
757
758 The following patch partially undoes my patch from 2001-06-30,
759 where I added the function scm_gc_mark_cell_conservatively. The
760 function is buggy, since it breaks guile during conservative
761 marking if a pointer on the stack points directly into the list of
762 free cells on the heap: With conservative cell marking this will
763 cause the whole free list to be scanned and marked - boom!
764
765 * gc.c (allocated_mark, MARK, heap_segment,
766 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 767 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
768 scm_gc_mark_cell_conservatively and update the corresponding
769 comments and uses accordingly. Thanks to Christopher Cramer for
770 the patch. (Minor corrections by me.)
771
6c1b7628
GH
7722001-09-15 Gary Houston <ghouston@arglist.com>
773
774 * root.h (scm_root_state): removed the continuation_stack and
775 continuation_stack_ptr members, which have no apparent purpose.
776 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
777 removed.
662c5539 778
6c1b7628
GH
779 * root.c (root_mark), init.c (restart_stack, start_stack), gc
780 (scm_igc): remove all references to contination_stack and
781 continuation_stack_ptr, avoiding allocation of a vector and
782 useless processing during gc.
783
455c0ac8
DH
7842001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
785
786 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
787
788 (TCONC_IN): Make sure that the cell word 0 is initialized last.
789
790 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
791
792 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
793
794 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
795 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
796
22ba637b
DH
7972001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
798
799 * guardians.c (mark_dependencies_in_tconc,
800 whine_about_self_centered_zombies, scm_init_guardians): Register
801 the static global variable `self_centered_zombies' via
802 scm_gc_register_root, to make some cdr-ing unnecessary.
803
c3c4d801
DH
8042001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
805
806 * backtrace.c (display_backtrace_file,
807 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
808 values, use SCM_FALSEP when comparing SCM values against #f.
809 Thanks to Rob Browning for the bug report.
810
b00418df
DH
8112001-09-12 Martin Baulig <martin@home-of-linux.org>
812
813 * strings.[ch] (scm_str2string): New function.
814
a0d34a0b
MV
8152001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
816
817 * gc.c (scm_done_free): Always subtract size from scm_mallocated
818 when computing nm, even if it's negative.
819 (scm_must_malloc): Abort on overflow of scm_mtrigger.
820 (scm_must_realloc): Likewise.
821
b10586f0
ML
8222001-09-01 Michael Livshin <mlivshin@bigfoot.com>
823
824 * numbers.c (scm_sys_check_number_conversions): new function,
825 defined if Guile is compiled in debugging mode. currently checks
826 `scm_num2ulong', should check much much more.
827
828 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
829 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 830
8c494e99
DH
8312001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
832
833 * __scm.h: Added new section about compile time selectable
834 features.
835
836 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
837 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
838 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
839 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
840 Removed.
841
842 * deprecation.c (scm_include_deprecated_features): Simplified.
843
844 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
845