* list.h (SCM_LISTn): New macros. Make list creation in C code
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
92396c0a
MD
1Mon Sep 15 20:42:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2
3 * list.h (SCM_LISTn): New macros. Make list creation in C code
4 prettier. The idea comes from STk.
5
6 * sequences.h, sequences.c, append.h, append.c: Removed. These
7 files implemented non-R4RS operations which would encourage
8 non-portable programming style and less easy-to-read code.
9
10 * Makefile.am (sequences.h, sequences.c, append.h, append.c):
11 Removed.
12
13 * libguile.h, eval.c, init.c, stime.c, unif.c: Removed #include
14 sequences.h, #include append.h.
15
16 * init.c (scm_boot_guile_1): Removed calls to scm_init_append and
17 scm_init_sequences.
18
19 * gh.h, gh_list.c: Renamed gh_list_length --> gh_length.
20
21 * list.h, list.c: Renamed scm_list_length --> scm_length, scm
22
23 * stime.c (bdtime2c): Changed scm_obj_length --> scm_vector_length.
24
25Sat Sep 13 00:21:41 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
26
27 * eval.c: Added #include "objects.h"
28
29 * tags.h (scm_tc16_object, scm_tc16_entity): Smobtags for objects
30 and entities.
31
32 * smob.c (scm_smob_prehistory): Create two objectsmobs with
33 adjacent smob numbers.
34
80ea260c
MD
35Thu Sep 11 00:59:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
36
37 * procprop.h: Added declaration of scm_i_inner_name.
38
39 * gsubr.c: New global symbol scm_i_inner_name.
40
41 * debug.c (scm_procedure_name): Try procedure property
42 `inner-name' if `name' fails.
43
44 * print.c (scm_iprin1): Use scm_macro_name.
45
46 * eval.c (scm_m_define): Give names to macros as well; Only the
47 first top-level definition gives a procedure/macro a name.
48 Otherwise confusing names can turn up in backtraces.
49 (SCM_CEVAL): SCM_IM_DEFINE: Set `inner-name' property instead of
50 `name'; Give names to macros as well.
51
52 * procs.c (scm_closure_p), print.c (scm_iprin1), eval.c
53 (scm_macro_transformer): Use SCM_CLOSUREP instead of
54 scm_closure_p.
55
7332df66
MD
56Wed Sep 10 20:52:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
57
58* * eval.c (macro?, macro-type, macro-name, macro-transfomer): New
59 procedures;
60 (prinmacro): Removed. The code has been moved/merged into print.c
61 in order to decrease code redundancy. We want macros to print in
62 a way equivalent to procedures, and it would be silly to duplicate
63 the required code. (We don't want to maintain two places.)
64 (macrosmob): Print field is now a NULL pointer.
65
66 * eval.h (scm_macro_p, scm_macro_type, scm_macro_name,
67 scm_macro_transformer): New prototypes.
68 (scm_tc16_macro): Declared.
69
70* * print.c (scm_iprin1): Added code for printing of macros. Macros
71 are now printed in a way equivalent to procedures.
72
73Sat Sep 6 12:20:42 1997 Mikael Djurfeldt <mdj@kenneth>
74
75 * procs.h (scm_closure_p): Added declaration.
76
77Fri Sep 5 13:36:14 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
78
79 * gc.c (scm_gc_mark): Fixed "rogue pointer in heap" message:
80 Shouldn't pass "heap" as the subr name.
81
614590c5
JB
82Tue Sep 2 18:14:30 1997 Jim Blandy <jimb@totoro.red-bean.com>
83
84 * gh_predicates.c (gh_boolean_p, gh_symbol_p, gh_char_p,
85 gh_vector_p, gh_pair_p, gh_number_p, gh_string_p, gh_procedure_p,
86 gh_list_p, gh_inexact_p, gh_exact_p, gh_eq_p, gh_eqv_p,
87 gh_equal_p): Use SCM_NFALSEP, instead of testing against
88 SCM_BOOL_T. Any non-false value is true.
89
1ff4df7a
MD
90Tue Sep 2 00:27:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
91
92 * symbols.h (scm_builtin_bindings, scm_builtin_weak_bindings,
93 scm_gensym): Added prototypes.
94
95 * symbols.c (scm_gensym): New function. This will speed up
96 certain types of applications (such as macro systems) which
97 generate lots of symbols.
98
d28da049
MD
99Mon Sep 1 22:30:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
100
101 * numbers.c (logand, logior, logxor): Handle 0 or 1 arguments.
102
20a54673
GH
103Sat Aug 30 18:56:19 1997 Gary Houston <ghouston@actrix.gen.nz>
104
105 * unif.c (scm_shap2ra): tighten the checking of the array dimension
106 specifier, since (2) or (2 . 3) would cause SEGV.
107 (scm_transpose_array): more argument checking fixes.
108
614590c5
JB
109Thu Aug 28 23:48:53 1997 Jim Blandy <jimb@totoro.red-bean.com>
110
111 * Makefile.in: Regenerated.
112
34695603
JB
113Wed Aug 27 17:44:44 1997 Jim Blandy <jimb@totoro.red-bean.com>
114
115 * Makefile.in: Regenerated, so it uses "tar", not "gtar".
116
88482b31
MD
117Mon Aug 25 13:47:25 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
118
119 * error.c, error.h (scm_error_callback): Removed (see NEWS).
120
95f5b0f5
MD
121Sun Aug 24 01:25:35 1997 Mikael Djurfeldt <mdj@kenneth>
122
a46d5ff2
MD
123 * regex-posix.c: If <regex.h> can't be found, try <rxposix.h> or
124 <rx/rxposix.h>. (This is in order to accomodate for the GNU Rx
125 library.)
126
95f5b0f5
MD
127 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp, ramap_1,
128 ramap_2o, scm_array_index_map_x, raeql_1, scm_array_equal_p),
129 unif.c (scm_vector_set_length_x, scm_uniform_vector_length,
130 scm_array_p, scm_array_rank, scm_array_dimensions,
131 scm_enclose_array, scm_array_in_bounds_p, scm_uniform_vector_ref,
132 scm_cvref, scm_array_set_x, scm_array_contents, scm_array_to_list,
133 scm_array_prototype): Added case scm_tc7_wvect.
134
efb997f5
GH
135Sat Aug 23 18:45:44 1997 Gary Houston <ghouston@actrix.gen.nz>
136
137 * errno.h: prototype for scm_strerror.
138 * error.c (scm_strerror): new procedure.
139
1a0e096c
MD
140Mon Aug 18 14:58:22 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
141
142 * list.c (scm_list_append_x): Allow non-pair as last argument.
143 This is consistent with the R4RS append and is probably the
144 correct behaviour as specified by R2RS. (Thanks to Radey Shouman)
145
6afcd3b2
GH
146Sat Aug 16 18:42:15 1997 Gary Houston <ghouston@actrix.gen.nz>
147
148 * stime.h: prototype for scm_times.
149 * stime.c (scm_times): new procedure.
150 * ioext.c (scm_fseek): if the first argument is a file descriptor
151 call lseek.
152 (scm_ftell): if the first argument is a file descriptor call lseek
153 (sic).
154 * filesys.h: prototypes for scm_open_fdes, scm_fsync.
155 * filesys.c (scm_chmod): if the first argument is a file descriptor,
156 call fchmod.
157 (scm_chown): if the first argument is a port or file descriptor,
158 call fchown.
159 (scm_truncate_file): new procedure.
160 Add DEFER/ALLOW INTS to a few other procedures.
161 (scm_fsync): new procedure.
162 (scm_open_fdes): new procedure.
163 (scm_open): use scm_open_fdes. If mode isn't specified, 666 will
164 now be used.
165 (scm_fcntl): the first argument can now be a file descriptor. The
166 third argument is now optional.
167
168 * posix.c (scm_execl, scm_execlp): make the filename argument
169 compulsory, since omitting it causes SEGV.
170 (scm_sync): return unspecified instead of #f.
171 (scm_execle): new procedure.
172 (environ_list_to_c): new procedure.
173 (scm_environ): use environ_list_to_c. disable interrupts.
174 (scm_convert_exec_args): take pos and subr arguments and
175 improve error checking.
176
0824b524
MD
1771997-08-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
178
179 * stacks.c (scm_make_stack), coop-threads.c, mit-pthreads.c
180 (scm_call_with_new_thread): Bugfix: SCM_WNA should go as third
181 argument to SCM_ASSERT. Furthermore, the name of the function
182 should be passed as first argument when signalling
183 SCM_WNA. (Thanks to Thomas Morgan)
184
185 * gsubr.c (scm_gsubr_apply): From Radey Shouman
186 <shouman@zianet.com>: "The switch in scm_gsubr_apply that
187 dispatches on the number of actual args has a default case
188 reporting an internal error. This is a vestige from a version
189 that mallocated a SCM vector to hold the arguments. In the
190 current version this check is too late: if it ever happens we will
191 have already overstepped the bounds of the array.
192
193 Also, the patch [...] adds a check for too many actual arguments."
194
195 mdj: Removed check for "internal programming error".
196
4ed948d4
MD
197Wed Aug 13 15:38:44 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
198
f2ae0a19 199 * gh_io.c (gh_write): New function.
4ed948d4 200
f2ae0a19 201 * gh_eval.c (catch_with_saved_stack): Removed. Replaced by:
4ed948d4
MD
202 throw.c (scm_internal_stack_catch): New sibling to the other catch
203 functions. Code moved from gh_eval.c.
204 throw.h: Added header.
205 gh_eval.c (gh_eval_str_with_stack_saving_handler): Renamed call to
206 scm_internal_stack_catch.
207
7a6f1ffa
GH
208Tue Jul 29 01:03:08 1997 Gary Houston <ghouston@actrix.gen.nz>
209
210 * ioext.h: fix up prototypes.
211 * ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
212 Scheme name is now dup->fdes.
213 (scm_dup_to_fdes): make the second argument optional and
214 fold in the functionality of scm_primitive_dup.
215 (scm_primitive_dup): deleted.
216
217Mon Jul 28 05:24:42 1997 Gary Houston <ghouston@actrix.gen.nz>
218
219 * fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
220 * fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
221 ultrix are defined. Use setvbuf instead of setbuf.
222 (scm_setvbuf): new procedure.
223 (scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
224 (scm_setfileno): moved from ioext.c.
225 (scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
226 (top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.
227
a0cb6cb0
MV
228Sun Jul 27 10:54:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
229
230 * fluids.c (scm_fluid_p): New function.
231 * fluids.h (scm_fluid_p): New prototype.
232
233Sat Jul 26 21:33:37 1997 Marius Vollmer <mvo@zagadka.ping.de>
234
235 * print.c (scm_iprin1): Enter printed structures into the print
236 state as nested data while they are printed.
237 (print_state_fluid, print_state_fluid_num): New variables.
238 (scm_init_print): Initialize them.
239 (scm_iprin): If print_state_fluid carries a print_state, use that
240 instead of creating a new one.
241 (scm_printer_apply, apply_stub, struct apply_data): New
242 definitions to help with calling printer functions written in
243 Scheme.
244 * print.h (scm_printer_apply): New prototype.
245
246 * struct.c (scm_print_struct): Use scm_printer_apply to call the
247 user defined struct printer.
248
249 * dynwind.c (scm_dowinds): Handle fluids on the wind list.
250 * fluids.h (scm_internal_with_fluids, scm_with_fluids,
251 scm_swap_fluids, scm_swap_fluids_reverse): New prototypes.
252 * fluids.c (scm_internal_with_fluids, scm_with_fluids,
253 scm_swap_fluids, scm_swap_fluids_reverse): New functions.
254
255Fri Jul 25 12:05:46 1997 Marius Vollmer <mvo@zagadka.ping.de>
256
257 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fixed use of
258 SCM_ASSERT: arg comes before pos.
259
269861c7
MD
260Fri Jul 25 17:00:38 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
261
262 * eval.c (scm_apply): Handle the case when a tc7_sybr_2 is applied
263 to a list of length zero correctly.
264
3cb988bd
TP
265Wed Jul 23 16:17:46 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
266
267 Supply an `fgets' method for port objects to do fast line i/o.
268 * ioext.c (scm_read_line): New function.
269 * genio.c (scm_gen_read_line): New function.
270 * fports.c (scm_fgets): New function.
271 (scm_fptob, scm_pipob): Add scm_fgets method.
272 * ports.c (fgets_void_port, scm_generic_fgets): New functions.
273 (void_port_ptob): Add void fgets method.
274 (scm_newptob): Initialize fgets method from ptob struct.
275 * ports.h (scm_ptobfuns): Add fgets method.
276 * vports.c (scm_sfptob): Supply generic fgets method.
277 * strports.c (scm_stptob): Supply generic fgets method.
278
e38303a2
GH
279Mon Jul 21 04:03:42 1997 Gary Houston <ghouston@actrix.gen.nz>
280
281 * ioext.h: removed scm_duplicate_port prototype.
282
283 * ioext.c (scm_primitive_dup2): return the new file descriptor
284 instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
285 is convenient.
286 (scm_fdopen): bug fix: don't try to make port unbuffered until its
287 stream has been set.
288 (scm_duplicate_port): deleted, there's now an implementation in
289 boot-9.scm.
290 (scm_primitive_dup2): do nothing if newfd == oldfd.
291
eadd48de
GH
292Sun Jul 20 03:55:49 1997 Gary Houston <ghouston@actrix.gen.nz>
293
a9488d12
GH
294 * filesys.c (scm_close): oops, don't call SCM_INUM twice on the
295 argument.
296
297 * ioext.h: new prototypes.
298 * ioext.c (scm_primitive_dup, scm_primitive_dup2): new procedures.
299
eadd48de
GH
300 * fluids.c (next_fluid_num): don't do
301 SCM_THREAD_CRITICAL_SECTION_START/END unless USE_THREADS is defined.
302
303 * ports.h: prototypes too.
304 * ports.c (scm_mode_bits, scm_port_mode): moved from fports.c.
305
306 * fports.h: prototype too.
307 * fports.c (scm_evict_ports): moved from ioext.c.
308
9c29ac66
GH
309Sat Jul 19 04:56:52 1997 Gary Houston <ghouston@actrix.gen.nz>
310
eadd48de
GH
311 * ports.c (scm_close_port): return a boolean instead of unspecified.
312 throw an error if an error other than EBADF occurs.
313
314 * filesys.h: scm_close prototype.
315 * filesys.c (scm_close): new procedure, can close file descriptors
316 and ports (scsh compatible).
317
9c29ac66
GH
318 * ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
319 optional argument.
320
7f47d2d8
MV
321Fri Jul 18 11:19:53 1997 Marius Vollmer <mvo@zagadka.ping.de>
322
323 * fluids.c, fluid.h: New files.
324 * Makefile.am (libguile_la_SOURCES): Added "fluids.c".
325 (modinclude_HEADERS): Added "fluids.h"
326
327 * init.c: Include "fluids.h". (scm_boot_guile_1): Added call to
328 scm_init_fluids to initialize the fluid machine.
329 (scm_start_stack): Initialize the fluids of the first root with
330 scm_make_initial_fluids.
331
332 * root.h: Added "fluids" member to scm_root_state.
333 * root.c: Include "fluids.h". (scm_mark_root): Mark "fluids".
334 (scm_make_root): Call scm_copy_fluids to make fluid bindings
335 unique for the new root when it has a parent.
336
337 * smob.h: Include "libguile/print.h" to make scm_print_state
338 visible.
339
340 * dynl.c (free_dynl_obj): New function to free the dynamic object
341 data. (dynl_smob): Use it.
342 * dynl.c (scm_dynamic_link): Moved allocating of the memory for
343 the dynamic object data below the linking of the object to avoid
344 memory leak when the linking code throws an error. Now the code
345 leaks a whole dynamically linked library when must_malloc throws,
346 but that should be much less likely.
347
32552d73
JB
348Fri Jul 11 00:19:47 1997 Jim Blandy <jimb@floss.red-bean.com>
349
350 Changes to compile under gnu-win32, from Marcus Daniels:
351 * stime.c (tzset): If tzset isn't provided, make it a NOP.
352 (scm_localtime): Change SCM_EOF to SCM_EOL.
353 (scm_mktime): Likewise.
354 * socket.c: Don't include sys/un.h unless autoconf tells
355 us Unix domain sockets are available.
356 (scm_fill_sockaddr): Ignore Unix domain code.
357 (scm_addr_vector): Likewise.
358 (scm_init_addr_buffer): Likewise.
359 (scm_socketpair): Don't include unless socketpair was
360 found during autoconf.
361 * simpos.c (SYSTNAME): Treat cygwin like Unix.
362 * scmsigs.c (scm_pause): Don't include unless pause was found
363 during autoconf.
364 * posix.c (scm_getgroups): Don't include unless support function
365 was found during autoconf (in this case, getgroups).
366 (scm_setpwent): For setpwent.
367 (scm_setegid): For setegid.
368 * net_db.c (scm_inet_netof): Don't include unless support
369 function was found during autoconf (in this case, inet_netof).
370 (scm_lnaof): For inet_lnaof.
371 (scm_inet_makeaddr): For inet_makeaddr.
372 (scm_getnet): For getnetent, getnetbyname, getnetbyaddr.
373 (scm_getproto): For getprotoent.
374 (scm_getserv): For getservent.
375 (scm_sethost): For sethostent, endhostent.
376 (scm_setnet): For setnetent, endnetent.
377 (scm_setproto): For setprotoent, endprotoent.
378 (scm_setserv): For setservent, endservent.
379 * scmconfig.h.in: Regenerated.
380
8cedfb2e
JB
381Thu Jul 10 00:22:24 1997 Jim Blandy <jimb@floss.red-bean.com>
382
383 * stime.c (scm_localtime, scm_mktime): Pass SCM_EOL to
384 scm_misc_error, not SCM_EOF.
385
386 * error.c (scm_wta): Pass SCM_EOL to scm_misc_error as the list of
387 arguments for formatting the error message, not SCM_BOOL_F. I
388 think this is left over from the (eq? '() #f) days.
389
390 * read.c (recsexpr): Give this a dummy definition if
391 DEBUG_EXTENSIONS isn't #defined.
392
517591cd
MV
393Fri Jul 4 23:42:17 1997 Marius Vollmer <mvo@zagadka.ping.de>
394
395 * coop-threads.c (scm_wait_condition_variable): Lock mutex again
396 after waiting.
397
3f094ddf
MV
398Thu Jul 3 16:31:24 1997 Marius Vollmer <mvo@zagadka.ping.de>
399
400 * root.c (cwdr_outer_body): Bugfix: Pass `c' instead of `&c' to
401 scm_internal_catch.
402
4a5fa91c
TP
403Sat Jun 28 16:14:09 1997 Tim Pierce <twp@twp.tezcat.com>
404
405 * Makefile.am (libguile_la_LIBADD): Remove @ALLOCA@, since
406 alloca.lo will be included in @LIBLOBJS@. Something better than
407 this should be possible.
408 * Makefile.in: Regenerated.
409
7ad3c1e7
GH
410Sat Jun 28 03:40:15 1997 Gary Houston <ghouston@actrix.gen.nz>
411
412 * simpos.h: prototype for scm_primitive_exit.
413 * simpos.c (scm_primitive_exit): new procedure, terminates the
414 process without unwinding the stack.
415
5d4774bc
TP
416Sat Jun 28 03:45:25 1997 Tim Pierce <twp@twp.tezcat.com>
417
418 * regex-posix.c (scm_make_regexp): Make `flags' a variable-length
419 argument and logior its components together, so the user doesn't
420 have to do this explicitly. Also, if regexp/basic is supplied, then
421 turn off REG_EXTENDED.
422 (scm_init_regex_posix): New regexp/basic symbol.
423 (REG_BASIC): #define this if it is not already present.
424
ad6b30a0
TP
425Fri Jun 27 20:36:35 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
426
427 * Makefile.am (libguile_la_LIBADD): Include @ALLOCA@.
428 (MOSTLYCLEANFILES): New target, changed from CLEANFILES.
429 (CLEANFILES): New target, clean versiondat.h, libpath.h.
430 (DISTCLEANFILES): New target, clean *.x.
9159ebec 431 * Makefile.in: Regenerated.
ad6b30a0 432
db561408
JB
433Tue Jun 24 00:29:07 1997 Jim Blandy <jimb@floss.red-bean.com>
434
9230ac78
JB
435 * script.c (scm_compile_shell_switches): Add 1997 to copyright
436 years in usage message.
437
9572c0d0
JB
438 * Makefile.am (libguile_la_LDFLAGS): Bump library version.
439 * Makefile.in: Regenerated.
440
fcff2c5c
JB
441 * regex-posix.c (scm_init_regex_posix): Delete the regexp/nosub
442 flag; I don't think we support it.
9572c0d0
JB
443 (scm_make_regexp): Make sure the user doesn't pass the
444 regexp/nosub flag.
fcff2c5c
JB
445
446 * regex-posix.c (scm_make_regexp, scm_regexp_exec): Add optional
db561408
JB
447 FLAGS arguments.
448 (scm_init_regex_posix): Define constants for the REG_mumble flags;
449 name them according to the SCSH convention: regexp/mumble.
fcff2c5c 450
db561408
JB
451 * regex-posix.h (scm_make_regexp, scm_regexp_exec): Update prototypes.
452
2409cdfa
JB
453Mon Jun 23 18:44:49 1997 Jim Blandy <jimb@floss.red-bean.com>
454
455 * Makefile.am (libpath.h): Include the values of all the standard
456 Makefile directory variables. Print a message, but don't print
457 all the commands.
458 (versiondat.h): Print a message, but don't print all the commands.
459 * load.c: #include "alist.h".
460 (init_build_info): New function.
461 (scm_init_load): Call it.
462 * Makefile.in: Regenerated.
463
eb1e924e
JB
464Sun Jun 22 19:12:58 1997 Jim Blandy <jimb@floss.red-bean.com>
465
d94c6eeb
JB
466 * root.c: Establish a reliable catch-all handler for the new root.
467 After all the Scheme handler function might signal an error too,
468 and we don't want to lose that.
469 (cwdr_inner_body): Renamed from cwdr_body.
470 (cwdr_outer_body): New function, to establish the user's handler,
471 and pass control to cwdr_inner_body.
472 (cwdr): Establish the reliable catch-all handler here, and pass
473 control to cwdr_outer_body.
474 (struct cwdr_body_data): New field, handler, to allow cwdr to pass
475 the user's handler through to cwdr_outer_body.
476 * throw.c (scm_handle_by_message): Move guts into....
477 (handler_message): New static function.
478 (scm_handle_by_message_noexit): New function.
479 * throw.h (scm_handle_by_message_noexit): New prototype.
480
eb1e924e
JB
481 * __scm.h: (SCM_FENCE): New macro: optimizer will not move code
482 across this. Only works on GCC. Otherwise, we hope for the best.
483 (SCM_DEFER_INTS, SCM_ALLOW_INTS): Use FENCE appropriately. I have
484 the feeling that real thread systems will not need this...
485
0dc48630
JB
486Sun Jun 22 15:46:35 1997 Jim Blandy <jimb@floss.red-bean.com>
487
91b28bb5
JB
488 Try to detect when people are using one version of libguile and a
489 different version of ice-9. People have been skewing things and
490 sending in bug reports.
491 * Makefile.am (versiondat.h): New file to generate.
492 * version.c: #include "versiondat.h", to get version info.
493 (scm_libguile_config_stamp): New function.
494 * script.c: #include "version.h".
495 (scm_compile_switches): Call scm_version to get version number.
496 * scmconfig.h.in, Makefile.in: Regenerated.
497 * Makefile.in: Regenerated.
498
499 * Makefile.am (ETAGS_ARGS): Catch SCM_PROC, etc. so we can find
500 primitive definitions under their Scheme names.
501
502 * Makefile.am (libguile_la_LDFLAGS): Update library version to
503 1:2. Helps avoid confusion between installed and uninstalled libs.
504
0dc48630
JB
505 * scmconfig.h.in: Regenerated. (Needed after June 3 change to
506 ../configure.in.)
507
508 * gdb_interface.h (GDB_INTERFACE): Remove semicolon and trailing
509 backslash from definition; this should be used like: GDB_INTERFACE;
510
c85e73d3
GH
511Sun Jun 22 04:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
512
513 * ioext.c (scm_duplicate_port): bug fix: don't try to make the
514 new port unbuffered until its stream has been set.
515
89ea5b7c
GH
516Sat Jun 21 18:44:03 1997 Gary Houston <ghouston@actrix.gen.nz>
517
518 * ports.h: new prototype.
519 * ports.c (scm_flush_all_ports): new procedure, scsh compatible.
520
91529b1d
JB
521Sat Jun 21 00:25:03 1997 Jim Blandy <jimb@floss.red-bean.com>
522
523 Make things compile neatly under Sun's C compiler.
524 * dynl.c (scm_dynamic_func): Cast return value from sysdep_dynl_func.
525 * extchrs.c (xmbtowc): Make the second arg a normal char, not
526 unsigned, because that's what the ANSI function takes.
527 * extchrs.h (xmbtowc): Corresponding change to prototype.
528 * genio.c (scm_gen_getc): Make buf plain chars. Nobody wants
529 uchars here.
530 * mbstrings.c (scm_mb_ilength): Use ANSI arg syntax. Make DATA
531 argument plain char *.
532 * strings.c (scm_string): Use SCM_ROCHARS, since c is a plain
533 char.
534 * tag.c (scm_tag): Remove unreachable statement.
535 * unif.c (scm_array_to_list): If we want to shift a 1 bit to the
536 top of the word, it should be unsigned.
537
538 * eval.c (scm_lookupcar1): Don't declare var2 unless USE_THREADS
539 is defined, to avoid warnings; it's only used in the
540 conflict-checking code. Which might go away anyway.
541 (SCM_CEVAL): All goto's targeting the `dispatch' label are in
542 conditionals; put the label definition in an #if too, to stifle
543 warnings.
544
545 * Makefile.am (EXTRA_DIST): Include ChangeLog-gh and
546 ChangeLog-threads in the distribution.
547 * Makefile.in: Regenerated.
548
bee14491
TP
549Fri Jun 20 10:03:41 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
550
551 * guile-snarf.in: Changed regexp to support CPPs that insert
552 whitespace between lexical tokens (which munges the `%%%' snarf
553 cookie).
554
55407879
TP
555Tue Jun 17 13:49:56 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
556
fcff2c5c 557 * load.c (scm_init_load_path): Append $(datadir)/guile to
55407879
TP
558 %load-path, so modules do not have to be installed in Guile's
559 current version directory.
560
e5f8e12f
MV
561Mon Jun 16 17:20:55 1997 Marius Vollmer <mvo@zagadka.ping.de>
562
563 * dynl.c (scm_dynamic_call, scm_dynamic_args_call): Wrap dynamic
564 function call in SCM_DEFER_INTS/SCM_ALLOW_INTS.
565 (scm_dynamic_link, scm_dynamic_unlink, scm_dynamic_func): Always
566 call the sysdep functions with deferred ints.
567 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c (sysdep_dynl_link,
568 sysdep_dynl_unlink, sysdep_dynl_func): Expect to be called with
569 deferred interrupts and insert SCM_ALLOW_INTS before throwing an
570 error.
571
572 * dynl.c (scm_dynamic_unlink, scm_dynamic_call): Return
573 SCM_UNSPECIFIED.
574
cc0b3312
GH
575Sat Jun 14 19:00:58 1997 Gary Houston <ghouston@actrix.gen.nz>
576
577 * scmsigs.c (sys_deliver_signals): add a comment about a probable bug.
578
3688473b
JB
579Wed Jun 11 00:33:00 1997 Jim Blandy <jimb@floss.red-bean.com>
580
581 * Makefile.in: Regenerated after xtra_PLUGIN_guile_libs change in
582 ../configure.in.
583
58932e4a
MV
584Sun Jun 8 14:37:26 1997 Marius Vollmer <mvo@zagadka.ping.de>
585
586 * eval.c (scm_lookupcar1): New procedure to cope with a race
587 condition during lookup (when using threads).
588 (scm_lookupcar): Implement in terms of scm_lookupcar1.
589 (SCM_CEVAL): Use scm_lookupcar1 instead of scm_lookupcar in one
590 place.
591
95d59d10
JB
592Fri Jun 6 19:05:07 1997 Jim Blandy <jimb@totoro.cyclic.com>
593
594 * regex-posix.c (scm_regexp_exec): Use the `start' argument if
595 supplied. (Change from Tim Pierce.)
596
0b46857f
MV
597Thu Jun 5 16:38:19 1997 Marius Vollmer <mvo@zagadka.ping.de>
598
599 * struct.c (init_struct): Forget to mention this in the "Wed Jun 4
600 23:47:01 1997" changelog: Slots are now initialized with `#f' by
601 default and not `()'. `#f' is the canonical non-value in Scheme,
602 right?
603
5dade857
MV
604Wed Jun 4 23:47:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
605
606 * struct.c (struct_printer): New variable that holds a handle on
607 the Scheme variable *struct-printer*. This variable can be set by
608 Scheme code to override the printing of structures.
609 (scm_print_struct): If struct_printer is set, call it. If it is
610 not set, or returns #f, print the structure in the old fashion.
611 Include "eval.h" for scm_apply.
612
7507aba1
MV
613Tue Jun 3 23:01:39 1997 Marius Vollmer <mvo@zagadka.ping.de>
614
615 * struct.c (scm_struct_ref, scm_struct_set_x): Use
616 scm_struct_i_n_words to get the number of fields, not
617 -scm_struct_n_extra_words.
618
619 On the route to fancier struct printing:
620 * struct.c (scm_print_struct): New function to print a structure.
621 Include "genio.h" to support it. This function doesn't do
622 anything interesting right now, but I think it should be here
623 anyway.
624 * struct.h: Include "print.h" and add prototype for
625 scm_print_struct.
626 * print.c (scm_iprin1): Call scm_print_struct instead of trying to
627 print structures ourself.
628
2ad6b1a5
GH
629Sun Jun 1 07:58:41 1997 Gary Houston <ghouston@actrix.gen.nz>
630
631 * scmsigs.c (sys_deliver_signals): bug fix: reset got_signal[i]
632 before applying the handler in case it doesn't return.
633
e1a191a8
GH
634Sat May 31 18:57:51 1997 Gary Houston <ghouston@actrix.gen.nz>
635
636 * scmsigs.h, async.h: updated.
637
638 * _scm.h: if HAVE_RESTARTS is defined then don't use a SYSCALL
639 loop.
640
641 * posix.c (scm_uname): interpret only negative values as an error.
642 Solaris normally returns a positive value.
643
644 * script.c (scm_compile_shell_switches): if we are not going into
645 an interactive repl, set scm_mask_ints to zero so that asyncs can
646 run.
647
648 * simpos.c (scm_system): don't ignore/unignore signals around
649 the "system" call.
650
651 * posix.c (scm_open_pipe): don't ignore/unignore signals around
652 the "popen" call.
653
654 * init.c (scm_boot_guile_1): don't call scm_init_signals, it's
655 done in boot-9.scm instead.
656
657 * scmsigs.c, async.c: Major rewriting of signal handling code.
658 (scm_sigaction): new procedure.
659 (scm_sleep): don't wrap sleep in SCM_SYSCALL, it would mess up the
660 timing.
661 (scm_raise): return unspecified, throw error on failure.
662
0e165281
JB
663Thu May 29 02:47:36 1997 Jim Blandy <jimb@floss.cyclic.com>
664
665 * regex-posix.c (scm_init_regex_posix): Register the "regex"
666 feature, to help boot-9.scm decide whether to import the regex
667 module.
668
4885ba0e 669Thu May 29 02:19:40 1997 Jim Blandy <jimb@floss.cyclic.com>
1e5afba0 670
4885ba0e
JB
671 * eval.c: Include scmconfig.h at the beginning of the file so that
672 HAVE_ALLOCA_H may properly be defined. Thanks to Bill Janssen for
673 pointing this out.
1e5afba0
JB
674
675 * regex-posix.c: #include "_scm.h" before conditionally #including
676 <regex.h>; the former defines HAVE_REGCOMP.
677
4885ba0e
JB
678 * regex-posix.c: #include <regex.h> conditionally, so the file is
679 CPP'able (for dependency scanning) even on systems that don't have
680 a <regex.h> header.
681
5aefdd40
JB
682Tue May 27 23:48:38 1997 Jim Blandy <jimb@floss.cyclic.com>
683
684 Add new R4RS-compliant syntax for keywords.
685 * read.c (scm_lreadr): Recognize `#:' as a prefix for keywords,
686 regardless of the setting of the `keywords' read option.
687 * kw.c (prin_kw): Print keywords using the `#:' syntax, so they
688 can be re-read no matter what the setting of the `keywords' read
689 option.
690
737c9113
JB
691Tue May 27 22:47:31 1997 Tim Pierce <twp@twp.tezcat.com>
692
693 Add support for POSIX regular expressions.
694
695 * regex-posix.c, regex-posix.h: New files. (Some code
696 is taken liberally from rx/rgx.c in the old Guile dist.)
697
698 * init.c: Include regex-posix.h.
699 (scm_boot_guile_1): Call scm_init_regex_posix.
700
701 * Makefile.am (EXTRA_libguile_la_SOURCES, modinclude_HEADERS):
702 Add regex-posix.[ch] sources.
703 * Makefile.in: Regenerated.
704
705 * scmconfig.h.in: Add HAVE_REGCOMP macro. (automake is supposed
706 to do this automatically? It didn't for me, bleh.)
707
06de7963
JB
708Mon May 26 18:51:29 1997 Jim Blandy <jimb@floss.cyclic.com>
709
33623b5e
JB
710 * fports.c (print_pipe_port): New function.
711 (scm_fptob): Use print_pipe_port instead of scm_prinport; the
712 latter doesn't even take the right arguments.
713
714 * Makefile.am: Increment shared lib revision number. I think
715 sometimes the uninstalled Guile finds the installed shared lib;
716 Gord says doing this might help. As things turned out, I can't
717 say whether it does.
718 * Makefile.in: Regenerated.
719
06de7963
JB
720 * gh_init.c (gh_enter): Cast c_main_prog to a void * before
721 passing it as the closure argument to scm_boot_guile. (Bill
722 Janssen)
723
724 * ports.c (print_void_port, putc_void_port, puts_void_port,
725 write_void_port, flush_void_port, getc_void_port, close_void_port,
726 noop0): Use ANSI prototypes instead of K&R declarations, so the
727 initialization of void_port_ptob gets aggressively type-checked.
728 Fix arguments of print_void_port and write_void_port. (Bill
729 Janssen)
82892bed
JB
730
731 * COPYING, __scm.h, _scm.h, alist.c, alist.h, append.c, append.h,
732 appinit.c, arbiters.c, arbiters.h, async.c, async.h, backtrace.c,
733 backtrace.h, boolean.c, boolean.h, chars.c, chars.h,
734 continuations.c, continuations.h, coop-defs.h, coop-threads.c,
735 coop-threads.c.cygnus, coop-threads.h, coop-threads.h.cygnus,
736 coop.c, debug.c, debug.h, dynl-dl.c, dynl-dld.c, dynl-shl.c,
737 dynl-vms.c, dynl.c, dynl.h, dynwind.c, dynwind.h, eq.c, eq.h,
738 error.c, error.h, eval.c, eval.h, extchrs.h, feature.c, feature.h,
739 filesys.c, filesys.h, fports.c, fports.h, fsu-pthreads.h, gc.c,
740 gc.h, gdbint.c, gdbint.h, genio.c, genio.h, gh.h, gh_data.c,
741 gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c, gh_list.c,
742 gh_predicates.c, gh_test_c.c, gh_test_repl.c, gscm.c, gscm.h,
743 gsubr.c, gsubr.h, guile.c, hash.c, hash.h, hashtab.c, hashtab.h,
744 init.c, init.h, ioext.c, ioext.h, kw.c, kw.h, libguile.h, list.c,
745 list.h, load.c, load.h, mallocs.c, mallocs.h, markers.c,
746 markers.h, mbstrings.c, mbstrings.h, mit-pthreads.c,
747 mit-pthreads.h, net_db.c, net_db.h, numbers.c, numbers.h,
748 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
749 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
750 procprop.h, procs.c, procs.h, putenv.c, ramap.c, ramap.h, read.c,
751 read.h, root.c, root.h, scmhob.h, scmsigs.c, scmsigs.h, script.c,
752 script.h, sequences.c, sequences.h, simpos.c, simpos.h, smob.c,
753 smob.h, snarf.h, socket.c, socket.h, srcprop.c, srcprop.h,
754 stackchk.c, stackchk.h, stacks.c, stacks.h, stime.c, stime.h,
755 strings.c, strings.h, strop.c, strop.h, strorder.c, strorder.h,
756 strports.c, strports.h, struct.c, struct.h, symbols.c, symbols.h,
757 tag.c, tag.h, tags.h, threads.c, threads.h, throw.c, throw.h,
758 unif.c, unif.h, variable.c, variable.h, vectors.c, vectors.h,
759 version.c, version.h, vports.c, vports.h, weaks.c, weaks.h: New
760 address for FSF.
761
3f4c654d
JB
762Mon May 26 12:37:30 1997 Jim Blandy <jimb@floss.cyclic.com>
763
764 * script.c (scm_find_executable): Use prototype-style definition
765 here; apparently it's not quite right to have const in a prototype
766 and then use a K&R declaration. I wonder if stuff like this will
767 go away if we compile with -Wrequire-prototypes, or whatever that
a00c28cd 768 is... (Bernard URBAN)
3f4c654d
JB
769
770 * scmhob.h: New text from Bernard URBAN.
771
772Sat May 17 17:14:36 1997 Jim Blandy <jimb@floss.cyclic.com>
773
774 * script.c: Don't #define const on hpux. Configure takes care of
775 this. (Thanks to Larry Schwimmer.)
776
777 * script.c: Use the HAVE_UNISTD_H symbol provided by autoconf to
778 decide whether to #include <unistd.h>, instead of listing a bunch
779 of systems. Don't #include stdio twice. Removed dyked-out
780 definition of scm_find_impl_file.
781
eeb56f3c
JB
782Fri May 16 03:06:08 1997 Jim Blandy <jimb@floss.cyclic.com>
783
adb98aa9
JB
784 * Makefile.am (libguile_la_LDFLAGS): Update libguile's shared
785 library version info to 1:0.
786 * Makefile.in: Regenerated.
787
142ad3d9
JB
788 * backtrace.c, backtrace.h, debug.c, debug.h, eq.c,
789 gdb_interface.h, gdbint.c, gdbint.h, gh_data.c, gh_init.c,
790 gh_io.c, gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c,
791 init.c, net_db.c, options.c, options.h, ports.c, print.c, read.c,
792 script.h, snarf.h, srcprop.c, srcprop.h, stacks.c, stacks.h,
793 throw.c: Update copyright years; these files have been worked on
794 significantly in 1997, but only had copyright years for 1996.
795 Also, change name of copyright holder on some from Mikael
796 Djurfeldt to Free Software Foundation; he has signed papers
797 assigning the changes to the FSF.
798
eeb56f3c
JB
799 * script.c (scm_shell_usage): Pass FATAL to exit. There's no
800 reason not to give the user the option.
190b072d
JB
801
802 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
803 Return #f on end-of-file when scanning table (i.e. when called
804 with no arguments). Try to catch errors, when we can.
095936d2
JB
805 * posix.c (scm_getgrgid, scm_getpwuid): Same.
806
807 * script.h (scm_shell_usage, scm_compile_shell_switches): New
190b072d
JB
808 external declarations. These are useful.
809
a48a89bc
GH
810Thu May 15 05:21:36 1997 Gary Houston <ghouston@actrix.gen.nz>
811
812 * posix.c: don't include <sys/select.h> or define macros for
813 select, since they were not used in this file.
814
095936d2 815 * filesys.c (scm_select): make the fifth parameter microseconds,
a48a89bc
GH
816 not milliseconds. let the fourth parameter be either a real value
817 or an integer or #f. The first, second and third arguments can
818 now be vectors: the type of the corresponding return set will be
819 the same.
820 (set_element, get_element): new static procedures.
821
f3b1485f
JB
822Wed May 14 12:18:12 1997 Jim Blandy <jimb@floss.cyclic.com>
823
223be5f0
JB
824 * strports.c (scm_eval_string): New function.
825 (scm_eval_0str): Trivially re-implemented in terms of
826 scm_eval_string.
827 * strports.h (scm_eval_string): New extern decl.
828
e1cd56f9
JB
829 * net_db.c (h_errno): Add extern decl for this.
830
f3b1485f
JB
831 * fports.c (local_pclose): New function.
832 (scm_pipob): Use it in the initializer here.
833
834 From Tim Pierce:
835 * net_db.c (scm_gethost, scm_getproto, scm_getnet, scm_getserv):
836 Use a meaningful error message when signalling an error. For
837 this, scm_gethost must check h_errno rather than errno.
838
9b01064c
JB
839Tue May 13 16:40:06 1997 Jim Blandy <jimb@floss.cyclic.com>
840
841 * Makefile.in: Regenerated, using automake-1.1p.
842
08fea088
GH
843Tue May 13 04:34:52 1997 Gary Houston <ghouston@actrix.gen.nz>
844
0267051b
GH
845 * socket.c (scm_addr_vector): use SCM_UNDEFINED in scm_listify,
846 not SCM_UNSPECIFIED.
847
08fea088
GH
848 * script.c (scm_compile_shell_switches): don't append (quit) if
849 interactive.
850 (scm_shell): call scm_exit_status and exit on the result of the
851 evaluation.
852
821eb64e
JB
853Mon May 12 17:23:58 1997 Jim Blandy <jimb@floss.cyclic.com>
854
855 Ensure that shared substrings are handled properly when passed to
856 a system call or other foreign function. Many thanks to Tim
857 Pierce!
858 * symbols.h (SCM_COERCE_SUBSTR): new macro.
859 * filesys.c (scm_chmod, scm_rename, scm_delete_file, scm_mkdir,
860 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
861 scm_lstat), ports.c (scm_sys_make_void_port), posix.c (scm_utime,
862 scm_putenv, scm_setlocale, scm_mknod), stime.c (setzone,
863 scm_strftime), vports.c (scm_make_soft_port), backtrace.c
864 (scm_display_error_message): use RO macros when strings may be RO.
865 * error.c (scm_error_scm), filesys.c (scm_chown, scm_chmod,
866 scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir,
867 scm_chdir, scm_symlink, scm_readlink, scm_lstat), ioext.c
868 (scm_freopen, scm_duplicate_port, scm_fdopen), net_db.c
869 (scm_gethost, scm_getnet, scm_getproto, scm_getserv), ports.c
870 (scm_sys_make_void_port), posix.c (scm_getgrgid, scm_utime,
871 scm_setlocale, scm_mknod), stime.c (setzone, scm_strptime,
872 scm_strftime), vports.c (scm_make_soft_port): use
873 SCM_COERCE_SUBSTR to make sure shared substrings are
874 null-terminated.
875
876Mon May 12 15:33:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
877
878 * error.c (scm_error): Add newline to error message.
879
880 * init.c (scm_init_standard_ports): Doc fix.
881
8e6f33db
MV
882Thu May 8 14:38:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
883
884 * dynl-shl.c: Completely replaced with new code from Bernard
885 URBAN.
886
887 * script.c (scm_ice_9_already_loaded): New variable.
888 (scm_compile_shell_switches): Use it.
889
4edc089c
GH
890Mon May 5 20:35:08 1997 Gary Houston <ghouston@actrix.gen.nz>
891
892 * filesys.c (scm_input_waiting_p): add missing third argument to
893 scm_misc_error.
894
895 * stime.c (scm_localtime): copy the result of localtime before
896 calling gmtime in case they share a buffer.
897 (scm_localtime, scm_mktime): throw an error if neither HAVE_TM_ZONE
898 nor HAVE_TZNAME.
899
554878da
GH
900Fri May 2 19:07:11 1997 Gary Houston <ghouston@actrix.gen.nz>
901
902 * eq.c (scm_equal_p): use SCM_TYP7SD (y) not SCM_TYP7SD (x).
4edc089c 903
914155ca
JB
904Thu May 1 17:01:45 1997 Jim Blandy <jimb@floss.cyclic.com>
905
906 * Makefile.am (check-local): New target, which causes 'make check'
907 to run gh_test_c and gh_test_repl, with some trivial input.
908 * Makefile.in: Rgnrtd.
909
6fa9bcd0
MV
910Tue Apr 29 19:00:40 1997 Marius Vollmer <mvo@zagadka.ping.de>
911
912 * dynl.c (print_dynl_obj): Indicate whether the dynamic object has
913 been unlinked.
914
9ea54cc6
GH
915Mon Apr 28 06:10:14 1997 Gary Houston <ghouston@actrix.gen.nz>
916
917 * async.c (scm_sys_tick_async_thunk): commented out. I'm not
918 sure how this was supposed to work.
919 (scm_async_click): don't send SCM_TICK_SIGNAL.
920 (scm_init_async): don't initialize %tick-thunk.
921
922 * the following change doesn't affect the Scheme interface:
923 gc-thunk is called at the end of garbage collection. however it's
924 no longer implemented by pretending it's a signal.
925
926 * gc.c (scm_gc_end): don't call scm_take_signal. instead mark the
927 system async corresponding to scm_gc_thunk.
928 * async.h: declare scm_gc_async.
929 * async.c (scm_sys_gc_async_thunk): apply the thunk named by
930 gc-thunk directly, instead of going through a signal handler.
931 (scm_gc_async): new variable, points to the GC system-async.
932 (scm_init_async): save the GC async as scm_gc_async instead
933 of using system_signal_asyncs.
934 (scm_gc_vcell): new variable, stores the gc-thunk vcell.
935
10830232
JB
936Mon Apr 28 19:14:44 1997 Jim Blandy <jimb@floss.cyclic.com>
937
938 * Makefile.am (libpath.h, cpp_err_symbols.c, cpp_sig_symbols.c):
939 Don't screw up if we're interrupted.
940 * Makefile.in: Regeneradet.
941
28c682fa
JB
942Sun Apr 27 17:57:15 1997 Jim Blandy <jimb@floss.cyclic.com>
943
944 * aclocal.m4: Removed; unnecessary, given changes of Apr 24.
945
946 * Makefile.am (modincludedir): Use "ice-9" instead of "@module@";
947 we're not using AM_INIT_GUILE_MODULE any more.
948 * Makefile.in: Reneregated.
949
20108301
JB
950Thu Apr 24 00:41:08 1997 Jim Blandy <jimb@floss.cyclic.com>
951
4616e355 952