*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 1999-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2
3 * pairs.c (scm_set_car_x, scm_set_cdr_x): Return SCM_UNSPECIFIED.
4
5 1999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6
7 * print.c (scm_isymnames): Added #@dispatch and #@hash-dispatch.
8
9 * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):
10 Place the table argument last.
11
12 1999-03-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
13
14 * modules.c: #include "procprop.h"
15 (scm_system_module_env_p): Assume root environment is no lookup
16 closure is found.
17
18 * debug.c, eval.c, evalext.c, gdbint.c stacks.c:
19 #include "modules.h".
20
21 * modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
22 scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
23
24 * eval.c, eval.h (scm_top_level_lookup_closure): Removed.
25
26 1999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
27
28 * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to
29 scm_misc_error when pos is a string. This allows for dispatching
30 arbitrary error messages with one argument via SCM_ASSERT:
31 SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
32
33 1999-03-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
34
35 * list.c (scm_reverse): Report an error if given a circular list
36 instead of filling memory.
37 * list.c (scm_reverse_x): Check args.
38
39 1999-03-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
40
41 Most of this batch of changes is about how to deal with extended
42 types when an object system is loaded into Guile. A nice object
43 system is capable of representing Guile's types as class objects.
44
45 For example, we want a regular expression to be of class <regex>.
46 But regular expressions are smobs which aren't under direct
47 control of the object system, so there has to be some mechanism
48 which informs the object system that a new class should be created
49 which can represent the smob type. I call this a "wrapper class".
50
51 * objects.c: #include "smob.h";
52 (scm_class_keyword): Removed. (Class is automatically created by
53 make_smob_classes.)
54 (scm_smob_class): Array of smob classes indexed by smobnum.
55 (scm_make_extended_class): "Plugin" function pointer for creation
56 of wrapper classes for smob and struct types.
57 (scm_class_of): Handle compiled closures. (Currently regarded as
58 <procedure>.);
59 Use scm_smob_class to handle smob types;
60 Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
61 through scm_smob_class;
62 Handle structs.
63
64 * smob.c (scm_newsmob): Also create a wrapper class if
65 scm_smob_class has been initialized.
66
67 * smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
68 type code and smobnum.
69
70 * struct.c: #include "alist.h", "weaks.h", "hashtab.h";
71 (scm_struct_table): Weak key table with auxilliary information for
72 struct types. Currently used for names and wrapper classes.
73 (scm_struct_ihashq): Hash function for structs.
74 (scm_struct_create_handle): Get/create entry in scm_struct_table.
75 (scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures
76 for accessing names of vtables. The record implementation in
77 boot-9.scm currently uses the setter to record the name of record
78 types. When the object system is initialized, it can use this
79 information to create wrapper classes with suitable names.
80 (scm_init_struct): Allocate scm_struct_table.
81 (scm_alloc_struct): Don't initialize scm_struct_i_tag here.
82 (struct tags are a finite resource and we might want to restrict
83 the use of tags to vtables only. E.g., Goops only uses tags for
84 classes.)
85 (scm_make_struct): Use scm_struct_entity_n_extra_words instead of
86 magic number 5.
87 (scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic
88 number -1.
89
90 * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME,
91 SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros.
92 Used for access of struct table entries.
93
94 * hashtab.c, hashtab.h (scm_internal_hash_fold): New function.
95 (scm_hash_fold): New procedure. Used to process all entries in a
96 hash table (in no particular order).
97
98 Argh! For the umpteenth time I got compilation errors because of
99 the "intuitive" name `kw'. This has to have an end:
100
101 * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
102 "kw" --> "keywords" everywhere.
103 (I doubt that this will cause big compatibility problems since the
104 application interface is unaffected.)
105
106 * keywords.c, keywords.h: Files renamed from kw.c, kw.h.
107
108 1999-03-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
109
110 * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and
111 column inums to native form.
112
113 Improvement of backtraces: Introduces a new stack narrowing
114 specifier, #t, for the inner cut. (See further in the comments in
115 stacks.c:narrow_stack ().)
116
117 * procprop.c, procprop.h (scm_sym_system_procedure): New symbol.
118 (Used to flag certain system procedures which shouldn't turn up in
119 backtraces.)
120
121 * eval.c (scm_sym_system_module): New symbol. (Used to flag
122 modules which aren't "user" modules and the code of which
123 shouldn't turn up in backtraces.)
124
125 * eval.c, eval.h (scm_top_level_lookup_closure): New function:
126 Extract the lookup closure from an environment.
127 (scm_system_module_env_p): New function: Return non-#f if MODULE
128 is a system module.
129
130 * stacks.c: #include "eval.h"; #include "procprop.h";
131 (narrow_stack): Handle new narrowing specifier #t.
132
133 * debug.c (scm_procedure_name): Use name property in the default
134 case.
135
136 * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr ().
137
138 * objects.h (scm_si_redefined, scm_si_hashsets): Shifted.
139
140 * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
141 procedure throughout.
142
143 * print.c (scm_iprin1): Removed extraneous space when printing
144 procedure-with-setters.
145
146 Entity and operator setter slots were introduced as a complement
147 to the <procedure-with-setter> type in order to support entities
148 and operators with setters in a reasonable and efficient way.
149 * procs.c (scm_procedure, scm_setter): Handle entity and operator
150 setter slots.
151
152 * objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros.
153 (struct scm_metaclass_operator): New setter slot.
154
155 * gc.c (scm_gc_mark): Mark struct setter slot.
156
157 * struct.c (scm_make_struct): Allocate one word more for
158 entities and initialize the new slot.
159
160 * struct.h (scm_struct_i_setter): New constant.
161
162 1999-03-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
163
164 * objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots
165 directly through the instance.
166
167 * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.
168
169 * gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at
170 scm_struct_i_flags instead of scm_vtable_index_layout!
171
172 * list.c (scm_list_star): New procedure.
173
174 1999-02-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
175
176 * debug.c (scm_init_debug): Added scheme level constant
177 SCM_IM_DISPATCH.
178
179 1999-02-12 Jim Blandy <jimb@savonarola.red-bean.com>
180
181 * __scm.h (SCM_FENCE): Fix `asm volatile' warnings for EGCS.
182
183 * gc.c (scm_gc_sweep): Properly properly record the size of a
184 freed structure. (Thanks to Greg Harvey.)
185
186 1999-02-07 Jim Blandy <jimb@savonarola.red-bean.com>
187
188 * gc.c (scm_gc_sweep): Properly record the size of a freed
189 structure. (Thanks to Michael Livshin.)
190
191 1999-02-06 Jim Blandy <jimb@savonarola.red-bean.com>
192
193 Readline paren matching from Greg Harvey, with modifications from
194 Mikael Djurfeldt:
195
196 * readline.c (in_readline, reentry_barrier_mutex): Make these
197 static.
198
199 * readline.c: #include <sys/time.h> and "iselect.h", so we can
200 control how long we're paused, and threads will run while we're
201 paused.
202 (match_paren, find_matching_paren, init_bouncing_parens): New
203 functions.
204 (scm_init_readline): Call init_bouncing_parens.
205 (scm_readline_opts): Add the bounce-parens option.
206 * readline.h (SCM_READLINE_BOUNCE_PARENS): New readline option.
207 (SCM_N_READLINE_OPTIONS): Adjust.
208
209 1999-02-06 Jim Blandy <jimb@zwingli.cygnus.com>
210
211 All the below are changes from Ken Raeburn, to get Guile to use
212 const where it can.
213
214 * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),
215 eval.c (s_expression, s_test, s_body, s_bindings, s_variable,
216 s_clauses, s_formals): Variables now const.
217
218 * eval.c (promsmob): Now const.
219 * macros.c (macrosmob): Now const.
220 * smob.c (scm_newsmob): Smobfuns argument now points to const.
221 (freecell, flob, bigob): Now const.
222
223 * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring),
224 error.c (scm_error, scm_syserror, scm_syserror_msg,
225 scm_num_overflow, scm_out_of_range, scm_wrong_type_arg,
226 scm_memory_error, scm_misc_error, scm_wta), macros.c
227 (scm_make_synt), feature.c (scm_add_feature), filesys.c
228 (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc,
229 scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr),
230 numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long,
231 scm_num2long_long, scm_num2ulong),
232 options.c (scm_options), posix.c (scm_convert_exec_args,
233 environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr),
234 ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c
235 (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c
236 (setzone, restorezone, bdtime2c), strop.c (scm_i_index),
237 strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft,
238 scm_intern_obarray, scm_intern, scm_intern0,
239 scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0,
240 scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument
241 indicating calling subr, error message text, reason for error,
242 symbol name or feature name are now pointer to const.
243 * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const.
244
245 * procs.c (scm_init_iprocs): iproc argument now points to const.
246 * pairs.c (cxrs): Now const.
247
248 * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h,
249 numbers.h, options.h, procs.h, ramap.h, read.h, smob.h,
250 strports.h, symbols.h, unif.h: Update variable declarations and
251 function prototypes for above changes.
252
253 * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link,
254 sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and
255 SYMB now point to const.
256
257 1999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
258
259 * print.c (scm_iprin1): Use scm_procedure_name instead of
260 scm_procedure_property for compiled closures.
261
262 * tags.h (scm_tc7_pws): New procedure type. Four representations
263 for procedure-with-setters were considered before selecting this
264 one:
265
266 1. A closure where the CODE and ENV slots are used to represent
267 the getter and a new SETTER slot is used for the setter. The
268 original getter is stored as a `getter' procedure property. For
269 closure getters, the CODE and ENV slots contains a copy of the
270 getter's CODE and ENV slots. For subr getters, the CODE contains
271 a call to the subr.
272
273 2. A compiled closure with a call to the getter in the cclo
274 procedure. The getter and setter are stored in slots 1 and 2.
275
276 3. An entity (i.e. a struct with an associated procedure) with a
277 call to the getter in the entity procedure and the setter stored
278 in slot 0. The original getter is stored in slot 1.
279
280 4. A new primitive procedure type supported in the evaluator. The
281 getter and setter are stored in a GETTER and SETTER slot. A call
282 to this procedure type results in a retrieval of the getter and a
283 jump back to the correct eval dispatcher.
284
285 Representation 4 was selected because of efficiency and
286 simplicity.
287
288 Rep 1 has the advantage that there is zero penalty for closure
289 getters, but primitive getters will get considerable overhead
290 because the procedure-with-getter will be a closure which calls
291 the getter.
292
293 Rep 3 has the advantage that a GOOPS accessor can be a subclass of
294 <procedure-with-setter>, but together with rep 2 it suffers from a
295 three level dispatch for non-GOOPS getters:
296
297 cclo/struct --> dispatch proc --> getter
298
299 This is because the dispatch procedure must take an extra initial
300 argument (cclo for rep 2, struct for rep 3).
301
302 Rep 4 has the single disadvantage that it uses up one tc7 type
303 code, but the plan for uniform vectors will very likely free tc7
304 codes, so this is probably no big problem. Also note that the
305 GETTER and SETTER slots can live directly on the heap, using the
306 new four-word cells.
307
308 * procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
309 SCM_SETTER): New macros.
310 (scm_procedure_with_setter_p, scm_make_procedure_with_setter,
311 scm_getter, scm_setter): New procedures.
312
313 * eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
314
315 * gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for
316 scm_tc7_pws.
317
318 * objects.c, objects.h (scm_class_of,
319 scm_class_procedure_with_setter): Added.
320
321 * procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
322 entry for scm_tc7_pws.
323
324 * procs.c (scm_procedure_p): Added case label for scm_tc7_pws.
325
326 1999-01-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
327
328 * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing
329 macro.
330 (scm_init_evalext): Call scm_make_gsubr for
331 scm_m_generalized_set_x.
332
333 * eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
334
335 * eval.h: Declare scm_s_set_x, scm_sym_set_x;
336
337 * eval.c: Renamed "set" --> "set_x" in various names for
338 consistency of name correspondence between Scheme and C;
339 Renamed scm_i_set_x --> scm_sym_set_x and made global.
340 Renamed s_set_x --> scm_s_set_x and made global.
341
342 1999-01-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
343
344 * random.c (scm_i_random_bignum): Made independent of endianness.
345
346 1999-01-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
347
348 * eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY.
349 (Thanks to Eric Hanchrow.)
350
351 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
352
353 * objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
354
355 * random.c: Bugfix: Retrieve and store most significant 32 bits in
356 different order if the machine is bigendian.
357 (scm_init_random): Added safety check for bignum digit size.
358
359 1999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
360
361 * random.c, random.h (scm_i_make_rstate): New function: Makes
362 scm_rstate from seed.
363 (scm_copy_random_state, scm_seed_to_random_state): New functions.
364 (scm_make_random_state): Removed.
365
366 * random.c (scm_make_random_state): Use scm_i_make_rstate().
367
368 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
369
370 * random.c: Bugfix: Retrieve and store most significant 32 bits in
371 different order if the machine is bigendian.
372 (scm_init_random): Added safety check for bignum digit size.
373
374 1999-01-11 Roland Orre <mdj@mdj.nada.kth.se>
375
376 * sort.c (scm_merge, scm_merge_list_x): Bugfix: Place elements
377 from first arg before equal elements in second arg in result.
378 (scm_merge_list_step): Bugfix: Don't presume that arguments in a C
379 function call are executed in a well defined order.
380
381 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
382
383 * alloca.c (alloca): Cast value returned by malloc. (Thanks to
384 Christian Lynbech.)
385
386 1999-01-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
387
388 * random.c: Removed alloca includes.
389
390 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
391
392 * Makefile.in: This changed, for some reason I don't really
393 understand, when I ran automake in the top level directory. This
394 may be contamination by Cygnus internal releases. If you re-run
395 automake and this change gets reverted, don't worry about it.
396
397 1999-01-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
398
399 * sort.c, sort.h: New files: Implement slib's and scsh's sort
400 interfaces. Author: Roland Orre.
401
402 * Makefile.am: Added sort.c, sort.h, sort.x.
403
404 * init.c: #include "sort.h";
405 (scm_boot_guile_1): Call scm_init_sort ().
406
407 * numbers.h: Added #include "libguile/print.h".
408
409 * numbers.c: Formatted according to Guile conventions;
410 Renamed s_bignum --> scm_s_bignum.
411
412 * random.c, random.h: New files: Random number support.
413 Interface same as slib's.
414
415 * Makefile.am: Added random.c, random.h, random.x.
416
417 * init.c: #include "random.h";
418 (scm_boot_guile_1): Call scm_init_random ().
419
420 1998-12-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
421
422 * Makefile.am: New files: guardians.c, guardians.x, guardians.h
423
424 * guardians.c, guardians.h (scm_make_guardian,
425 scm_guardian_gc_init, scm_guardian_zombify, scm_guard,
426 scm_get_one_zombie, scm_init_guardian): This is an implementation
427 of guardians as described in R. Kent Dybvig, Carl Bruggeman, and
428 David Eby (1993) "Guardians in a Generation-Based Garbage
429 Collector" ACM SIGPLAN Conference on Programming Language Design
430 and Implementation, June 1993 ftp://ftp.cs.indiana.edu
431 /pub/scheme-repository/doc/pubs/guardians.ps.gz
432 Author: Michael N. Livshin.
433
434 * gc.h (SCM_MARKEDP, SCM_NMARKEDP): New macros.
435
436 * gc.c (scm_igc): Call scm_guardian_gc_init and
437 scm_guardian_zombify.
438
439 * init.c (scm_boot_guile_1): Call scm_init_guardian.
440
441 1998-12-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
442
443 * macros.c (scm_makacro, scm_makmacro, scm_makmmacro): Added
444 argument checking.
445
446 1998-12-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
447
448 Move the procedure slots of entities to invisible slots (so that
449 we can have operator class objects which themselves are entities).
450 * struct.h (scm_struct_i_proc, scm_struct_i_flags,
451 SCM_STRUCTF_ENTITY): New constants.
452
453 * struct.c (scm_make_struct): Allocate "invisible" room for
454 procedures if SCM_STRUCTF_ENTITY is set in vtable.
455
456 * gc.c (scm_gc_mark): Mark entity procedures.
457
458 * struct.c, struct.h (scm_alloc_struct): Renamed from alloc_struct
459 and made global.
460 (scm_struct_init): Renamed from init_struct and made global.
461
462 * objects.h (SCM_ENTITY, scm_entity): Removed.
463 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0,
464 SCM_ENTITY_PROC_3): Adjusted for new location of procedure slots.
465
466 Mon Dec 14 18:10:12 1998 Maciej Stachowiak <mstachow@mit.edu>
467
468 * snarf.h (SCM_SYNTAX): New macro to allow convenient declaration
469 of syntactic forms, similar to SCM_PROC.
470 * debug.c, eval.c, evalext.c: use SCM_SYNTAX to declare all special
471 forms, and SCM_SYMBOL or SCM_GLOBAL_SYMBOL to delcare C variables
472 for the name symbols when needed.
473
474 1998-12-14 Jim Blandy <jimb@zwingli.cygnus.com>
475
476 * Makefile.in: Regenerated.
477
478 1998-12-05 Jim Blandy <jimb@zwingli.cygnus.com>
479
480 * pairs.h (SCM_NEWCELL): When DEBUG_FREELIST is defined, don't
481 take the address of _into; it might be a register. Just have
482 scm_debug_newcell return the new cell.
483 * gc.c (scm_debug_newcell): Just return the new cell, instead of
484 taking the address of a place to store it as an argument.
485 * gc.h (scm_debug_newcell): Change declaration.
486 (Thanks to Greg Harvey.)
487
488 1998-12-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
489
490 * ramap.c (array-copy-in-order!, array-map-in-order): New names.
491 Replaces old names serial-array-copy! and serial-array-map!.
492
493 * evalext.c (map-in-order): New name. Replaces serial-map.
494
495 1998-12-05 Jim Blandy <jimb@totoro.red-bean.com>
496
497 * smob.c (freeprint): New function.
498 (freecell): Use it to print freed objects, for slightly easier
499 debugging.
500
501 1998-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
502
503 * backtrace.c (display_frame): Made more robust. Doesn't throw an
504 error if no source properties can be found for a frame. (Thanks
505 to Christian Lynbech.)
506
507 1998-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
508
509 * objects.h: Removed slots direct_supers and direct_slots from the
510 definitions of the rudimentary classes described by objects.h.
511
512 * objects.c, objects.h (scm_entity_p): New procedure. Together
513 with the predicates scm_procedure_p and scm_struct_p, this
514 predicate makes it possible to differ between structs, entities
515 and operators.
516
517 * modules.c, modules.h (scm_resolve_module): New function.
518
519 1998-11-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
520
521 * objects.h (SCM_METACLASS_STANDARD_LAYOUT,
522 SCM_METACLASS_OPERATOR_LAYOUT): Removed slots `direct_supers' and
523 `direct_slots'.
524
525 * objects.c (scm_entity_p): New procedure.
526
527 * procprop.c (scm_i_procedure_arity): Bugfix: Return correct value
528 for asubrs, rpsubrs, lsubrs and lsubr_2s.
529
530 1998-11-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
531
532 * procprop.h (scm_i_procedure_arity): Added declaration.
533
534 * procprop.c (scm_i_procedure_arity): Made global; New code to
535 handle operators and entities.
536 (scm_procedure_property): No need to call scm_procedure_p since
537 scm_i_procedure_arity now does all necessary type checking.
538 Added #include "objects.h".
539
540 * feature.c (scm_remove_hook_x): Bugfix: Changed reference to
541 s_add_hook_x --> s_remove_hook_x.
542 (scm_add_hook_x, scm_remove_hook_x): Hooks now takes arguments.
543 Added #include "procprop.h"
544
545 * feature.c, feature.h (scm_reset_hook_x): New procedure.
546 (scm_make_hook): Optional argument defines number of arguments to
547 the hook.
548 (scm_make_named_hook): Take number of args as second arg.
549 (scm_run_hook): Renamed from scm_run_hooks (old name defined in
550 boot-9.scm for a while); First arg is the hook. The rest are
551 arguments passed on to the hook procedures.
552
553 1998-11-23 Jim Blandy <jimb@zwingli.cygnus.com>
554
555 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest,
556 scm_logbit_p): Do the computation in ulongs. This is not as nice
557 as doing it in bignums, but at least it's good enough for
558 manipulating flags in 32-bit words. (Thanks to Jim Wilson.)
559
560 * regex-posix.c (scm_regexp_exec): Reliably mark unmatched
561 subexpressions. (Thanks to Charbel Jacquin.)
562
563 1998-11-23 Mikael Djurfeldt <mdj@kenneth>
564
565 * feature.c, feature.h (scm_make_hook, scm_add_hook_x,
566 scm_remove_hook_x, scm_run_hooks): Moved from ice-9/boot-9.scm.
567 (scm_make_named_hook): New function.
568
569 * feature.c: Added #include "eval.h".
570
571 * modules.c (scm_make_module): Beautify the module.
572
573 1998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
574
575 * modules.c, modules.h: New files: C interface to modules. (This
576 is necessary in order to interface the object system to Guile
577 properly. The guts of these modules will be replaced by the new
578 module system in the future.)
579
580 * init.c: Added #include "modules.h"
581 (scm_boot_guile_1): Call scm_init_modules.
582 (invoke_main_func): Call scm_post_boot_init_modules.
583
584 * Makefile.am: Added modules.c, modules.x, modules.h.
585
586 1998-11-22 Mikael Djurfeldt <mdj@kenneth>
587
588 * procs.c: #include "objects.h"
589 (scm_procedure_p): Return #t also on structs which are operators.
590
591 * objects.c (scm_init_objects): Renamed <standard-metaclass>,
592 <operator-metaclass> and <entity-class> to <standard-class>,
593 <operator-class> and <entity> in order to conform with STKlos
594 naming conventions.
595
596 * eval.c (SCM_CEVAL): Jump to badfun if trying to apply a struct
597 which isn't an operator.
598 (SCM_APPLY): Ditto, but jump to badproc.
599
600 1998-11-21 Mikael Djurfeldt <mdj@kenneth>
601
602 * eval.c (SCM_CEVAL): Allow structs implanted in code.
603 Previously, structs implanted in code were interpreted as forms
604 the operator of which was a gloc. We solve this by checking for
605 the zero in the emulated vcell in the struct vtable. Since
606 implanted structs always will look like forms with a gloc
607 operator, execution will only be slowed down by maximally one
608 extra test-and-branch per application.
609
610 * evalext.c (scm_definedp): Removed check for isyms; Added a
611 second optional argument: It is now possible to supply an
612 evaluation environment in which to look for the symbol.
613
614 1998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
615
616 * readline.c (scm_init_readline): Set
617 rl_basic_word_break_characters. (Thanks to Ian Grant.)
618
619 * coop.c (coop_condition_variable_wait): Removed
620 (coop_condition_variable_wait_mutex): Folded logic of
621 coop_mutex_unlock into coop_condition_variable_wait_mutex to
622 prevent condvar signal lossage. Previously, another thread could
623 start to run after unlocking the mutex but before putting the
624 current thread on the wait queue. If that thread then would
625 signal the first, the signal would be lost. (Thanks to Christian
626 Lynbech.)
627
628 1998-11-17 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
629
630 * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to
631 Christian Lynbech.)
632
633 1998-11-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
634
635 * objects.c (scm_i_make_class_object): Renamed from
636 make_class_object; exported; error checking moved to
637 scm_make_class_object and scm_make_subclass_object.
638 (scm_make_class_object, scm_make_subclass_object): Use
639 scm_i_make_class_object.
640 (scm_make_subclass_object): Let the subclass have same metaclass
641 as the superclass.
642
643 1998-11-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
644
645 * debug.c (scm_debug_options): Bugfix: Set the value of
646 scm_stack_checking_enabled_p after setting debug options;
647 #include "stackchk.h". (Thanks to Richard Polton.)
648
649 1998-11-13 Radey Shouman <rshouman@metro2000.com>
650
651 * unif.c (scm_array_contents): removed unnecessary test for 0
652 base.
653
654 1998-11-13 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
655
656 * evalext.c, evalext.h (scm_m_sequence_to_list): Removed.
657 Replaced by macro `collect' in boot-9.scm.
658
659 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
660
661 * eval.c (scm_copy_tree): Copy source properties if existent.
662
663 * debug.c (scm_start_stack): Copy source when evaluating. (If we
664 don't, we may end up passing memoized source to a transformer.)
665
666 1998-11-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
667
668 * stack.c (get_applybody): Help function which lookups the first
669 body form of the apply closure.
670 (read_frames): Prevent the source of the first form of the apply
671 closure from being recorded. This would only be confusing.
672
673 * debug.h (SCM_SET_MACROEXP, SCM_CLEAR_MACROEXP, SCM_MACROEXPP):
674 Replaces SCM_MACROFRAME, SCM_MACROFRAMEP.
675
676 * eval.c (SCM_CEVAL): Use SCM_SET/CLEAR_MACROEXP.
677
678 * stacks.c (read_frame): Bugfix: Removed lingering `else'
679 statement.
680 (read_frames): Use SCM_MACROEXPP.
681
682 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
683
684 * stacks.c (read_frames): Skip gsubr frames in backtraces. (They
685 don't contain interesting information since all arguments are
686 present in the frame which applies the compiled closure anyway.);
687 Skip the transformer application frames.
688
689 * print.c (scm_iprin1): Print gsubrs as primitives.
690
691 1998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
692
693 * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type.
694
695 * eval.c (SCM_CEVAL): Mark macro frames at `handle_a_macro' so
696 that we can identify these in a backtrace. (This change doesn't
697 introduce any significant speed penalty.)
698
699 * eval.c: Added note about `serial-map' using scm_map.
700
701 * read.c, read.h (scm_read_options, scm_read_opts): Removed
702 readline options. They should reside in their own options array.
703
704 * readline.c, readline.h (scm_readline_options,
705 scm_readline_opts): Moved readline options here.
706
707 1998-11-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
708
709 * readline.c (scm_read_history, scm_write_history): Bugfix: Use
710 SCM_ROCHARS instead of SCM_CHARS.
711
712 * ports.c (scm_unread_string): Bugfixes: Check for SCM_STRINGP,
713 not SCM_ROSTRINGP; use SCM_ROUCHARS instead of SCM_UCHARS.
714
715 1998-11-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
716
717 * ports.h (SCM_CUC): #define as ~SCM_CRDY instead of 0x001fffffL.
718 This is quite important since the latter clears the
719 FPORT_READ_SAFE and FPORT_WRITE_SAFE flags causing flushes at
720 every single character read...
721
722 1998-11-03 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
723
724 * print.c (scm_iprin1): Removed suspect looking (and indeed
725 malevolent) semicolon after test for user supplied closure print
726 procedure. (Thanks to Telford Tendys.)
727
728 * list.c (scm_sloppy_memq): Removed sloppy_mem_check.
729 (scm_memq, scm_memv, scm_member): Do argument checking *before*
730 starting to search the list. Removed call to sloppy_mem_check.
731
732 * list.c, list.h (scm_delq1_x, scm_delv1_x, scm_delete1_x): New
733 procedures: Same as scm_delq_x et al, but delete maximally one
734 element.
735
736 * options.c (scm_options, scm_init_options): GC-protect option
737 values of type SCM. (Thanks to Telford Tendys.)
738
739 1998-11-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
740
741 * eval.c: Don't #define scm_lookupcar to scm_lookupcar1. Instead
742 make sure that there always is a "real" scm_lookupcar.
743
744 1998-11-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
745
746 * read.c, read.h (scm_read_opts): New read options
747 "history-length" and "history-file".
748 (scm_read_options): Stifle history to history length.
749
750 * readline.c (scm_read_history, scm_write_history): New procedures.
751
752 1998-10-31 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
753
754 * eval.h (scm_macro_eval_x): Removed declaration.
755
756 * eval.c (scm_s_expression, scm_s_test, scm_s_body,
757 scm_s_bindings, scm_s_variable, scm_s_clauses, scm_s_formals):
758 Renamed and made global.
759
760 * eval.c, eval.h (SCM_EVALIM): Renamed from EVALIM.
761 (SCM_XEVAL, SCM_XEVALCAR): Renamed from XEVAL, XEVALCAR.
762
763 * evalext.c, evalext.h: New files. Contain non-R5RS things
764 having to do with evaluation.
765
766 * evalext.c (scm_serial_map): New procedure: Version of `map'
767 which guarantees that the procedure is applied to the lists in
768 serial order.
769 (scm_m_sequence_to_list): New syntax: Version of `begin' which
770 returns a list of the results of the body forms instead of the
771 result of the last body form.
772 (scm_definedp, scm_m_undefine): Moved from eval.c
773
774 * evalext.h (scm_m_sequence_to_list): Added declaration.
775
776 * macros.c, macros.h: New files.
777 (scm_procedure_to_syntax, scm_procedure_to_macro,
778 scm_procedure_to_memoizing_macro, scm_macro_p, scm_macro_type,
779 scm_macro_name, scm_macro_transformer): Moved from eval.c
780 (scm_make_synt): Moved from eval.c
781
782 * procs.c, procs.h (scm_procedure_documentation): Moved from eval.c.
783
784 * init.c (scm_boot_guile_1): Added calls to scm_init_macros and
785 scm_init_evalext.
786
787 * Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h.
788
789 * debug.c, print.c: Added #include "macros.h".
790
791 1998-10-29 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
792
793 This change adds the ability to use `unread-char' multiple times
794 without interspersed reads and adds the new procedure
795 `unread-string'. The change is optimized for the common case of
796 unreading a single character. This is also the reason behind the
797 choice to store characters in the port itself: in most cases no
798 extra malloc is required.
799
800 The amount of code in some macros in ports.h has been increased to
801 the extent that they would fit better as C functions, but, since
802 this code belongs to the port representation, such functions
803 should be placed in ports.c which would cause calls back and forth
804 between ports.c and genio.c. That is not good for performance.
805 Also, keeping them as macros allows the compiler to do some
806 optimizations which are needed to make the current interface
807 (SCM_CRDYP, SCM_CGETUN, SCM_TRY_CLRDY) efficient.
808
809 One benchmark (Guile startup time) indicates an increase of
810 loading speed of 1%. Another (reading (using `read') boot-9.scm
811 10 times) shows no change in performance.
812
813 (Caveat: Since Gary is redesigning I/O anyway, no big efforts were
814 made to find a beautiful solution.)
815
816 * ports.h (SCM_CLRDY, SCM_CUNGET, SCM_CGETUN): Rewritten.
817 (SCM_TRY_CLRDY): New macro: Only clear the first unread
818 character. (SCM_CLRDY clears all.)
819 (SCM_N_READY_CHARS): New macro: Returns number of unread
820 characters in a port. Returns wrong answer if SCM_CRDYP is false.
821 (struct scm_port_table): New fields: `entry' contains port table
822 index, `cp' points to last unread char, `cbuf' is the buffer for
823 unread chars, `cbufend' points after end of the character buffer.
824
825 * ports.h, ports.c (scm_unread_string): New procedure.
826 (scm_grow_port_cbuf): New function.
827
828 * ports.c (scm_add_to_port_table, scm_remove_from_port_table):
829 Handle new fields.
830 (scm_generic_fgets), fports.c (local_fgets): Use a loop
831 to read unread characters. Use SCM_TRY_CLRDY instead of
832 SCM_CLRDY.
833
834 * ioext.c (scm_ftell): Use SCM_N_READY_CHARS to correct position.
835
836 * genio.c (scm_getc): Use SCM_TRY_CLRDY instead of SCM_CLRDY.
837
838 * genio.c, genio.h (scm_ungets): New function.
839
840 * genio.c (scm_puts): Removed mysterious TRANSCRIPT_SUPPORT code
841 sections.
842
843 1998-10-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
844
845 * threads.h (scm_thread_sleep, scm_thread_usleep): Fixed
846 declarations. (Thanks to Russ McManus.)
847
848 1998-10-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
849
850 * numbers.c (num2long): As a software archeologist, I'm proud of
851 this finding! :) Preliminary dating suggests an almost 4 year old
852 remnant from the SCM ancestor. The sample has been removed from
853 the finding site and is now safely stored in the repository.
854
855 * numbers.h: Removed prototype for num2long.
856
857 * unif.c (scm_array_set_x): Use scm_num2long instead of num2long.
858
859 * gh_data.c (gh_scm2doubles): Make it possible to pass result
860 array as second arg.
861 (gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
862 gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions.
863 * gh.h: Updated and added prototypes.
864
865 * gh_data.c (gh_ints2scm): Handle integers outside INUM limits.
866
867 1998-10-24 Jim Blandy <jimb@zwingli.cygnus.com>
868
869 * gc.h: Remove all uses of SCM_P. (Thanks to Richard Polton.)
870
871 * guile-snarf.in: Never generate an empty file. (Thanks to
872 Richard Polton.)
873
874 * gh.h (gh_enter, gh_new_procedure0_0, gh_new_procedure0_1,
875 gh_new_procedure0_2, gh_new_procedure1_0, gh_new_procedure1_1,
876 gh_new_procedure1_2, gh_new_procedure2_0, gh_new_procedure2_1,
877 gh_new_procedure2_2, gh_new_procedure3_0, gh_new_procedure4_0,
878 gh_new_procedure5_0): Specify argument types, to appease C++
879 compilers. (Thanks to Brad Bowman.)
880
881 Bug reports from Russ McManus:
882 * guile-snarf.in: If the CPP environment variable is set, use that
883 as the C preprocessor, instead of the preprocessor autoconf
884 found.
885 * snarf.h (SCM_PROC): Cast the function pointer passed to
886 scm_make_gsubr, to satisfy C++.
887
888 * gh_eval.c (gh_eval_str_with_catch, gh_eval_file_with_catch):
889 Use the handler passed, instead of ignoring it and using
890 gh_standard_handler. (Thanks to Etienne Bernard.)
891
892 1998-10-20 Jim Blandy <jimb@zwingli.cygnus.com>
893
894 * ports.h: Put text after #endif in comment. (Thanks to Nicolas
895 Neuss.)
896
897 1998-10-19 Jim Blandy <jimb@zwingli.cygnus.com>
898
899 * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
900 continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
901 dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
902 feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
903 genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
904 hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
905 list.c, list.h, load.c, load.h, mallocs.c, markers.c,
906 mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
907 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
908 procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
909 regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
910 script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
911 srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
912 strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
913 symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
914 vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
915 copyright years.
916
917 * script.c (scm_compile_shell_switches): Define
918 use-emacs-interface in the root module, so the repl code can see
919 it. See today's change to top-repl in ice-9/boot-9.scm.
920
921 * filesys.c (set_element, get_element): Make sure that `element'
922 is a cell before applying SCM_FPORTP to it. (Thanks to Jost
923 Boekemeier and Jorgen "forcer" Schaefer.)
924
925 1998-10-18 Jim Blandy <jimb@zwingli.cygnus.com>
926
927 * chars.c (scm_charnames): In ASCII character name table, make
928 newlines print as #\newline by default, not #\nl.
929
930 * Makefile.am (libguile_la_SOURCES, BUILT_SOURCES): Put these in
931 alphabetical order. Oh thrills. But it helps me know how far
932 along in the compilation I am.
933 * Makefile.in: Regenerated.
934
935 1998-10-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
936
937 * unif.c (scm_raprin1): Changed print syntax for byte vectors from
938 #bytes(...) to #y(...), and syntax for short vectors from
939 #short(...) to #h(...). This may seem nutty, but, like the other
940 uniform vectors, byte vectors and short vectors want to have the
941 same print and read syntax (and, more basic, want to have read
942 syntax!). Changing the read syntax to use multiple characters
943 after the hash sign breaks with the conventions used in R5RS and
944 the conventions used for the other uniform vectors. It also
945 introduces complexity in the current reader, both on the C and
946 Scheme levels. (The Right solution is probably to change the
947 syntax and prototypes for uniform vectors entirely.)
948
949 1998-10-17 Jim Blandy <jimb@savonarola.red-bean.com>
950
951 Don't use local_fgets on sockets; ftell doesn't work on sockets.
952 (Thanks to Jorgen "forcer" Schaefer.)
953 * ports.h (SCM_NOFTELL): New flag.
954 * fports.c (local_fgets): If it's set, use the generic fgets.
955 * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce.
956
957 1998-10-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
958
959 * script.c (scm_compile_shell_switches): Add handling of -q switch
960 (inhibit loading of user init file).
961 (scm_shell_usage): Add usage text for -q switch.
962 (scm_compile_shell_switches): Always load user init file first if
963 it is loaded at all.
964
965 1998-10-16 Jim Blandy <jimb@zwingli.cygnus.com>
966
967 * stime.c: The CPP hair to determine a value for CLKTCK is weird,
968 and is now broken under NetBSD. I can't fathom what it's trying
969 to do, so I've replaced it with something that I do understand,
970 which seems to work, and which isn't broken on NetBSD. "Progress?
971 You Decide." (Thanks to Perry Metzger.)
972
973 * regex-posix.c (scm_regexp_exec): Add a cast to remove a
974 signed/unsigned comparison.
975
976 1998-10-15 Jim Blandy <jimb@zwingli.cygnus.com>
977
978 Warning fixes from Greg Harvey:
979 * unif.c (scm_array_set_x): initializer for pos
980 * throw.c (scm_ithrow): added initializer for jmpbuf (SCM_UNDEFINED)
981 * struct.c (scm_struct_ref, scm_struct_set_x): Added
982 initializers for field_type, since EGCS so desparately wants to
983 play dumb
984 * debug.h (scm_make_gloc, scm_gloc_p, scm_make_iloc, scm_memcons,
985 scm_mem_to_proc, scm_proc_to_mem, scm_debug_hang): Added prototypes
986 when GUILE_DEBUG is defined.
987 * dynwind.h (scm_wind_chain): Same.
988 * ports.h (scm_pt_size, scm_pt_member): Same.
989 * print.h (scm_current_pstate): Same.
990 * procs.h (scm_make_cclo): Same.
991
992 1998-10-14 Jim Blandy <jimb@zwingli.cygnus.com>
993
994 Handle short and long long uniform arrays properly. (Thanks to
995 Clark McGrew.)
996 * ramap.c (scm_ra_matchp, scm_array_fill_int, scm_array_index_map_x,
997 raeql_1): Add cases for scm_tc7_svect (short vectors) and
998 scm_tc7_llvect (long long vectors).
999
1000 Change the way libguile and boot-9.scm are timestamped, to try to
1001 get rid of these spurious mismatch warnings. Now both
1002 libguile/versiondat.h and ice-9/version.scm are generated directly
1003 by the configuration process, rather than having version.scm
1004 generated directly, and libguile/versiondat.h generated by the
1005 Makefile, which is generated by configure. It seems that
1006 sometimes the Makefile would change, but versiondat.h depends on
1007 Makefile.in, not Makefile, so it wouldn't get rebuilt.
1008 * Makefile.am (versiondat.h): Target removed; this is generated
1009 directly by the configure script now.
1010 (BUILT_SOURCES): Remove versiondat.h.
1011 * versiondat.h.in: New file, transformed by the configure script
1012 into versiondat.h.
1013 * Makefile.in: Regenerated.
1014
1015 * (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c,
1016 options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS ->
1017 SCM_CAUTIOUS; this way, 1) there's only one version of each flag
1018 to define (we used to have both RECKLESS and SCM_RECKLESS), and 2)
1019 if we want to use them in a header file some day, we can. (Thanks
1020 to Michael Livshin.)
1021
1022 * stime.c (scm_get_internal_real_time): Do the arithmetic using
1023 SCM numbers, so we won't have rollover problems; the range of a
1024 signed long in milliseconds is about 25 days. (Thanks to Karl
1025 Hegbloom.)
1026
1027 Don't redefine sleep and usleep; fix this problem now.
1028 * coop.c (sleep, usleep): Remove declarations; we don't use or
1029 redefine these any more.
1030 (scm_thread_usleep, scm_thread_sleep): New functions which do the
1031 job of usleep and sleep in a thread-friendly way. We can use
1032 these in the rest of Guile. Define versions for systems both with
1033 and without iselect.
1034 * threads.h (scm_thread_usleep, scm_thread_sleep): New declarations.
1035 * scmsigs.c (usleep): Clean up oddities declaring usleep; since
1036 we're just using it, not redefining it, we can use a K&R style
1037 declaration here.
1038 (sleep): Declare this, too, if the system hasn't.
1039 (scm_sleep, scm_usleep): Use scm_thread_sleep and
1040 scm_uthread_sleep if they're available; otherwise, just call the
1041 system functions.
1042 * scmconfig.h.in: Regenerated.
1043
1044 * coop.c (scm_thread_sleep): Make `slept' an unsigned long.
1045
1046 * coop.c (coop_sleephelp): Remove ANSI #ifdef hair.
1047
1048 1998-10-12 Jim Blandy <jimb@zwingli.cygnus.com>
1049
1050 * threads.c: Doc fix.
1051
1052 The argument type of usleep varies from system to system,
1053 as does the return type. We really shouldn't be redefining usleep
1054 at all, but I don't have time to clean that up before the 1.3.
1055 release. It's on the schedule for afterwards. (Thanks to Julian
1056 Satchell.)
1057 * coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and
1058 definition.
1059 * scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype.
1060 * scmconfig.h: Regenerated.
1061
1062 * simpos.c (scm_software_type): Procedure deleted. This isn't the
1063 right way to handle system variation. Autoconf's approach is the
1064 way and the light.
1065 * simpos.h (scm_software_type): Declaration deleted.
1066
1067 * script.c (scm_find_executable): Don't test if unix is #defined
1068 here; first, NetBSD doesn't #define it, and second, it's the wrong
1069 way to go about these things. (Thanks to Perry Metzger.)
1070 (dld_find_executable): Delete this MSDOS support code. This isn't
1071 the way we want to support this; it needs to be rethunk at a
1072 larger scale.
1073
1074 * genio.c (scm_do_read_line): Don't just politely check that the
1075 line was either non-empty or EOF. Abort if it's empty and not
1076 EOF.
1077
1078 1998-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
1079
1080 * scmconfig.h.in: Regenerated.
1081
1082 * libguile.h: Don't omit the dynamic linking functions. (Thanks
1083 to Greg Badros.)
1084
1085 * genio.c (scm_do_read_line): Count lines correctly when the file
1086 doesn't end in a newline.
1087
1088 1998-10-10 Jim Blandy <jimb@zwingli.cygnus.com>
1089
1090 * genio.c (scm_do_read_line): Maintain the line count correctly.
1091 (Thanks to Harvey J. Stein and Greg Harvey.)
1092
1093 * gc.c (scm_return_first): Remove #ifdef __STDC__ garbage; Guile
1094 requires ANSI now.
1095
1096 * numbers.c (big2str): Protect t from garbage collection until
1097 we're done. (Thanks to Gary Houston.)
1098
1099 1998-10-09 Jim Blandy <jimb@zwingli.cygnus.com>
1100
1101 * Makefile.am (libguile_la_LDFLAGS): Increment shared library
1102 version number.
1103 * Makefile.in: Regenerated.
1104
1105 * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno,
1106 scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of
1107 SCM_P macro.
1108
1109 Do magic to mix reads and writes on stdio FILE-based ports.
1110 (Thanks to Christian Lynbech.)
1111 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY):
1112 New macros.
1113 (pre_read, pre_write): New functions.
1114 (local_fgetc, local_fgets, local_ffwrite, local_fputc,
1115 local_fputs): Call them.
1116 (local_fflush): Mark the port as ready for reading and writing.
1117 (scm_stdio_to_port): Set the FPORT_READ_SAFE, FPORT_WRITE_SAFE
1118 flags on new port objects. This might not be accurate --- who
1119 knows what state the FILE * is in when we get it --- but it won't
1120 do extraneous calls to fflush or fseek, so it's no worse than the
1121 behavior before this change.
1122 * ports.h: Add comment.
1123
1124 Centralize the creation of port objects based on stdio FILE * in
1125 fports.c; don't just throw them together anywhere.
1126 * fports.c (scm_stdio_to_port): Make NAME a SCM value, which is
1127 what the rest of Guile wants. Don't set the revealed count;
1128 that's only appropriate for stdin, stdout, stderr.
1129 (scm_standard_stream_to_port): This function does set the revealed
1130 count.
1131 * init.c (scm_init_standard_ports): Use scm_standard_stream_to_port,
1132 not scm_stdio_to_port.
1133 * filesys.c (scm_open): Call scm_stdio_to_port; don't write it out.
1134 * fports.c (scm_open_file): Same.
1135 * posix.c (scm_pipe): Same.
1136 * socket.c (scm_sock_fd_to_port): Same.
1137 * ioext.c (scm_fdopen): Same.
1138 (scm_freopen): Moved from here to...
1139 * fports.c (scm_freopen): ... here. This is really something that
1140 munges the internals of an fport, so it should go here.
1141 * fports.h (scm_stdio_to_port): Adjust prototype.
1142 (scm_standard_stream_to_port, scm_freopen): New protoypes.
1143 * ioext.h (scm_freopen): Prototype removed.
1144
1145 * filesys.c (set_element, get_element): This can work on both pipe
1146 and file ports, so use SCM_FPORTP to typecheck, instead of testing
1147 for scm_tc16_fport.
1148
1149 * scmconfig.h.in: Regenerated.
1150
1151 Change the definition of the functions in scm_ptobfuns so that
1152 they get passed the port object, not the port's stream.
1153 * ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
1154 * gc.c (scm_gc_sweep): Pass the port itself to the free function.
1155 * genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
1156 Pass the port itself to the scm_ptobs function.
1157 * ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
1158 scm_generic_fgets): Same.
1159 (putc_void_port, puts_void_port, write_void_port, flush_void_port,
1160 getc_void_port, fgets_void_port, close_void_port): Just change the
1161 argument names; these functions don't really do anything.
1162 * fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
1163 local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
1164 port as an argument, and use SCM_STREAM to get the stdio FILE *.
1165 Also, use prototyped definitions, and get rid of the extra
1166 declarations.
1167 (scm_fptob, scm_pipob): We don't need casts here any more.
1168 * strports.c (prinstpt): Use prototype declarations.
1169 (stputc, stwrite, stputs, stgetc): Take the port as an argument,
1170 and use SCM_STREAM to get the string info. Also, use prototyped
1171 definitions, and get rid of the extra declarations.
1172 * vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
1173 noop0): Same.
1174
1175 * ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight
1176 prototype; it's okay (preferred, even!) to use ANSI C in Guile.
1177
1178 * fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and
1179 scm_fgets, for consistency.
1180 (scm_fptop, scm_pipob): References updated.
1181
1182 1998-10-08 Jim Blandy <jimb@zwingli.cygnus.com>
1183
1184 Include the source location in error messages for scripts.
1185 * init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the
1186 stack is still there when we catch the error.
1187 * throw.c (handler_message): If we are handling an error with a
1188 message, then put together the proper arguments and call
1189 scm_display_error, instead of scm_display_error_message. That
1190 displays source location, if it can find it.
1191
1192 1998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
1193
1194 * gc.c (scm_unprotect_object): Change this so that calls to
1195 scm_protect_object and scm_unprotect_object nest properly.
1196 (scm_protect_object): Doc fixes.
1197
1198 * strings.c (scm_string_set_x): Require the argument to be a
1199 writable string, not a substring or a symbol.
1200 * strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.
1201 (Thanks to John Redford and Charbel Jacquin.)
1202
1203 * scmconfig.h.in: Regenerated; ../acconfig.h has changed.
1204
1205 1998-10-07 Jim Blandy <jimb@totoro.red-bean.com>
1206
1207 * eval.c (safe_setjmp): Remove this misunderstanding.
1208 (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to
1209 ordinary setjmp.
1210
1211 1998-10-06 Jim Blandy <jimb@zwingli.cygnus.com>
1212
1213 * libguile.h: Mark these as C declarations, for compilation by C++
1214 compilers.
1215
1216 * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef
1217 __cplusplus clause. I seriously doubt this ever worked the way
1218 the author seems to have intended.
1219
1220 1998-10-05 Jim Blandy <jimb@zwingli.cygnus.com>
1221
1222 Utterly needless cleanups to hopelessly messy code.
1223 * ports.c: Doc fixes.
1224 (scm_fflush): Moved to ...
1225 * genio.c (scm_fflush): ... here, amongst all the other port
1226 method invocation functions.
1227 * genio.h, ports.h: The prototype moves too.
1228
1229 1998-10-04 Jim Blandy <jimb@zwingli.cygnus.com>
1230
1231 * backtrace.c (display_error_body): The current frame does not
1232 always have a parent frame; consider a function called directly
1233 from the MAIN_FUNC passed to scm_boot_guile. (Thanks to Maciej
1234 Stachowiak.)
1235
1236 * alloca.c (alloca): Undo yesterday's changes, and simply call
1237 malloc directly for storage, and abort if we don't get what we
1238 want. The situation is much simpler --- just call malloc. Emacs
1239 has bizarre/evil requirements (signal handlers might malloc unless
1240 you set this global flag, so you have to set the flag around all
1241 calls to malloc) which we are certainly not going to conform to,
1242 so we can do the simple and obvious thing.
1243
1244 * coop.c (coop_condition_variable_wait): Make this function
1245 static. It's only useful internally --- you should never just
1246 wait on a condition variable.
1247 * coop-defs.h (coop_condition_variable_wait): Delete prototype.
1248
1249 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
1250
1251 * unif.c (scm_array_set_x): Accept any kind of number as an
1252 element for a uniform vector of doubles. This is more consistent
1253 with Scheme's view of numbers. (Thanks to Miroslav Silovic.)
1254
1255 * alloca.c: Use scm_must_malloc to obtain storage. Hopefully this
1256 works; I can't conveniently test it myself. (Thanks to Dvid
1257 Tillman for the bug report.)
1258
1259 * init.c: Doc fixes.
1260
1261 * init.c (invoke_main_func): Load the startup files (boot-9.scm)
1262 from here, not from scm_compile_shell_switches (which is a pretty
1263 dumb place to do it).
1264 (scm_load_startup_files): New function.
1265 (scm_ice_9_already_loaded): Variable moved to here from script.c.
1266 * script.c (scm_compile_shell_switches): Don't load the startup
1267 files here.
1268 (scm_ice_9_already_loaded): Variable moved.
1269 * init.c (scm_load_startup_files): Prototype for new function.
1270 * gh_init.c (gh_enter): Doc fix.
1271
1272 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
1273
1274 Some anti-warning changes from Greg Harvey.
1275 * gh_data.c (gh_scm2doubles): Initialize m, to avoid compiler
1276 warnings when it doesn't understand our NORETURN declarations in
1277 error.h.
1278 * posix.c (scm_mknod): Similar.
1279
1280 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
1281
1282 * posix.c (scm_getpwuid): If we can't find an entry, return our
1283 own message, instead of using scm_syserror --- the getpwMUMBLE
1284 functions don't set `errno' to anything interesting.
1285
1286 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
1287
1288 Get rid of warnings from the cooperative threading system.
1289 * threads.h (scm_single_thread_p, scm_yield,
1290 scm_call_with_new_thread, scm_join_thread, scm_make_mutex,
1291 scm_lock_mutex, scm_unlock_mutex, scm_make_condition_variable,
1292 scm_wait_condition_variable, scm_signal_condition_variable): Add
1293 prototypes for these Scheme-visible functions.
1294 * coop-defs.h (coop_next_runnable_thread,
1295 coop_wait_for_runnable_thread_now, coop_wait_for_runnable_thread):
1296 Prototypes for these here, even though they're from iselect.c.
1297 (coop_condition_variable_wait, coop_join): Add prototypes.
1298 * coop-threads.c (scm_threads_free_thread, scm_threads_free_mutex,
1299 scm_threads_free_condvar): Make these smob functions static.
1300 * coop-threads.h (coop_init): Give this a real prototype.
1301 * coop.c: #include <unistd.h>, if we have it, for `usleep' and `sleep'.
1302 (coop_next_runnable_thread): No need to provide prototype; it's in
1303 coop-defs.h.
1304
1305 * scmconfig.h.in: .detarenegeR
1306
1307 * iselect.c, threads.c: Doc fixes.
1308
1309 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
1310
1311 * Makefile.in: Regenerated with a patched automake, to get
1312 dependency generation right when using EGCS.
1313
1314 * inet_aton.c (inet_aton): Add prototype, to remove compiler
1315 warning. (Thanks to Robert Pluim.)
1316
1317 * inet_aton.c (inet_aton): Reassure the compiler that the
1318 arguments to the <ctype.h> macros are all unsigned characters, not
1319 signed characters.
1320
1321 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
1322
1323 Getting rid of more warnings...
1324 * iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see
1325 today's change to ../configure.in.
1326 * scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP.
1327 * scmconfig.h.in: Regenertaded.de.,.__
1328 * stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL.
1329 (scm_localtime, scm_mktime): Use a const char * to manipulate the
1330 time zone name.
1331
1332 * readline.c: Doc fix.
1333 (rl_cleanup_after_signal, rl_free_line_state): Make these static.
1334 * readline.h (scm_filename_completion_function): Add prototype.
1335 (scm_init_readline): Make this into a prototype.
1336
1337 * readline.c (scm_filename_completion_function): Use SCM_PROC to
1338 declare this, instead of calling scm_make_subr manually.
1339
1340 1998-10-02 Jim Blandy <jimb@savonarola.red-bean.com>
1341
1342 * readline.h (scm_init_readline): Add prototype for this.
1343 (scm_init_readline): Make this a real prototype.
1344
1345 1998-09-30 Jim Blandy <jimb@zwingli.cygnus.com>
1346
1347 Warning fixes from Maciej Stachowiak:
1348 * backtrace.h (scm_display_application, scm_backtrace): Add
1349 prototypes.
1350 * debug.c (scm_m_start_stack): Make this function static.
1351 * fluids.h (scm_fluid_p): Add prototype.
1352 * procprop.c (scm_i_procedure_arity): Make this function static.
1353 * regex-posix.c (scm_regexp_error_msg): Make this function static.
1354 * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl.
1355 * root.h (scm_dynamic_root): Add external prototype.
1356 * scmsigs.h (scm_usleep): Add external prototype.
1357 * script.h (scm_init_script): Use prototype, not K&R decl.
1358 * stacks.h (scm_stack_id): Add external prototype.
1359 * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype.
1360
1361 1998-09-30 Mark Galassi <rosalia@cygnus.com>
1362
1363 * gh.h: took out the definitions of vset and vref, since they are
1364 replaced by the proper vector routines that correspond to the R4RS
1365 procedures.
1366
1367 1998-09-29 Jim Blandy <jimb@totoro.red-bean.com>
1368
1369 * snarf.h (SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): New macros;
1370 these are analogous to SCM_VCELL and SCM_GLOBAL_VCELL but take a
1371 third argument, a C expression that should result in a SCM value,
1372 which is used to initialize the variable. Reimplemented
1373 SCM_CONST_LONG in terms of SCM_VCELL_INIT. (Thanks to Maciej
1374 Stachowiak.)
1375
1376 * version.h (scm_libguile_config_stamp): Add prototype.
1377 (From Maciej Stachowiak.)
1378
1379 1998-09-26 Jim Blandy <jimb@zwingli.cygnus.com>
1380
1381 * eval.c (scm_force): Assert that x is SCM_NIMP to fix segv when
1382 (force 9) is tried. (Thanks to Karl M. Hegbloom.)
1383
1384 1998-09-06 Jim Blandy <jimb@zwingli.cygnus.com>
1385
1386 * print.c (scm_iprin1): Rather than having one i, and using it in
1387 several places, declare a fresh i local to each block where it is
1388 used, and give it a signedness appropriate to its use in each case.
1389 (scm_iprlist): Same.
1390
1391 * print.c (scm_iprin1): Add cast to avoid unsigned/signed
1392 comparison warnings.
1393
1394 * print.c (ENTER_NESTED_DATA): Make i an unsigned long, to avoid
1395 signed/unsigned clashes.
1396
1397 * posix.h (scm_tmpnam): Added prototype.
1398
1399 * objects.h (scm_set_object_procedure_x, scm_make_class_object,
1400 scm_make_subclass_object): Add external prototypes.
1401
1402 * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned
1403 comparison is okay here.
1404
1405 * numbers.c (scm_istr2int): Add cast; len is known to be positive.
1406
1407 * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the
1408 (true, but confusing) fact that -1 == ((unsigned) 0 - 1).
1409
1410 * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing
1411 signed/unsigned.
1412
1413 * load.c (swap_port): Make this function static.
1414
1415 * load.c (scm_search_path): Make max_path_len and max_ext_len
1416 unsigned, since they're compared against string sizes.
1417
1418 * load.c (init_build_info): Make i unsigned.
1419
1420 * ioext.h (scm_read_line): Add prototype.
1421
1422 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
1423 scm_hash_fn_remove_x): Make hash bucket index local variable k
1424 unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as
1425 accurately as possible.
1426
1427 * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned
1428 comparisons, and range checking to make sure those casts are
1429 harmless.
1430
1431 * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid
1432 signed/unsigned comparisons.
1433
1434 * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to
1435 avoid signed/unsigned comparisons.
1436 * smob.h (scm_numsmob): Change extern declaration to match.
1437
1438 * ports.c (scm_numptob): Make this an int, not an scm_sizet, to
1439 avoid signed/unsigned comparisons.
1440 * ports.h (scm_numptob): Change extern declaration to match.
1441 (scm_current_load_port, scm_set_port_line_x,
1442 scm_set_port_column_x): New prototypes.
1443
1444 * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the
1445 test code, and it causes warnings.
1446
1447 * gh.h (gh_int2scmb, gh_uniform_vector_length,
1448 gh_uniform_vector_ref): Added prototypes.
1449
1450 * Makefile.am (libguile_la_SOURCES): Include Scheme-level
1451 debugging support unconditionally. That's backtrace.c, stack.c,
1452 debug.c, and srcprop.c.
1453 (EXTRA_libguile_la_SOURCES): Omit those from here.
1454 * Makefile.in: Regenerated.
1455
1456 1998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1457
1458 * options.c (scm_options): Bugfix: Allow empty list of options!
1459
1460 * debug.c, debug.h (scm_single_step): Removed.
1461 (scm_with_traps): New procedure. This procedure could easily be
1462 written in Scheme but needs to be highly optimized.
1463
1464 * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P.
1465
1466 * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags.
1467 Check SCM_TRAPS_P before trapping.
1468
1469 1998-07-30 Jim Blandy <jimb@zwingli.cygnus.com>
1470
1471 Changes to avoid signed/unsigned comparison warnings.
1472 * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs.
1473 (scm_gc_sweep): Make n and j local to the blocks they're used in,
1474 so they can have appropriate types for each application. Make i
1475 signed. Use initializers in some spots. I'll probably pay for
1476 all this tweaking.
1477 (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args.
1478 (scm_must_realloc): Make nm unsigned.
1479 (init_heap_seg): Make new_seg_index and n_new_objects signed.
1480 (scm_init_storage): Use prototype-style definition, and make the
1481 argument unsigned.
1482 * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc,
1483 scm_must_realloc, scm_init_storage): Adjust prototype accordingly.
1484
1485 * filesys.c (scm_readlink): Make local vars rv and size ints, to
1486 avoid signed/unsigned comparison warnings, and because the return
1487 value of readlink may be -1. Don't bother casting the third
1488 argument to readlink.
1489
1490 * filesys.c (scm_dirname, scm_basename): Move these to their own
1491 page, at the end of the file.
1492 * filesys.h (scm_dirname, scm_basename): Add prototypes for these.
1493
1494 * eval.h (scm_eval_options_interface): Add external prototype for this.
1495 * eval.c (scm_eval_options_interface): Use prototype-style def'n.
1496
1497 * eval.c (scm_lookupcar1): Make this static.
1498
1499 * dynl.h (scm_registered_modules, scm_clear_registered_modules):
1500 Make these prototype declarations, not K&R-style.
1501
1502 * chars.c (scm_tables_prehistory): Add cast, to remove signed/
1503 unsigned comparison warning.
1504
1505 * appinit.c: File removed. It had a single function in it, empty,
1506 whose reason for existence is explained in no documentation or
1507 comment. I think it's there as a default for some Tcl-style
1508 initialization, but Tcl abandoned that approach a while ago.
1509 * Makefile.am (libguile_la_SOURCES): Remove appinit.c.
1510 (BUILT_SOURCES): Remove appinit.x.
1511 * Makefile.in: Regenerated.
1512
1513 1998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
1514
1515 * Makefile.in: Regenerated using the last public version of
1516 automake, not the hacked Cygnus version.
1517
1518 1998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
1519
1520 Remove Totoro kludge.
1521 * Makefile.in, scmconfig.h.in: Regenerated.
1522 * init.c, readline.c: Don't check if TOTORO is #defined.
1523
1524 1998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
1525
1526 * Makefile.am: Adjust for new thread configuration system.
1527 (INCLUDES): Include the value of THREAD_CPPFLAGS.
1528 (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from
1529 THREAD_LIBS.
1530 (THREAD_LIBS): Definition deleted; automake will generate such
1531 things automatically.
1532 * Makefile.in: Regenerated.
1533
1534 1998-07-23 Jim Blandy <jimb@zwingli.cygnus.com>
1535
1536 Simplify smob and port marking; set the mark bit in the generic
1537 marking code, and make marker routines only responsible for
1538 turning up outgoing pointers.
1539 * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
1540 before calling the marking function. Don't call the marking
1541 function if it's zero.
1542 * markers.c (scm_mark0): Just return #f. This function isn't
1543 necessary at all now, but it's harmless to call it. We'll leave
1544 it in so other folks' code doesn't croak at link time.
1545 (scm_markcdr): Don't call SCM_SETGC8MARK.
1546 * async.c (mark_async): Don't call SCM_SETGC8MARK.
1547 * dynl.c (mark_dynl_obj): Same.
1548 * root.c (mark_root): Same.
1549 * srcprop.c (marksrcprops): Same.
1550 * unif.c (markra): Same.
1551 * variable.c (scm_markvar): Same.
1552 * ports.c (scm_markstream): Same.
1553 (void_port_ptob): Specify zero for our marking function.
1554 * debug.c (debugobjsmob): Same.
1555 * dynwind.c (guardsmob): Same.
1556 * filesys.c (dir_smob): Same.
1557 * fluids.c (fluid_smob): Same.
1558 * fports.c (scm_fptob, scm_pipob): Same.
1559 * mallocs.c (mallocsmob): Same.
1560 * regex-posix.c (regex_t_smob): Same.
1561 * smob.c (freecell, flob, bigob): Same.
1562 * threads.c (thread_smob, mutex_smob, condvar_smob): Same.
1563 * throw.c (jbsmob, lazy_catch_funs): Same.
1564
1565 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1566
1567 * eval.c (scm_copy_tree): Reverted last change: `eval' uses
1568 scm_copy_tree on code in order not to let memoized code to leak
1569 out. Thus, scm_copy_tree needs to copy vectors as well since
1570 quasiquote can introduce evaluated code also inside vector
1571 constants.
1572
1573 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1574
1575 * eval.c (scm_copy_tree): Removed ability to copy vectors.
1576
1577 * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect,
1578 gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and
1579 gh_doubles2dvect.)
1580
1581 * unif.c: Say that ivect and uvect are of type signed and unsigned
1582 long instead of int in commentary so that it correctly describes
1583 the implementation.
1584
1585 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1586
1587 * stime.c: Removed declaration of strptime. (It should be
1588 declared by the system headers. If it turns out that some systems
1589 don't, we'll handle that then.) (Thanks to Greg Troxel.)
1590
1591 * stime.h: Renamed TIMEH --> STIMEH
1592
1593 * backtrace.c (scm_display_error, scm_display_backtrace): In order
1594 to increase portability, don't use structure assignment.
1595 (Thanks to Nicolas Neuss.)
1596
1597 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
1598 portability.
1599 (finalize_fd_sets): Added empty statement after last case label.
1600 (Thanks to Nicolas Neuss.)
1601
1602 * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to
1603 Nicolas Neuss.)
1604
1605 Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com>
1606
1607 * init.c, readline.c: OK, I won't have these readline.x bug
1608 reports anymore. We've had them since April. The current reason
1609 is a completely unintelligible failure of totoro.red-bean.com to
1610 do the test for rl_getc_function in libreadline correctly. This
1611 kludge overrides the test if we're on totoro so that the snapshot
1612 generation process can work.
1613
1614 * readline.c: Define a strdup replacement if not existent on system.
1615
1616 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1617
1618 * vectors.c, vectors.h (scm_make_vector): Removed third argument.
1619 This change makes scm_make_vector R5RS compatible. We cannot keep
1620 the third argument since people want to be able to deduce the form
1621 of the C function call only by looking at R5RS. (At the same time
1622 we have removed some unnecessary complexity!)
1623
1624 * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
1625 net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
1626 stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
1627 argument in call to scm_make_vector.
1628
1629 1998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1630
1631 * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP.
1632 This macro is useful in applications.
1633
1634 1998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1635
1636 * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
1637 (scm_parse_path, scm_search_path): New Scheme level procedures.
1638
1639 * load.h (scm_internal_parse_path, scm_parse_path,
1640 scm_search_path): Declared.
1641
1642 1998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1643
1644 * filesys.c (dirname, basename): New procedures.
1645
1646 * init.c (scm_boot_guile_1): Removed condition around
1647 scm_init_options.
1648
1649 * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a
1650 new data type (guards) for representation of C level guards and
1651 data on the wind chain.
1652 (scm_internal_dynamic_wind): New function.
1653
1654 * dynwind.h: Declare scm_internal_dynamic_wind.
1655
1656 * root.h (scm_root_state): Added scm_cur_loadp.
1657
1658 * root.c (mark_root): Added comment about cur_loadp.
1659
1660 * load.c: #include "dynwind.h";
1661 (scm_primitive_load): Use scm_inner_dynamic_wind to update
1662 scm_cur_loadp.
1663
1664 * init.c (scm_init_standard_ports): Initialize scm_def_loadp.
1665
1666 * ports.c (current-load-port): New procedure.
1667
1668 1998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1669
1670 * ioext.c (scm_isatty_p): Accept any kind of data as argument. If
1671 not a tty, return #f.
1672
1673 * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
1674 to Julian Satchell and Roland Kaufmann.)
1675
1676 * gh.h (gh_memv, gh_member): Fixed typos in macro definitions.
1677 (gh_write): Added declaration. (Thanks to Eiichi Takamori.)
1678
1679 1998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1680
1681 * debug.h, debug.c (scm_start_stack): New function. Implements
1682 the guts of old scm_m_start_stack.
1683
1684 * debug.c (scm_m_start_stack): Use scm_start_stack.
1685
1686 * init.c (scm_start_stack, scm_restart_stack): Renamed to
1687 start_stack and restart_stack. (These have static scope.)
1688
1689 1998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1690
1691 * readline.c (rl_cleanup_after_signals, rl_free_line_state): New
1692 readline functions to come in release 2.3. (Thanks to Chet
1693 Ramey.)
1694 (handle_errors): Use the above functions.
1695
1696 1998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1697
1698 * readline.c: Improvements for readline support: Handle errors
1699 better; Implement before-read-hook.
1700
1701 1998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1702
1703 * init.c (scm_boot_guile_1), readline.c: Test for
1704 HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to
1705 assure that we have version >= 2.1.)
1706
1707 1998-05-11 Mikael Djurfeldt <mdj@kenneth>
1708
1709 * readline.c (scm_readline): Defer interrupts while we're calling
1710 readline.
1711
1712 * readline.c (scm_add_history): Bugfix: Do strdup before giving
1713 away the string to add_history.
1714 (completion_function): Do completion for readline. (Thanks to
1715 Andrew Archibald.)
1716 (scm_filename_completion_function): New procedure: Filename
1717 completer.
1718 (current_input_getc): New function. Use this one instead of
1719 standard getc from readline.
1720
1721 * throw.c, throw.h (scm_handle_by_throw): New function: This
1722 handler throws errors to next handler on the dynwind chain.
1723
1724 1998-05-09 Mikael Djurfeldt <mdj@kenneth>
1725
1726 * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't
1727 used.
1728
1729 1998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1730
1731 * procprop.c (scm_i_procedure_arity): New function. Returns arity
1732 of procedure.
1733 (scm_procedure_properties): Modified to return arity together with
1734 other properties.
1735 (scm_procedure_property): Added the read-only property `arity'.
1736 (scm_set_procedure_property_x): It is an error to set the `arity'
1737 property.
1738
1739 * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
1740 prefix SCM_; Made f_gsubr_apply global and added prefix scm_.
1741
1742 * procprop.h (scm_sym_arity): New symbol.
1743
1744 * objects.c (scm_set_object_procedure_x): New procedure: Use this
1745 to set the dispatch procedure of an operator or entity object.
1746
1747 * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
1748 Made procedure slots read-only.
1749
1750 * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
1751 scm_tcs_cons_gloc case in zero args switch; Fixed args
1752 construction for operators in scm_tcs_cons_gloc case in two args
1753 switch.
1754
1755 1998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1756
1757 * fluids.c: Removed use of assert.h (in order to avoid
1758 __eprintf).
1759
1760 * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
1761
1762 * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
1763
1764 * eval.c (SCM_CEVAL): Do more thorough argument checking. This
1765 change makes the evaluator safer at the cost of evaluation speed.
1766 It handles the case when the user has added a non-immediate
1767 improper end of the application form, e.g., `(+ 0 . x)'.
1768 (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
1769 minimize the extra cost as much as possible. The new code is
1770 enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
1771 problem with structs planted directly in the code (e.g. by a
1772 macro). This no longer causes segmentation fault. (Thanks to
1773 Eric Hanchrow.)
1774
1775 * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
1776 arg `proc' in order to be able to throw errors; New argument
1777 checking code.
1778
1779 * Removed extra #include "debug.h"
1780
1781 1998-04-25 Mikael Djurfeldt <mdj@kenneth>
1782
1783 * scmsigs.c: Declare usleep as returning void on some systems.
1784 (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
1785 Satchell.)
1786
1787 * coop.c (usleep): Return void on some systems.
1788
1789 1998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1790
1791 * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
1792
1793 * coop.c: Changed return type of usleep to int.
1794
1795 * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
1796 isn't found in the OS.
1797
1798 * iselect.h: #define scm_internal_select select if GUILE_ISELECT
1799 isn't enabled. (Thought that I had made this change ages ago...)
1800
1801 * iselect.c: Declare bzero if not defined by OS.
1802
1803 1998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1804
1805 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
1806 condition. (Thanks to John Tobey.)
1807
1808 * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
1809 scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
1810 A section.
1811
1812 * __scm.h: Start the long-term project of moving to POSIX threads.
1813 Phase 1: Classification of all critical sections.
1814 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
1815 for A sections. (See comments in __scm.h for details.)
1816
1817 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
1818 dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
1819
1820 1998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1821
1822 * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
1823 cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
1824 (libpath.h, versiondat.h): Replaced dependency on Makefile with
1825 dependencies on $(srcdir)/Makefile.in
1826 $(top_builddir)/config.status in order to avoid circularity.
1827
1828 * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
1829 from argc if argc was 0 initially.
1830
1831 * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
1832 in generation of libpath.h.
1833
1834 1998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
1835
1836 * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
1837 libguile from 2 to 3.
1838
1839 1998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
1840
1841 * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
1842
1843 1998-04-13 Mikael Djurfeldt <mdj@kenneth>
1844
1845 * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
1846 scm_set_port_column_x, scm_port_filename,
1847 scm_set_port_filename_x): Removed optional arguments. Added
1848 proper argument checking.
1849
1850 * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
1851 stack size in machine words.
1852
1853 * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
1854 rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
1855 to Ole Myren Röhne.)
1856
1857 1998-04-12 Mikael Djurfeldt <mdj@kenneth>
1858
1859 * socket.c: Check for HAVE_UNIX_DOMAIN_SOCKETS instead of
1860 UNIX_DOMAIN_SOCKETS. (Thanks to Lauri Alanko.)
1861
1862 * gc.c (scm_gc_sweep): Count cells correctly. (Thanks to Ben
1863 Caradoc-Davies.)
1864
1865 * eval.c (SCM_CEVAL, SCM_APPLY): In SCM_IM_APPLY and in the
1866 procedure apply: Copy argument lists before pushing them unto the
1867 environment so that the environment won't get mutated due to
1868 manipulation of procedure arguments. This should perhaps be
1869 regarded as a temporary solution until someone finds a more
1870 efficient one. (Thanks to Maciej Stachowiak.)
1871
1872 1998-04-10 Mikael Djurfeldt <mdj@kenneth>
1873
1874 * script.c (scm_compile_shell_switches): Use "guile" as default
1875 zero arg if argc is NULL.
1876
1877 1998-04-02 Mikael Djurfeldt <mdj@nada.kth.se>
1878
1879 * script.c (scm_compile_shell_switches): Allow NULL argv if argc
1880 is zero. (Thanks to Dirk Herrmann.)
1881
1882 1998-03-30 Mikael Djurfeldt <mdj@nada.kth.se>
1883
1884 * ports.c (scm_add_to_port_table): First line is now line 0
1885 (was 1). (Interface changed according to suggestion by Per
1886 Bothner.)
1887
1888 * backtrace.c (display_header): Add 1 to line and column numbers
1889 when presenting them to the user.
1890
1891 * eval.h, eval.c, debug.h, debug.c (scm_evaluator_traps): Moved
1892 from debug.c --> eval.c
1893
1894 * eval.h, eval.c (scm_eval_options_interface): New options
1895 interface.
1896 (SCM_EVAL_STACK): New option: Size of newly created stacks,
1897 i.e. stacks for new threads.
1898
1899 * coop.c (COOP_STKSIZE): Use SCM_EVAL_STACK.
1900
1901 * eval.c (unsafe_setjmp): Removed with #if 0.
1902
1903 * gsubr.c (scm_gsubr_apply): Added dummy return to avoid compiler
1904 warning.
1905
1906 * eval.c, numbers.c, unif.c, srcprop.c: Added a few curly braces
1907 to avoid compiler warnings.
1908
1909 * dynl-dl.c (sysdep_dynl_func): Only define usymb if needed.
1910
1911 1998-03-28 Mikael Djurfeldt <mdj@nada.kth.se>
1912
1913 * throw.c (handler_message): Print message on current error port
1914 instead of default error port. (Thanks to Maciej Stachowiak.)
1915
1916 Mon Mar 2 21:35:02 1998 Gary Houston <ghouston@actrix.gen.nz>
1917
1918 * ports.c (scm_add_to_port_table): allocate in units of
1919 struct scm_port_table *, not struct scm_port_table.
1920 * posix.c (scm_close_pipe): remove the port from the port table
1921 and mark as closed.
1922 Thanks to Rob Engle for both fixes.
1923
1924 1998-02-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1925
1926 * iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
1927 coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.
1928
1929 1998-02-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1930
1931 * throw.h: Removed jmpbuf arg in scm_catch_body_t.
1932
1933 * backtrace.c (display_error_body, display_backtrace_body),
1934 coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
1935 gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
1936 (invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
1937 scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
1938 functions.
1939
1940 * throw.c (scm_internal_catch, scm_internal_lazy_catch): Bodies
1941 don't receive the jmpbuf arg anylonger.
1942 (scm_catch): Don't accept a #f tag.
1943 (scm_throw): Check that key is a symbol.
1944 (scm_ithrow): Don't take a jmpbuf as key. Don't check key arg.
1945
1946 Fri Jan 30 22:28:07 1998 Mikael Djurfeldt <mdj@kenneth>
1947
1948 * async.c (async_pending): Removed declaration.
1949
1950 1998-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1951
1952 * dynwind.c (scm_wind_chain): New debug function.
1953
1954 * coop-threads.c (scheme_launch_data, scheme_body_bootstrip,
1955 scheme_handler_bootstrip, scheme_launch_thread, c_launch_data,
1956 c_body_bootstrip, c_handler_bootstrip, c_launch_thread): Add an
1957 extra layer of functions around the body and handler of a thread.
1958 This extra layer makes sure that the handler is called in the
1959 dynamic context of the surround (= empty dynwind list), but under
1960 the *dynamic root* of the body. We can not use the dynamic root
1961 of the surround since that root belongs to another thread => stack
1962 is not handled correctly. It may seem ugly to use this extra
1963 layer, but the extra cost in terms of execution time is really
1964 negligible compared to the total amount of time required to create
1965 a thread, and it would reduce maintainability to duplicate the
1966 crucial and complicated steps performed by cwdr.
1967
1968 * __scm.h (SCM_ASYNC_TICK): Removed thread switching code.
1969 (SCM_ALLOW_INTS): Added thread switching code before interrupts
1970 get re-enabled. The important effect of this is that interrupts
1971 are blocked during thread switching so that thread data structures
1972 don't risk getting messed up by an unfortunate signal.
1973 (SCM_REDEFER_INTS, SCM_REALLOW_INTS): It turned out that gcc-2.8.0
1974 seems to do more aggressive optimization which actually move
1975 instructions around in these macros in a fatal way. Therefore:
1976 Introduce Anthony's SCM_FENCE macro! (And I who thought he was
1977 just superstitious...)
1978 (SCM_TICK): Maybe do a context switch and take care of asyncs.
1979 This macro should be used instead of SCM_ASYNC_TICK since the
1980 latter doesn't do context switches any more.
1981
1982 * eval.c (scm_eval, scm_deval), eq.c (scm_equal_p): Use SCM_TICK
1983 instead of SCM_ASYNC_TICK.
1984
1985 * coop.c, iselect.c: Since thread switches are now performed with
1986 interrupts masked, we can't use the old mechanism of delivering
1987 signals immediately when they arrive. Signals must instead be
1988 delivered when the asyncs run *after* the end of the critical
1989 section in scm_internal_select. But this also means after context
1990 switch so that the signal will be delivered to a different thread.
1991 To avoid this, I have changed the protocol of
1992 coop_wait_for_runnable_thread and friends so that they are allowed
1993 to return the original thread. So, if a signal arrives during
1994 scm_internal_select, we won't any longer be forced do a context
1995 switch, but can remain in the same thread and deliver the signal
1996 to it.
1997
1998 * async.c, async.h (asyncs_pending): Renamed asyncs_pending -->
1999 scm_asyncs_pending and made it global.
2000
2001 * iselect.c: Small fixes.
2002
2003 * coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
2004 coop_condition_variable_init, coop_condition_variable_wait,
2005 coop_condition_variable_signal): Changed return type from `void'
2006 to `int'. This is to adhere closer to the pthreads interface.
2007 This, in turn, is part of an attempt to provide C versions of the
2008 mutex and condition variable primitives which can be part of a
2009 frontend to COOP or pthreads.
2010
2011 * coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
2012 coop_condition_variable_destroy): New functions.
2013
2014 * coop-threads.c (scm_wait_condition_variable): Use
2015 coop_condition_variable_wait_mutex.
2016
2017 * coop-threads.h, coop-defs.h (coop_q_t, coop_m, coop_c):
2018 Definitions moved to coop-defs.h.
2019
2020 * coop-defs.h (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock,
2021 scm_mutex_destroy, scm_cond_init, scm_cond_wait, scm_cond_signal,
2022 scm_cond_destroy): New C interface to mutecis and cond vars.
2023
2024 1998-01-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2025
2026 * error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.
2027
2028 * iselect.c: Now several threads can wait on the same file
2029 descriptor. The behaviour is compatible with OS select: All
2030 threads waiting for the fd return with the same status.
2031
2032 1998-01-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2033
2034 * coop-threads.c, threads.h (scm_spawn_thread): New function.
2035 Can spawn a thread from application C code.
2036
2037 1998-01-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2038
2039 * gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
2040 gh_doubles2scm): New functions.
2041
2042 1998-01-15 Mark Galassi <rosalia@nis.lanl.gov>
2043
2044 * gh_eval.c (gh_eval_str): cleanup -- threw out the old
2045 commented-out version of gh_eval_str()
2046
2047 Sun Jan 4 02:23:36 1998 Gary Houston <ghouston@actrix.gen.nz>
2048
2049 * socket.c (scm_bind): free soka after use.
2050
2051 Sat Jan 3 20:55:07 1998 Gary Houston <ghouston@actrix.gen.nz>
2052
2053 * stime.c (tzvar): new variable.
2054 (setzone, restorezone, scm_localtime, scm_mktime, scm_strftime):
2055 avoid memory leaks when allocating.
2056
2057 1998-01-03 Jim Blandy <jimb@totoro.red-bean.com>
2058
2059 * iselect.h: Some systems require <sys/types.h> to get the FD_SET
2060 macro definitions.
2061
2062 * gc.c, tags.h: Doc fixes.
2063
2064 1998-01-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2065
2066 * eval.c (macro-eval!): Removed. This function was a design bug.
2067 It allowed memoized code to leak out to the scheme level. Most
2068 things that you could do with `macro-eval!' can be done with
2069 `local-eval'.
2070
2071 1997-12-20 Tim Pierce <twp@skepsis.com>
2072
2073 * fports.c (scm_pipob): Use scm_generic_fgets for line i/o, since
2074 scm_fgets now depends on ftell(3) to know how many bytes were
2075 read. Sigh.
2076
2077 1997-12-15 Tim Pierce <twp@skepsis.com>
2078
2079 * gh_data.c (gh_scm2newstr, gh_get_substr): Use RO macros for
2080 dealing with strings.
2081
2082 1997-12-13 Tim Pierce <twp@skepsis.com>
2083
2084 Make %read-line more suitable for implementing read-line efficiently.
2085 * ioext.c (scm_read_line): Strip the terminating newline from a
2086 string, and return a cons of the string and its terminator.
2087
2088 * fports.c, fports.h (scm_fgets): Add `len' argument. The length
2089 of the string that is read is stored in this memory location.
2090 * ports.c, ports.h (scm_generic_fgets, fgets_void_port): Same.
2091 * genio.c, genio.h (scm_do_read_line): Update caller.
2092 * ports.h (scm_ptobfuns): Update typedef.
2093 * fports.c (scm_fptob, scm_pipob): Update struct.
2094
2095 1997-12-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2096
2097 * filesys.c (set_element): Return file descriptor.
2098 (fill_select_type): Return the highest file descriptor.
2099 (scm_select): Tell select about the highest file descriptor. On
2100 some systems the SELECT_SET_SIZE can be as much as 128 bytes.
2101 Therefore the extra overhead for calculating the maximum fd seems
2102 to be more than compensated. Is this correct? In any case,
2103 scm_internal_select will be much faster with this info.
2104 (scm_select, fill_select_type, set_element): Don't accept any kind
2105 of object in the file descriptor list or vector.
2106
2107 1997-12-07 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2108
2109 * iselect.c (finalize_fd_sets): Bugfix.
2110
2111 1997-12-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2112
2113 * filesys.c (scm_select): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS
2114 when using scm_internal_select (since we might switch to another
2115 thread).
2116
2117 Sun Dec 7 01:43:56 1997 Gary Houston <ghouston@actrix.gen.nz>
2118
2119 * simpos.c (scm_system): always define: use sysmissing if not
2120 available. Check for HAVE_SYSTEM instead of _Windows (does
2121 Windows lack system or does it have an unusable one?).
2122 Check for error conditions -1 and 127. Use SCM_DEFER_INTS.
2123 Let the argument be optional: if not supplied, call system(NULL).
2124
2125 * ports.c (scm_close_port): relax the type check from OPPORTP to
2126 PORTP; closing a closed port is allowed.
2127
2128 1997-12-04 Tim Pierce <twp@ppp39.Nantucket.net>
2129
2130 * fports.c (scm_fgets): Return if the last char in a chunk is
2131 newline. When fgets returns a string whose length is `size-1', it
2132 is ambiguous whether a whole line was retrieved, so we must check
2133 explicitly whether a line terminator is present.
2134
2135 1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2136
2137 * print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
2138 before taking the CDR. (Thanks to Harald Meland.)
2139
2140 * filesys.c (scm_stat): Slightly optimized.
2141
2142 Wed Dec 3 12:23:06 1997 Jim Blandy <jimb@totoro.red-bean.com>
2143
2144 * ports.c (scm_close_port): Make sure the port is open before
2145 trying to close it.
2146
2147 * guile-snarf.in: Pass args through to gcc in a way that preserves
2148 whitespace boundaries. (Thanks to Greg Badros.)
2149
2150 1997-12-02 Tim Pierce <twp@skepsis.com>
2151
2152 * stacks.c (scm_frame_procedure): Reverse the logic in the return
2153 statement. (Thanks to Doug Evans for pointing this out.)
2154
2155 1997-12-01 Tim Pierce <twp@skepsis.com>
2156
2157 * scmconfig.h.in: Regenerated for USCORE change in ../acconfig.h.
2158
2159 Sun Nov 30 11:29:18 1997 Mikael Djurfeldt <mdj@kenneth>
2160
2161 * coop-defs.h (struct coop_t): Renamed errno --> _errno to prevent
2162 errno macro expansion of this field name. (errno is a C
2163 preprocessor macro on some systems.)
2164
2165 1997-11-29 Tim Pierce <twp@skepsis.com>
2166
2167 * iselect.c: Doc fix.
2168
2169 Sat Nov 29 01:16:53 1997 Mikael Djurfeldt <mdj@kenneth>
2170
2171 * init.c (scm_start_stack): Removed initialization of
2172 scm_the_last_stack_var.
2173
2174 * backtrace.h: Declare scm_the_last_stack_var.
2175
2176 * backtrace.c: Define scm_the_last_stack_var.
2177
2178 * root.c (mark_root): Don't mark the_last_stack_var.
2179
2180 * root.h (scm_root_state): Removed the_last_stack_var.
2181
2182 * throw.c: Added #include "fluids.h"
2183 (ss_handler): `the-last-stack' is now a fluid.
2184
2185 * (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var
2186 --> the_last_stack_fluid.
2187
2188 * backtrace.c: Added #include "fluids.h"
2189 (scm_init_backtrace): Initialize `the-last-stack' to a fluid.
2190 (scm_backtrace): `the-last-stack' is now a fluid.
2191
2192 * init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
2193 after scm_init_fluids.
2194
2195 1997-11-28 Tim Pierce <twp@skepsis.com>
2196
2197 * iselect.c: #ifdef USE_THREADS around thread-related includes.
2198
2199 * dynl-dl.c (sysdep_dynl_func): Check both USCORE and
2200 DLSYM_ADDS_USCORE to decide whether to add an underscore.
2201
2202 1997-11-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2203
2204 * iselect.c (coop_next_runnable_thread,
2205 coop_wait_for_runnable_thread): Disable interrupts so that no
2206 async is executed before a potential error_revive.
2207 (scm_internal_select): Disable interrupts during the parts of the
2208 code which manipulate the sleep queue and the file descriptors.
2209
2210 1997-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2211
2212 * Makefile.am: Added iselect.c and iselect.h.
2213
2214 * coop.c (coop_qinit): Initialize fields used by
2215 scm_internal_select.
2216 (coop_qget, coop_qget, coop_tmp_queue): Made global.
2217 (coop_next_runnable_thread): If GUILE_ISELECT enabled, use
2218 replacement in iselect.c.
2219 (coop_mutex_lock, coop_condition_variable_wait, coop_abort,
2220 coop_join): If GUILE_ISELECT enabled, use
2221 coop_wait_for_runnable_thread instead of
2222 coop_next_runnable_thread.
2223 (usleep, sleep): New replacements for system functions if
2224 GUILE_ISELECT is enabled.
2225
2226 * coop-threads.h: Declare coop_wait_for_runnable_thread.
2227
2228 * coop-defs.h (coop_t): Added fields used by scm_internal_select.
2229
2230 * filesys.c: Added #include "iselect.h". Moved FD-macros to
2231 iselect.h. Implement Scheme level `select' using
2232 scm_internal_select. (See NEWS.)
2233
2234 * genio.c (scm_getc): Block with scm_internal_select. (See NEWS.)
2235
2236 * init.c: Call scm_init_iselect.
2237
2238 * iselect.h, iselect.c: New files. Implements
2239 scm_internal_select. (See NEWS.)
2240
2241 1997-11-27 Tim Pierce <twp@skepsis.com>
2242
2243 Fix a memory leak in scm_read_line and a type cast bug in the ptob.
2244 * fports.c (scm_fgets): Use malloc/free rather than scm_must_malloc
2245 and scm_must_free, since ultimately the string returned will be copied
2246 by scm_makfrom0str anyway. Also, read any characters that may have
2247 been pushed onto the port with scm_ungetc.
2248 * ports.c (scm_generic_fgets): Same as for scm_fgets.
2249 * ioext.c (scm_read_line): Free string after Guilifying it.
2250 * ports.h (scm_ptobfuns): fgets method returns a char *, not a char.
2251
2252 1997-11-26 Anthony Green <green@hoser.cygnus.com>
2253
2254 * gh_data.c (gh_set_substr): Strings can be longer than 256 bytes.
2255
2256 * gh.h: Safely wrap prototypes for c++ usage.
2257
2258 1997-11-25 Mark Galassi <rosalia@cygnus.com>
2259
2260 * gh_test_repl.c (main_prog): changed invocation of gh_repl() to
2261 gh_repl (argc, argv).
2262
2263 1997-11-24 Mark Galassi <rosalia@nis.lanl.gov>
2264
2265 * gh_init.c (gh_repl): modified gh_repl() to accept argc and argv
2266 and to invoke scm_shell().
2267 (gh_launch_pad): took out the loading of boot-9.scm from here,
2268 since it is probably best to let the user control that. In fact,
2269 gh_repl() now invokes scm_shell() which does that.
2270
2271 1997-11-23 Mark Galassi <rosalia@cygnus.com>
2272
2273 * gh_test_repl.c (main_prog): added argc and argv to the gh_repl()
2274 invocation.
2275
2276 1997-11-22 Tim Pierce <twp@twp.tezcat.com>
2277
2278 * dynl-dl.c (sysdep_dynl_func): Fix memory leak created by
2279 yesterday's underscore patch. (Thanks to Marius Vollmer for
2280 spotting this.)
2281
2282 1997-11-21 Tim Pierce <twp@twp.tezcat.com>
2283
2284 * dynl-dl.c (sysdep_dynl_func): Prepend symb with underscore if
2285 DLSYM_ADDS_USCORE is not defined.
2286
2287 1997-11-17 Mark Galassi <rosalia@nis.lanl.gov>
2288
2289 * gh_data.c (gh_uniform_vector_length):
2290 (gh_uniform_vector_ref): started implementing the uniform types in
2291 the gh_ interface.
2292
2293 1997-11-06 Mikael Djurfeldt <mdj@nada.kth.se>
2294
2295 * regex-posix.c (scm_free_regex_t): Return size of regex_t instead
2296 of 0; size_t --> scm_size_t. Thanks to Bernard Urban.
2297
2298 1997-10-26 Mikael Djurfeldt <mdj@nada.kth.se>
2299
2300 * scmconfig.h.in: Updated (HAVE_LIBTERMCAP was added when
2301 configure.in was changed).
2302
2303 Sun Oct 26 02:20:11 1997 Jim Blandy <jimb@totoro.red-bean.com>
2304
2305 * Makefile.am (modinclude_HEADERS): Include readline.h here.
2306 * Makefile.in: Regenerated.
2307
2308 1997-10-25 Marius Vollmer <mvo@zagadka.ping.de>
2309
2310 * print.h (SCM_COERCE_OPORT): Renamed to SCM_COERCE_OUTPORT. An
2311 OPORT is an `open' port, not an output port.
2312
2313 * filesys.c (scm_close, set_element, get_element, scm_chown,
2314 scm_chmod, scm_stat, scm_truncate_file, scm_fcntl, scm_fsync): Use
2315 SCM_COERCE_OUTPORT to cope with the printstate/port magic.
2316 * ports.c (scm_port_revealed, scm_set_port_revealed_x,
2317 scm_close_port, scm_port_line, scm_set_port_line_x,
2318 scm_port_column, scm_set_port_column_x, scm_port_filename,
2319 scm_set_port_filename_x, scm_port_mode,
2320 scm_close_all_ports_except, scm_set_current_output_port,
2321 scm_set_current_error_port): Likewise
2322 * ioext.c (scm_redirect_port, scm_dup_to_fdes, scm_freopen,
2323 scm_ftell, scm_fileno, scm_isatty_p, scm_primitive_move_to_fdes):
2324 Likewise
2325 * posix.c (scm_ttyname, scm_tcgetpgrp, scm_tcsetpgrp): Likewise
2326 * backtrace.c (display_backtrace_body): Likewise
2327 * fports (scm_setvbuf): Likewise
2328 * socket.c (scm_getsockopt, scm_setsockopt, scm_shutdown,
2329 scm_connect, scm_bind, scm_listen, scm_accept, scm_getsockname,
2330 scm_getpeername, scm_send, scm_sendto): Likewise
2331 * unif.c (scm_uniform_array_write): Likewise
2332
2333 Sat Oct 25 02:52:58 1997 Jim Blandy <jimb@totoro.red-bean.com>
2334
2335 Minor problems with substring-related tag changes.
2336 * symbols.h (SCM_SUBSTRP): Don't mask off the S bit; that's
2337 exactly what we want to leave in to detect substrings.
2338 (SCM_ROSTRINGP, ROUCHARS): Formatting tweaks.
2339 * tags.h: Fix diagrams and comments describing the S tag bit;
2340 remove vestigial remarks about the D tag bit.
2341 (SCM_TYP7, SCM_TYP7S): Rephrased for readability.
2342 * strings.c: Formatting tweaks.
2343
2344 * load.c (scm_init_load_path): Check GUILE_LOAD_PATH environment
2345 variable first; then SCHEME_LOAD_PATH, with a warning message.
2346 (scm_parse_path): New function.
2347 * script.c: Doc fixes.
2348
2349 Thu Oct 23 01:02:03 1997 Jim Blandy <jimb@totoro.red-bean.com>
2350
2351 Readline support, from Daniel Risacher.
2352 * readline.c, readline.h: New files.
2353 * init.c: #include "readline.h".
2354 (scm_boot_guile_1): Call scm_init_readline, if we have it.
2355 * Makefile.am (libguile_la_SOURCES): Include readline.c.
2356 * Makefile.in: Regenerated.
2357 * scmconfig.h.in: Regenerated, after change to ../configure.
2358
2359 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
2360
2361 * gh.h: gh_vector_set -> gh_vector_set_x
2362
2363 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
2364
2365 * gh_data.c (gh_vector_set_x): changed name to make it consistent
2366 with the ! -> _x mapping when going from Scheme to C.
2367
2368 1997-10-19 Mark Galassi <rosalia@cygnus.com>
2369
2370 * gh.h (gh_reverse):
2371 (gh_list_tail):
2372 (gh_list_ref):
2373 (gh_memq):
2374 (gh_memv):
2375 (gh_member):
2376 (gh_assq):
2377 (gh_assv):
2378 (gh_assoc): added these gh_ functions implemented as macros.
2379
2380 * gh_predicates.c (gh_null_p):
2381 (gh_string_equal_p): added these two missing predicates.
2382
2383 * gh_list.c (gh_append):
2384 (gh_append2):
2385 (gh_append3):
2386 (gh_append4):
2387 (gh_set_car_x):
2388 (gh_set_cdr_x): added these routines as I go through and try to
2389 complete the picture R4RS functions that should be mirrored in the
2390 gh_ interface.
2391
2392 Sat Oct 18 01:52:51 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2393
2394 * tags.h (scm_tc7_substring): Changed the comment and code to
2395 conform with the changes below. Folks! We have suddenly two new
2396 free tc7 codes!!! Jummy, jummy!
2397
2398 Tue Oct 14 22:03:06 1997 Tom Tromey <tromey@cygnus.com>
2399
2400 * Makefile.in: Rebuilt.
2401 * Makefile.am (libguile_la_SOURCES): Removed extchrs.c,
2402 mbstrings.c.
2403 (modinclude_HEADERS): Removed extchrs.h, mbstrings.h.
2404 * unif.c (scm_vector_set_length_x): Don't handle multibyte
2405 strings.
2406 * tag.c (scm_utag_mb_string, scm_utag_mb_substring): Removed.
2407 (scm_tag): Don't handle multibyte strings.
2408 * read.c: Don't include mbstrings.h.
2409 (scm_lreadr): Don't handle multibyte ports.
2410 * kw.c: Don't include mbstrings.h.
2411 * init.c: Don't include mbstrings.h.
2412 (scm_boot_guile_1): Don't init mbstrings module.
2413 * hash.c (scm_hasher): Don't handle mbstrings.
2414 * gscm.c (gscm_run_scm): Don't init mbstrings module.
2415 * gc.c (scm_gc_mark): Don't handle mbstrings.
2416 (scm_gc_sweep): Likewise.
2417 * eval.c (SCM_CEVAL): Don't handle mbstrings.
2418 * eq.c (scm_equal_p): Use SCM_TYP7S, not SCM_TYP7SD.
2419 * tags.h (SCM_TYP7SD): Removed.
2420 (SCM_TYP7D): Removed.
2421 (scm_tc7_mb_string): Removed.
2422 (scm_tc7_mb_substring): Removed.
2423 * print.c (scm_iprin1): Handle char printing directly. Don't
2424 handle mbstrings.
2425 Don't include "mbstrings.h".
2426 * symbols.c (scm_intern_obarray_soft, scm_string_to_symbol,
2427 scm_string_to_obarray_symbol, msymbolize): Don't set symbol's
2428 multi-byte flag.
2429 Don't include "mbstrings.h".
2430 * symbols.h (SCM_SYMBOL_MULTI_BYTE_STRINGP): Removed.
2431 (SCM_SYMBOL_SLOTS): Define as 4.
2432 (SCM_ROSTRINGP): Use SCM_TYP7S, not SCM_TYP7SD.
2433 * arbiters.c, backtrace.c, debug.c, dynl.c, eval.c, fluids.c,
2434 gc.c, gsubr.c, ioext.c, kw.c, mallocs.c, numbers.c, ports.c,
2435 print.c, read.c, regex-posix.c, root.c, srcprop.c, stackchk.c,
2436 struct.c, threads.c, throw.c, unif.c, variable.c: Use new
2437 ("gen"-less) I/O function names.
2438 * ports.c (scm_add_to_port_table): Don't set port's
2439 representation.
2440 * ports.h (scm_port_representation_type): Removed.
2441 (scm_string_representation_type): Removed.
2442 (struct scm_port_table ): Removed representation field.
2443 (SCM_PORT_REPRESENTATION): Removed.
2444 (SCM_SET_PORT_REPRESENTATION): Removed.
2445 * genio.h: Use new function names.
2446 * genio.c: Don't include "extchrs.h".
2447 (scm_gen_putc, scm_gen_puts, scm_gen_write, scm_get_getc):
2448 Removed.
2449 (scm_putc, scm_puts, scm_lfwrite): No longer static.
2450 (scm_getc): No longer static; handle line and column changes.
2451 (scm_ungetc): Renamed from scm_gen_ungetc.
2452 (scm_do_read_line): Renamed from scm_gen_read_line.
2453 * libguile.h: Don't include "extchrs.h" or "mbstrings.h"
2454 * extchrs.h, extchrs.c, mbstrings.h, mbstrings.c: Removed.
2455
2456 1997-10-12 Mark Galassi <rosalia@cygnus.com>
2457
2458 * gh_test_repl.c (c_vector_test): same as gh_test_c.c
2459
2460 * gh_test_c.c (c_vector_test): some improvements on the vector
2461 routines test.
2462
2463 * gh.h (gh_vector): this used to exist but do the wrong thing.
2464 Now it (almost) does the right thing, though it takes a list
2465 instead of the individual arguments. I need to see how it could
2466 be done right.
2467 (gh_list_to_vector): added this function as a macro. Corresponds
2468 to Scheme's (list->vector ...).
2469 (gh_vector_to_list): added this function as a macro. Corresponds
2470 to Scheme's (vector->list ...).
2471
2472 * gh_data.c (gh_vector_ref): renamed from gh_vref to
2473 gh_vector_ref, so that it resembles the Scheme routines more.
2474 (gh_vector_set): renamed from gh_vset to gh_vector_set, so that it
2475 resembles the Scheme routines more.
2476 (gh_make_vector): this used to be (stupidly) called gh_vector().
2477 This is the right name, since it does the same thing as the Scheme
2478 (make-vector ...) procedure.
2479
2480 Sun Oct 12 14:41:39 1997 Mikael Djurfeldt <mdj@kenneth>
2481
2482 * ports.h: #include "libguile/print.h"
2483
2484 * eval.c (SCM_CEVAL, scm_apply): Completed GOOPS support code;
2485 Some indentation fixes.
2486
2487 * objects.h (SCM_METACLASS_STANDARD_LAYOUT): Printer field is no
2488 longer a user field; New field: class_flags.
2489
2490 * objets.c, objects.h: New metaclass: scm_metaclass_operator.
2491
2492 Tue Oct 7 09:37:24 1997 Mark Galassi <rosalia@cygnus.com>
2493
2494 * gh_data.c (gh_bool2scm): new function which replaces
2495 gh_int2scmb(), which is now tagged as obsolete.
2496
2497 1997-10-03 Mikael Djurfeldt <mdj@nada.kth.se>
2498
2499 * print.h (SCM_PRINT_STATE_P): Removed SCM_NIMP test. (NIMP
2500 macros should by convention not test for NIMPness.)
2501 (SCM_COERCE_OPORT): Adjust indentation.
2502
2503 * print.c (scm_valid_oport_value_p): Adjusted indentation; Added
2504 SCM_NIMP test before SCM_PRINT_STATE_P.
2505
2506 * struct.c, struct.h, gc.c: Renamed:
2507 scm_struct_i_layout --> scm_vtable_index_layout
2508 scm_struct_i_vcell --> scm_vtable_index_vcell
2509 scm_struct_i_vtable --> scm_vtable_index_vtable
2510 scm_struct_i_printer --> scm_vtable_index_printer
2511 scm_struct_i_vtable_offset --> scm_vtable_offset_user
2512
2513 * struct.c (scm_print_struct): Use new printer slot; Default
2514 printing: Also output hex code of vtable so that type identity
2515 will be indicated as well.
2516 (scm_init_struct): Updated required_vtable_fields to "pruosrpw";
2517 Removed struct_printer_var; Removed struct-vtable-offset;
2518 (vtable-index-layout, vtable-index-vtable, vtable-index-printer,
2519 vtable-offset-user): New constants.
2520
2521 * struct.h (scm_struct_i_vtable_offset): Bumped from 3 to 4.
2522 (scm_struct_i_printer, SCM_STRUCT_PRINTER): New slot in vtables.
2523 If this slot contains a procedure, use that to print structures of
2524 the type represented by this vtable.
2525
2526 * print.c (scm_iprin1): Don't print arguments of macro
2527 transformers. (They are always: exp env.); Bugfix: Unmemoize
2528 transformer source with correct environment.
2529
2530 1997-10-02 Marius Vollmer <mvo@zagadka.ping.de>
2531
2532 Streamlining of call-with-dynamic-root:
2533
2534 * root.c (cwdr_inner_body, cwdr_body): Remove "inner" from name,
2535 there is now only one catch.
2536 (cwdr_outer_body): Removed.
2537 (cwdr_handler): New function.
2538 (scm_internal_cwdr): New function to perform the function of cwdr
2539 but take args that are more useful to C code. Also, the handler
2540 is now invoked *outside* of the new dynamic root, like the docs
2541 say. We no longer have to catch absolutely all errors, the caller
2542 is responsible for using a handler that does not throw, if he
2543 wants that.
2544 (cwdr): Reimplemented in terms of scm_internal_cwdr.
2545 * root.h (scm_internal_cwdr): New prototype.
2546
2547 Even more but risky streamlining:
2548
2549 * root.c (USE_STACKJMPBUF): New define to activate a stack-based
2550 allocation of the jumpbuf of a root continuation. The changes
2551 below are controlled by it. They are now deactivated.
2552 (scm_internal_cwdr): Allocate the scm_contregs on the stack. Set
2553 the JMPBUF of the scm_rootcont to NULL before returning.
2554
2555 * gc.c (scm_gc_sweep): Free the SCM_VELTS of a scm_tc7_contin only
2556 when they are non-NULL.
2557 (scm_gc_mark): Likewise, mark only when non-NULL.
2558
2559 Make dynamic linking work on Dec Unix. (Thanks to Clark McGrew)
2560 * dynl.c: Include "dynl-dl.c" also when HAVE_DLOPEN is defined.
2561
2562 * gc.c (scm_done_malloc): New function.
2563 gc.h (scm_done_malloc): New prototype.
2564
2565 * print.h (SCM_PRINT_STATE_P, SCM_COERCE_OPORT): New macros.
2566 (struct scm_print_state) [revealed]: New field.
2567 (scm_print_state_vtable): Make visible to the outside world for
2568 type checking purposes.
2569 (scm_valid_oport_value_p): New prototype.
2570
2571 * print.c (scm_valid_oport_value_p): New function to check whether
2572 a certain value is acceptable as a port argument.
2573 (scm_print_state_vtable): New variable.
2574 (scm_free_print_state): Set `revealed' field to false.
2575 (scm_iprin1): Call user supplied closure printer with
2576 scm_printer_apply. Print in the traditional way when there isn't
2577 one or when it returns #f.
2578 (scm_prin1, scm_display, scm_write, scm_newline, scm_write_char):
2579 Accept a port/print-state pair in addition to just a port.
2580 (scm_prin1): Don't return the print_state to the pool when it has
2581 been `revealed'.
2582 (scm_printer_apply): Set `revealed' field of print_state to true.
2583 (scm_init_print): Set scm_print_state_vtable.
2584 (print_state_fluid, print_state_fluid_num): Removed.
2585
2586 * throw.h (scm_handle_by_proc_catching_all): New prototype
2587 throw.c (scm_handle_by_proc_catching_all): New function
2588
2589 Mon Sep 29 23:54:09 1997 Jim Blandy <jimb@totoro.red-bean.com>
2590
2591 * Makefile.in: Regenerated with automake 1.2c.
2592
2593 Sun Sep 28 21:35:42 1997 Radey Shouman <shouman@zianet.com>
2594
2595 * ramap.c (scm_array_index_map_x): Fixed for zero-rank arguments,
2596 was looping endlessly.
2597
2598 Sun Sep 28 00:04:29 1997 Jim Blandy <jimb@totoro.red-bean.com>
2599
2600 * strports.c (scm_eval_string): Don't close the port.
2601
2602 * stime.c (bdtime2c): Use SCM_LENGTH, not scm_vector_length; the
2603 former returns a nice normal integer. (Thanks to Daniel
2604 Risacher.)
2605
2606 Sat Sep 27 20:19:34 1997 Jim Blandy <jimb@totoro.red-bean.com>
2607
2608 * Makefile.am (libpath.h): Include the value of the THREAD_LIBS
2609 makefile variable as a build parameter called LIBS. The
2610 build-guile program will use this, for the time being.
2611 * Makefile.in: Regenerated.
2612
2613 Thanks to Shiro Kawai:
2614 * gc.c (scm_gc_mark): Pass NULL to scm_wta as the subroutine name.
2615 * ports.h (scm_ptobfuns): The fgets method returns a char *, not
2616 an SCM.
2617
2618 * Makefile.in: Regenerated with automake 1.2a.
2619
2620 * script.c (scm_compile_shell_switches): If we hit the -c or --
2621 arguments, don't set the car of (command-line) to scm_usage_name,
2622 the prettified name of the guile executable; give it the full
2623 path, the way shells usually handle $0.
2624
2625 Wed Sep 24 22:09:52 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2626
2627 * ramap.c (scm_array_map): Renamed to scm_array_map_x. Removed
2628 Scheme-level name `array-map' and renamed `serial-array-map' to
2629 `serial-array-map!'.
2630
2631 * backtrace.c: Introduced exception handlers which now enclose
2632 `display-error' and `display-backtrace' so that error reporting
2633 won't get into infinite loops if an error occurs during displaying
2634 of the error. This can very easily happen with user supplied
2635 print call-back routines.
2636
2637 Tue Sep 23 12:43:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2638
2639 * ramap.c: Added alias `array-map!' for `array-map'. (Probably,
2640 the names `serial-array-map' and `array-map' should be removed.)
2641
2642 Mon Sep 22 01:21:54 1997 Mikael Djurfeldt <mdj@kenneth>
2643
2644 * init.c (scm_boot_guile_1): Added scm_init_objects ().
2645 Added #include "objects.h"
2646
2647 * eval.c (scm_makprom): Added SCM_DEFER_INTS and SCM_ALLOW_INTS.
2648 Add #include "feature.h".
2649
2650 * Makefile.am (libguile_la_SOURCES): Added objects.c.
2651 (modinclude_HEADERS): Added objects.h.
2652
2653 * ports.h (SCM_EOF_OBJECT_P): New macro predicate.
2654 This test is needed at many places in the code and should be
2655 abstracted. (Motivated by the need of this test in libguiletk.)
2656
2657 * ports.c (scm_eof_object_p), vports.c (sfgetc), strports.c
2658 (scm_eval_string), load.c (scm_primitive_load,
2659 scm_read_and_eval_x), gh_eval.c (gh_eval_str):
2660 Use SCM_EOF_OBJECT_P.
2661
2662 * eval.c (scm_init_eval): Add feature `delay'.
2663
2664 Tue Sep 16 02:12:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2665
2666 * scmhob.h: Removed.
2667
2668 Mon Sep 15 20:42:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2669
2670 * list.h (SCM_LISTn): New macros. Make list creation in C code
2671 prettier. The idea comes from STk.
2672
2673 * sequences.h, sequences.c, append.h, append.c: Removed. These
2674 files implemented non-R4RS operations which would encourage
2675 non-portable programming style and less easy-to-read code.
2676
2677 * Makefile.am (sequences.h, sequences.c, append.h, append.c):
2678 Removed.
2679
2680 * libguile.h, eval.c, init.c, stime.c, unif.c: Removed #include
2681 sequences.h, #include append.h.
2682
2683 * init.c (scm_boot_guile_1): Removed calls to scm_init_append and
2684 scm_init_sequences.
2685
2686 * gh.h, gh_list.c: Renamed gh_list_length --> gh_length.
2687
2688 * list.h, list.c: Renamed scm_list_length --> scm_length, scm
2689
2690 * stime.c (bdtime2c): Changed scm_obj_length --> scm_vector_length.
2691
2692 Sat Sep 13 00:21:41 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2693
2694 * eval.c: Added #include "objects.h"
2695
2696 * tags.h (scm_tc16_object, scm_tc16_entity): Smobtags for objects
2697 and entities.
2698
2699 * smob.c (scm_smob_prehistory): Create two objectsmobs with
2700 adjacent smob numbers.
2701
2702 Thu Sep 11 00:59:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2703
2704 * procprop.h: Added declaration of scm_i_inner_name.
2705
2706 * gsubr.c: New global symbol scm_i_inner_name.
2707
2708 * debug.c (scm_procedure_name): Try procedure property
2709 `inner-name' if `name' fails.
2710
2711 * print.c (scm_iprin1): Use scm_macro_name.
2712
2713 * eval.c (scm_m_define): Give names to macros as well; Only the
2714 first top-level definition gives a procedure/macro a name.
2715 Otherwise confusing names can turn up in backtraces.
2716 (SCM_CEVAL): SCM_IM_DEFINE: Set `inner-name' property instead of
2717 `name'; Give names to macros as well.
2718
2719 * procs.c (scm_closure_p), print.c (scm_iprin1), eval.c
2720 (scm_macro_transformer): Use SCM_CLOSUREP instead of
2721 scm_closure_p.
2722
2723 Wed Sep 10 20:52:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2724
2725 * eval.c (macro?, macro-type, macro-name, macro-transformer): New
2726 procedures;
2727 (prinmacro): Removed. The code has been moved/merged into print.c
2728 in order to decrease code redundancy. We want macros to print in
2729 a way equivalent to procedures, and it would be silly to duplicate
2730 the required code. (We don't want to maintain two places.)
2731 (macrosmob): Print field is now a NULL pointer.
2732
2733 * eval.h (scm_macro_p, scm_macro_type, scm_macro_name,
2734 scm_macro_transformer): New prototypes.
2735 (scm_tc16_macro): Declared.
2736
2737 * print.c (scm_iprin1): Added code for printing of macros. Macros
2738 are now printed in a way equivalent to procedures.
2739
2740 Sat Sep 6 12:20:42 1997 Mikael Djurfeldt <mdj@kenneth>
2741
2742 * procs.h (scm_closure_p): Added declaration.
2743
2744 Fri Sep 5 13:36:14 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2745
2746 * gc.c (scm_gc_mark): Fixed "rogue pointer in heap" message:
2747 Shouldn't pass "heap" as the subr name.
2748
2749 Tue Sep 2 18:14:30 1997 Jim Blandy <jimb@totoro.red-bean.com>
2750
2751 * gh_predicates.c (gh_boolean_p, gh_symbol_p, gh_char_p,
2752 gh_vector_p, gh_pair_p, gh_number_p, gh_string_p, gh_procedure_p,
2753 gh_list_p, gh_inexact_p, gh_exact_p, gh_eq_p, gh_eqv_p,
2754 gh_equal_p): Use SCM_NFALSEP, instead of testing against
2755 SCM_BOOL_T. Any non-false value is true.
2756
2757 Tue Sep 2 00:27:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2758
2759 * symbols.h (scm_builtin_bindings, scm_builtin_weak_bindings,
2760 scm_gensym): Added prototypes.
2761
2762 * symbols.c (scm_gensym): New function. This will speed up
2763 certain types of applications (such as macro systems) which
2764 generate lots of symbols.
2765
2766 Mon Sep 1 22:30:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2767
2768 * numbers.c (logand, logior, logxor): Handle 0 or 1 arguments.
2769
2770 Sat Aug 30 18:56:19 1997 Gary Houston <ghouston@actrix.gen.nz>
2771
2772 * unif.c (scm_shap2ra): tighten the checking of the array dimension
2773 specifier, since (2) or (2 . 3) would cause SEGV.
2774 (scm_transpose_array): more argument checking fixes.
2775
2776 Thu Aug 28 23:48:53 1997 Jim Blandy <jimb@totoro.red-bean.com>
2777
2778 * Makefile.in: Regenerated.
2779
2780 Wed Aug 27 17:44:44 1997 Jim Blandy <jimb@totoro.red-bean.com>
2781
2782 * Makefile.in: Regenerated, so it uses "tar", not "gtar".
2783
2784 Mon Aug 25 13:47:25 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2785
2786 * error.c, error.h (scm_error_callback): Removed (see NEWS).
2787
2788 Sun Aug 24 01:25:35 1997 Mikael Djurfeldt <mdj@kenneth>
2789
2790 * regex-posix.c: If <regex.h> can't be found, try <rxposix.h> or
2791 <rx/rxposix.h>. (This is in order to accomodate for the GNU Rx
2792 library.)
2793
2794 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp, ramap_1,
2795 ramap_2o, scm_array_index_map_x, raeql_1, scm_array_equal_p),
2796 unif.c (scm_vector_set_length_x, scm_uniform_vector_length,
2797 scm_array_p, scm_array_rank, scm_array_dimensions,
2798 scm_enclose_array, scm_array_in_bounds_p, scm_uniform_vector_ref,
2799 scm_cvref, scm_array_set_x, scm_array_contents, scm_array_to_list,
2800 scm_array_prototype): Added case scm_tc7_wvect.
2801
2802 Sat Aug 23 18:45:44 1997 Gary Houston <ghouston@actrix.gen.nz>
2803
2804 * errno.h: prototype for scm_strerror.
2805 * error.c (scm_strerror): new procedure.
2806
2807 Mon Aug 18 14:58:22 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2808
2809 * list.c (scm_list_append_x): Allow non-pair as last argument.
2810 This is consistent with the R4RS append and is probably the
2811 correct behaviour as specified by R2RS. (Thanks to Radey Shouman)
2812
2813 Sat Aug 16 18:42:15 1997 Gary Houston <ghouston@actrix.gen.nz>
2814
2815 * stime.h: prototype for scm_times.
2816 * stime.c (scm_times): new procedure.
2817 * ioext.c (scm_fseek): if the first argument is a file descriptor
2818 call lseek.
2819 (scm_ftell): if the first argument is a file descriptor call lseek
2820 (sic).
2821 * filesys.h: prototypes for scm_open_fdes, scm_fsync.
2822 * filesys.c (scm_chmod): if the first argument is a file descriptor,
2823 call fchmod.
2824 (scm_chown): if the first argument is a port or file descriptor,
2825 call fchown.
2826 (scm_truncate_file): new procedure.
2827 Add DEFER/ALLOW INTS to a few other procedures.
2828 (scm_fsync): new procedure.
2829 (scm_open_fdes): new procedure.
2830 (scm_open): use scm_open_fdes. If mode isn't specified, 666 will
2831 now be used.
2832 (scm_fcntl): the first argument can now be a file descriptor. The
2833 third argument is now optional.
2834
2835 * posix.c (scm_execl, scm_execlp): make the filename argument
2836 compulsory, since omitting it causes SEGV.
2837 (scm_sync): return unspecified instead of #f.
2838 (scm_execle): new procedure.
2839 (environ_list_to_c): new procedure.
2840 (scm_environ): use environ_list_to_c. disable interrupts.
2841 (scm_convert_exec_args): take pos and subr arguments and
2842 improve error checking.
2843
2844 1997-08-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2845
2846 * stacks.c (scm_make_stack), coop-threads.c, mit-pthreads.c
2847 (scm_call_with_new_thread): Bugfix: SCM_WNA should go as third
2848 argument to SCM_ASSERT. Furthermore, the name of the function
2849 should be passed as first argument when signalling
2850 SCM_WNA. (Thanks to Thomas Morgan)
2851
2852 * gsubr.c (scm_gsubr_apply): From Radey Shouman
2853 <shouman@zianet.com>: "The switch in scm_gsubr_apply that
2854 dispatches on the number of actual args has a default case
2855 reporting an internal error. This is a vestige from a version
2856 that mallocated a SCM vector to hold the arguments. In the
2857 current version this check is too late: if it ever happens we will
2858 have already overstepped the bounds of the array.
2859
2860 Also, the patch [...] adds a check for too many actual arguments."
2861
2862 mdj: Removed check for "internal programming error".
2863
2864 Wed Aug 13 15:38:44 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2865
2866 * gh_io.c (gh_write): New function.
2867
2868 * gh_eval.c (catch_with_saved_stack): Removed. Replaced by:
2869 throw.c (scm_internal_stack_catch): New sibling to the other catch
2870 functions. Code moved from gh_eval.c.
2871 throw.h: Added header.
2872 gh_eval.c (gh_eval_str_with_stack_saving_handler): Renamed call to
2873 scm_internal_stack_catch.
2874
2875 Tue Jul 29 01:03:08 1997 Gary Houston <ghouston@actrix.gen.nz>
2876
2877 * ioext.h: fix up prototypes.
2878 * ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
2879 Scheme name is now dup->fdes.
2880 (scm_dup_to_fdes): make the second argument optional and
2881 fold in the functionality of scm_primitive_dup.
2882 (scm_primitive_dup): deleted.
2883
2884 Mon Jul 28 05:24:42 1997 Gary Houston <ghouston@actrix.gen.nz>
2885
2886 * fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
2887 * fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
2888 ultrix are defined. Use setvbuf instead of setbuf.
2889 (scm_setvbuf): new procedure.
2890 (scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
2891 (scm_setfileno): moved from ioext.c.
2892 (scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
2893 (top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.
2894
2895 Sun Jul 27 10:54:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
2896
2897 * fluids.c (scm_fluid_p): New function.
2898 * fluids.h (scm_fluid_p): New prototype.
2899
2900 Sat Jul 26 21:33:37 1997 Marius Vollmer <mvo@zagadka.ping.de>
2901
2902 * print.c (scm_iprin1): Enter printed structures into the print
2903 state as nested data while they are printed.
2904 (print_state_fluid, print_state_fluid_num): New variables.
2905 (scm_init_print): Initialize them.
2906 (scm_iprin): If print_state_fluid carries a print_state, use that
2907 instead of creating a new one.
2908 (scm_printer_apply, apply_stub, struct apply_data): New
2909 definitions to help with calling printer functions written in
2910 Scheme.
2911 * print.h (scm_printer_apply): New prototype.
2912
2913 * struct.c (scm_print_struct): Use scm_printer_apply to call the
2914 user defined struct printer.
2915
2916 * dynwind.c (scm_dowinds): Handle fluids on the wind list.
2917 * fluids.h (scm_internal_with_fluids, scm_with_fluids,
2918 scm_swap_fluids, scm_swap_fluids_reverse): New prototypes.
2919 * fluids.c (scm_internal_with_fluids, scm_with_fluids,
2920 scm_swap_fluids, scm_swap_fluids_reverse): New functions.
2921
2922 Fri Jul 25 12:05:46 1997 Marius Vollmer <mvo@zagadka.ping.de>
2923
2924 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fixed use of
2925 SCM_ASSERT: arg comes before pos.
2926
2927 Fri Jul 25 17:00:38 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2928
2929 * eval.c (scm_apply): Handle the case when a tc7_sybr_2 is applied
2930 to a list of length zero correctly.
2931
2932 Wed Jul 23 16:17:46 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
2933
2934 Supply an `fgets' method for port objects to do fast line i/o.
2935 * ioext.c (scm_read_line): New function.
2936 * genio.c (scm_gen_read_line): New function.
2937 * fports.c (scm_fgets): New function.
2938 (scm_fptob, scm_pipob): Add scm_fgets method.
2939 * ports.c (fgets_void_port, scm_generic_fgets): New functions.
2940 (void_port_ptob): Add void fgets method.
2941 (scm_newptob): Initialize fgets method from ptob struct.
2942 * ports.h (scm_ptobfuns): Add fgets method.
2943 * vports.c (scm_sfptob): Supply generic fgets method.
2944 * strports.c (scm_stptob): Supply generic fgets method.
2945
2946 Mon Jul 21 04:03:42 1997 Gary Houston <ghouston@actrix.gen.nz>
2947
2948 * ioext.h: removed scm_duplicate_port prototype.
2949
2950 * ioext.c (scm_primitive_dup2): return the new file descriptor
2951 instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
2952 is convenient.
2953 (scm_fdopen): bug fix: don't try to make port unbuffered until its
2954 stream has been set.
2955 (scm_duplicate_port): deleted, there's now an implementation in
2956 boot-9.scm.
2957 (scm_primitive_dup2): do nothing if newfd == oldfd.
2958
2959 Sun Jul 20 03:55:49 1997 Gary Houston <ghouston@actrix.gen.nz>
2960
2961 * filesys.c (scm_close): oops, don't call SCM_INUM twice on the
2962 argument.
2963
2964 * ioext.h: new prototypes.
2965 * ioext.c (scm_primitive_dup, scm_primitive_dup2): new procedures.
2966
2967 * fluids.c (next_fluid_num): don't do
2968 SCM_THREAD_CRITICAL_SECTION_START/END unless USE_THREADS is defined.
2969
2970 * ports.h: prototypes too.
2971 * ports.c (scm_mode_bits, scm_port_mode): moved from fports.c.
2972
2973 * fports.h: prototype too.
2974 * fports.c (scm_evict_ports): moved from ioext.c.
2975
2976 Sat Jul 19 04:56:52 1997 Gary Houston <ghouston@actrix.gen.nz>
2977
2978 * ports.c (scm_close_port): return a boolean instead of unspecified.
2979 throw an error if an error other than EBADF occurs.
2980
2981 * filesys.h: scm_close prototype.
2982 * filesys.c (scm_close): new procedure, can close file descriptors
2983 and ports (scsh compatible).
2984
2985 * ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
2986 optional argument.
2987
2988 Fri Jul 18 11:19:53 1997 Marius Vollmer <mvo@zagadka.ping.de>
2989
2990 * fluids.c, fluid.h: New files.
2991 * Makefile.am (libguile_la_SOURCES): Added "fluids.c".
2992 (modinclude_HEADERS): Added "fluids.h"
2993
2994 * init.c: Include "fluids.h". (scm_boot_guile_1): Added call to
2995 scm_init_fluids to initialize the fluid machine.
2996 (scm_start_stack): Initialize the fluids of the first root with
2997 scm_make_initial_fluids.
2998
2999 * root.h: Added "fluids" member to scm_root_state.
3000 * root.c: Include "fluids.h". (scm_mark_root): Mark "fluids".
3001 (scm_make_root): Call scm_copy_fluids to make fluid bindings
3002 unique for the new root when it has a parent.
3003
3004 * smob.h: Include "libguile/print.h" to make scm_print_state
3005 visible.
3006
3007 * dynl.c (free_dynl_obj): New function to free the dynamic object
3008 data. (dynl_smob): Use it.
3009 * dynl.c (scm_dynamic_link): Moved allocating of the memory for
3010 the dynamic object data below the linking of the object to avoid
3011 memory leak when the linking code throws an error. Now the code
3012 leaks a whole dynamically linked library when must_malloc throws,
3013 but that should be much less likely.
3014
3015 Fri Jul 11 00:19:47 1997 Jim Blandy <jimb@floss.red-bean.com>
3016
3017 Changes to compile under gnu-win32, from Marcus Daniels:
3018 * stime.c (tzset): If tzset isn't provided, make it a NOP.
3019 (scm_localtime): Change SCM_EOF to SCM_EOL.
3020 (scm_mktime): Likewise.
3021 * socket.c: Don't include sys/un.h unless autoconf tells
3022 us Unix domain sockets are available.
3023 (scm_fill_sockaddr): Ignore Unix domain code.
3024 (scm_addr_vector): Likewise.
3025 (scm_init_addr_buffer): Likewise.
3026 (scm_socketpair): Don't include unless socketpair was
3027 found during autoconf.
3028 * simpos.c (SYSTNAME): Treat cygwin like Unix.
3029 * scmsigs.c (scm_pause): Don't include unless pause was found
3030 during autoconf.
3031 * posix.c (scm_getgroups): Don't include unless support function
3032 was found during autoconf (in this case, getgroups).
3033 (scm_setpwent): For setpwent.
3034 (scm_setegid): For setegid.
3035 * net_db.c (scm_inet_netof): Don't include unless support
3036 function was found during autoconf (in this case, inet_netof).
3037 (scm_lnaof): For inet_lnaof.
3038 (scm_inet_makeaddr): For inet_makeaddr.
3039 (scm_getnet): For getnetent, getnetbyname, getnetbyaddr.
3040 (scm_getproto): For getprotoent.
3041 (scm_getserv): For getservent.
3042 (scm_sethost): For sethostent, endhostent.
3043 (scm_setnet): For setnetent, endnetent.
3044 (scm_setproto): For setprotoent, endprotoent.
3045 (scm_setserv): For setservent, endservent.
3046 * scmconfig.h.in: Regenerated.
3047
3048 Thu Jul 10 00:22:24 1997 Jim Blandy <jimb@floss.red-bean.com>
3049
3050 * stime.c (scm_localtime, scm_mktime): Pass SCM_EOL to
3051 scm_misc_error, not SCM_EOF.
3052
3053 * error.c (scm_wta): Pass SCM_EOL to scm_misc_error as the list of
3054 arguments for formatting the error message, not SCM_BOOL_F. I
3055 think this is left over from the (eq? '() #f) days.
3056
3057 * read.c (recsexpr): Give this a dummy definition if
3058 DEBUG_EXTENSIONS isn't #defined.
3059
3060 Fri Jul 4 23:42:17 1997 Marius Vollmer <mvo@zagadka.ping.de>
3061
3062 * coop-threads.c (scm_wait_condition_variable): Lock mutex again
3063 after waiting.
3064
3065 Thu Jul 3 16:31:24 1997 Marius Vollmer <mvo@zagadka.ping.de>
3066
3067 * root.c (cwdr_outer_body): Bugfix: Pass `c' instead of `&c' to
3068 scm_internal_catch.
3069
3070 Sat Jun 28 16:14:09 1997 Tim Pierce <twp@twp.tezcat.com>
3071
3072 * Makefile.am (libguile_la_LIBADD): Remove @ALLOCA@, since
3073 alloca.lo will be included in @LIBLOBJS@. Something better than
3074 this should be possible.
3075 * Makefile.in: Regenerated.
3076
3077 Sat Jun 28 03:40:15 1997 Gary Houston <ghouston@actrix.gen.nz>
3078
3079 * simpos.h: prototype for scm_primitive_exit.
3080 * simpos.c (scm_primitive_exit): new procedure, terminates the
3081 process without unwinding the stack.
3082
3083 Sat Jun 28 03:45:25 1997 Tim Pierce <twp@twp.tezcat.com>
3084
3085 * regex-posix.c (scm_make_regexp): Make `flags' a variable-length
3086 argument and logior its components together, so the user doesn't
3087 have to do this explicitly. Also, if regexp/basic is supplied, then
3088 turn off REG_EXTENDED.
3089 (scm_init_regex_posix): New regexp/basic symbol.
3090 (REG_BASIC): #define this if it is not already present.
3091
3092 Fri Jun 27 20:36:35 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
3093
3094 * Makefile.am (libguile_la_LIBADD): Include @ALLOCA@.
3095 (MOSTLYCLEANFILES): New target, changed from CLEANFILES.
3096 (CLEANFILES): New target, clean versiondat.h, libpath.h.
3097 (DISTCLEANFILES): New target, clean *.x.
3098 * Makefile.in: Regenerated.
3099
3100 Tue Jun 24 00:29:07 1997 Jim Blandy <jimb@floss.red-bean.com>
3101
3102 * script.c (scm_compile_shell_switches): Add 1997 to copyright
3103 years in usage message.
3104
3105 * Makefile.am (libguile_la_LDFLAGS): Bump library version.
3106 * Makefile.in: Regenerated.
3107
3108 * regex-posix.c (scm_init_regex_posix): Delete the regexp/nosub
3109 flag; I don't think we support it.
3110 (scm_make_regexp): Make sure the user doesn't pass the
3111 regexp/nosub flag.
3112
3113 * regex-posix.c (scm_make_regexp, scm_regexp_exec): Add optional
3114 FLAGS arguments.
3115 (scm_init_regex_posix): Define constants for the REG_mumble flags;
3116 name them according to the SCSH convention: regexp/mumble.
3117
3118 * regex-posix.h (scm_make_regexp, scm_regexp_exec): Update prototypes.
3119
3120 Mon Jun 23 18:44:49 1997 Jim Blandy <jimb@floss.red-bean.com>
3121
3122 * Makefile.am (libpath.h): Include the values of all the standard
3123 Makefile directory variables. Print a message, but don't print
3124 all the commands.
3125 (versiondat.h): Print a message, but don't print all the commands.
3126 * load.c: #include "alist.h".
3127 (init_build_info): New function.
3128 (scm_init_load): Call it.
3129 * Makefile.in: Regenerated.
3130
3131 Sun Jun 22 19:12:58 1997 Jim Blandy <jimb@floss.red-bean.com>
3132
3133 * root.c: Establish a reliable catch-all handler for the new root.
3134 After all the Scheme handler function might signal an error too,
3135 and we don't want to lose that.
3136 (cwdr_inner_body): Renamed from cwdr_body.
3137 (cwdr_outer_body): New function, to establish the user's handler,
3138 and pass control to cwdr_inner_body.
3139 (cwdr): Establish the reliable catch-all handler here, and pass
3140 control to cwdr_outer_body.
3141 (struct cwdr_body_data): New field, handler, to allow cwdr to pass
3142 the user's handler through to cwdr_outer_body.
3143 * throw.c (scm_handle_by_message): Move guts into....
3144 (handler_message): New static function.
3145 (scm_handle_by_message_noexit): New function.
3146 * throw.h (scm_handle_by_message_noexit): New prototype.
3147
3148 * __scm.h: (SCM_FENCE): New macro: optimizer will not move code
3149 across this. Only works on GCC. Otherwise, we hope for the best.
3150 (SCM_DEFER_INTS, SCM_ALLOW_INTS): Use FENCE appropriately. I have
3151 the feeling that real thread systems will not need this...
3152
3153 Sun Jun 22 15:46:35 1997 Jim Blandy <jimb@floss.red-bean.com>
3154
3155 Try to detect when people are using one version of libguile and a
3156 different version of ice-9. People have been skewing things and
3157 sending in bug reports.
3158 * Makefile.am (versiondat.h): New file to generate.
3159 * version.c: #include "versiondat.h", to get version info.
3160 (scm_libguile_config_stamp): New function.
3161 * script.c: #include "version.h".
3162 (scm_compile_switches): Call scm_version to get version number.
3163 * scmconfig.h.in, Makefile.in: Regenerated.
3164 * Makefile.in: Regenerated.
3165
3166 * Makefile.am (ETAGS_ARGS): Catch SCM_PROC, etc. so we can find
3167 primitive definitions under their Scheme names.
3168
3169 * Makefile.am (libguile_la_LDFLAGS): Update library version to
3170 1:2. Helps avoid confusion between installed and uninstalled libs.
3171
3172 * scmconfig.h.in: Regenerated. (Needed after June 3 change to
3173 ../configure.in.)
3174
3175 * gdb_interface.h (GDB_INTERFACE): Remove semicolon and trailing
3176 backslash from definition; this should be used like: GDB_INTERFACE;
3177
3178 Sun Jun 22 04:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
3179
3180 * ioext.c (scm_duplicate_port): bug fix: don't try to make the
3181 new port unbuffered until its stream has been set.
3182
3183 Sat Jun 21 18:44:03 1997 Gary Houston <ghouston@actrix.gen.nz>
3184
3185 * ports.h: new prototype.
3186 * ports.c (scm_flush_all_ports): new procedure, scsh compatible.
3187
3188 Sat Jun 21 00:25:03 1997 Jim Blandy <jimb@floss.red-bean.com>
3189
3190 Make things compile neatly under Sun's C compiler.
3191 * dynl.c (scm_dynamic_func): Cast return value from sysdep_dynl_func.
3192 * extchrs.c (xmbtowc): Make the second arg a normal char, not
3193 unsigned, because that's what the ANSI function takes.
3194 * extchrs.h (xmbtowc): Corresponding change to prototype.
3195 * genio.c (scm_gen_getc): Make buf plain chars. Nobody wants
3196 uchars here.
3197 * mbstrings.c (scm_mb_ilength): Use ANSI arg syntax. Make DATA
3198 argument plain char *.
3199 * strings.c (scm_string): Use SCM_ROCHARS, since c is a plain
3200 char.
3201 * tag.c (scm_tag): Remove unreachable statement.
3202 * unif.c (scm_array_to_list): If we want to shift a 1 bit to the
3203 top of the word, it should be unsigned.
3204
3205 * eval.c (scm_lookupcar1): Don't declare var2 unless USE_THREADS
3206 is defined, to avoid warnings; it's only used in the
3207 conflict-checking code. Which might go away anyway.
3208 (SCM_CEVAL): All goto's targeting the `dispatch' label are in
3209 conditionals; put the label definition in an #if too, to stifle
3210 warnings.
3211
3212 * Makefile.am (EXTRA_DIST): Include ChangeLog-gh and
3213 ChangeLog-threads in the distribution.
3214 * Makefile.in: Regenerated.
3215
3216 Fri Jun 20 10:03:41 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
3217
3218 * guile-snarf.in: Changed regexp to support CPPs that insert
3219 whitespace between lexical tokens (which munges the `%%%' snarf
3220 cookie).
3221
3222 Tue Jun 17 13:49:56 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
3223
3224 * load.c (scm_init_load_path): Append $(datadir)/guile to
3225 %load-path, so modules do not have to be installed in Guile's
3226 current version directory.
3227
3228 Mon Jun 16 17:20:55 1997 Marius Vollmer <mvo@zagadka.ping.de>
3229
3230 * dynl.c (scm_dynamic_call, scm_dynamic_args_call): Wrap dynamic
3231 function call in SCM_DEFER_INTS/SCM_ALLOW_INTS.
3232 (scm_dynamic_link, scm_dynamic_unlink, scm_dynamic_func): Always
3233 call the sysdep functions with deferred ints.
3234 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c (sysdep_dynl_link,
3235 sysdep_dynl_unlink, sysdep_dynl_func): Expect to be called with
3236 deferred interrupts and insert SCM_ALLOW_INTS before throwing an
3237 error.
3238
3239 * dynl.c (scm_dynamic_unlink, scm_dynamic_call): Return
3240 SCM_UNSPECIFIED.
3241
3242 Sat Jun 14 19:00:58 1997 Gary Houston <ghouston@actrix.gen.nz>
3243
3244 * scmsigs.c (sys_deliver_signals): add a comment about a probable bug.
3245
3246 Wed Jun 11 00:33:00 1997 Jim Blandy <jimb@floss.red-bean.com>
3247
3248 * Makefile.in: Regenerated after xtra_PLUGIN_guile_libs change in
3249 ../configure.in.
3250
3251 Sun Jun 8 14:37:26 1997 Marius Vollmer <mvo@zagadka.ping.de>
3252
3253 * eval.c (scm_lookupcar1): New procedure to cope with a race
3254 condition during lookup (when using threads).
3255 (scm_lookupcar): Implement in terms of scm_lookupcar1.
3256 (SCM_CEVAL): Use scm_lookupcar1 instead of scm_lookupcar in one
3257 place.
3258
3259 Fri Jun 6 19:05:07 1997 Jim Blandy <jimb@totoro.cyclic.com>
3260
3261 * regex-posix.c (scm_regexp_exec): Use the `start' argument if
3262 supplied. (Change from Tim Pierce.)
3263
3264 Thu Jun 5 16:38:19 1997 Marius Vollmer <mvo@zagadka.ping.de>
3265
3266 * struct.c (init_struct): Forget to mention this in the "Wed Jun 4
3267 23:47:01 1997" changelog: Slots are now initialized with `#f' by
3268 default and not `()'. `#f' is the canonical non-value in Scheme,
3269 right?
3270
3271 Wed Jun 4 23:47:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
3272
3273 * struct.c (struct_printer): New variable that holds a handle on
3274 the Scheme variable *struct-printer*. This variable can be set by
3275 Scheme code to override the printing of structures.
3276 (scm_print_struct): If struct_printer is set, call it. If it is
3277 not set, or returns #f, print the structure in the old fashion.
3278 Include "eval.h" for scm_apply.
3279
3280 Tue Jun 3 23:01:39 1997 Marius Vollmer <mvo@zagadka.ping.de>
3281
3282 * struct.c (scm_struct_ref, scm_struct_set_x): Use
3283 scm_struct_i_n_words to get the number of fields, not
3284 -scm_struct_n_extra_words.
3285
3286 On the route to fancier struct printing:
3287 * struct.c (scm_print_struct): New function to print a structure.
3288 Include "genio.h" to support it. This function doesn't do
3289 anything interesting right now, but I think it should be here
3290 anyway.
3291 * struct.h: Include "print.h" and add prototype for
3292 scm_print_struct.
3293 * print.c (scm_iprin1): Call scm_print_struct instead of trying to
3294 print structures ourself.
3295
3296 Sun Jun 1 07:58:41 1997 Gary Houston <ghouston@actrix.gen.nz>
3297
3298 * scmsigs.c (sys_deliver_signals): bug fix: reset got_signal[i]
3299 before applying the handler in case it doesn't return.
3300
3301 Sat May 31 18:57:51 1997 Gary Houston <ghouston@actrix.gen.nz>
3302
3303 * scmsigs.h, async.h: updated.
3304
3305 * _scm.h: if HAVE_RESTARTS is defined then don't use a SYSCALL
3306 loop.
3307
3308 * posix.c (scm_uname): interpret only negative values as an error.
3309 Solaris normally returns a positive value.
3310
3311 * script.c (scm_compile_shell_switches): if we are not going into
3312 an interactive repl, set scm_mask_ints to zero so that asyncs can
3313 run.
3314
3315 * simpos.c (scm_system): don't ignore/unignore signals around
3316 the "system" call.
3317
3318 * posix.c (scm_open_pipe): don't ignore/unignore signals around
3319 the "popen" call.
3320
3321 * init.c (scm_boot_guile_1): don't call scm_init_signals, it's
3322 done in boot-9.scm instead.
3323
3324 * scmsigs.c, async.c: Major rewriting of signal handling code.
3325 (scm_sigaction): new procedure.
3326 (scm_sleep): don't wrap sleep in SCM_SYSCALL, it would mess up the
3327 timing.
3328 (scm_raise): return unspecified, throw error on failure.
3329
3330 Thu May 29 02:47:36 1997 Jim Blandy <jimb@floss.cyclic.com>
3331
3332 * regex-posix.c (scm_init_regex_posix): Register the "regex"
3333 feature, to help boot-9.scm decide whether to import the regex
3334 module.
3335
3336 Thu May 29 02:19:40 1997 Jim Blandy <jimb@floss.cyclic.com>
3337
3338 * eval.c: Include scmconfig.h at the beginning of the file so that
3339 HAVE_ALLOCA_H may properly be defined. Thanks to Bill Janssen for
3340 pointing this out.
3341
3342 * regex-posix.c: #include "_scm.h" before conditionally #including
3343 <regex.h>; the former defines HAVE_REGCOMP.
3344
3345 * regex-posix.c: #include <regex.h> conditionally, so the file is
3346 CPP'able (for dependency scanning) even on systems that don't have
3347 a <regex.h> header.
3348
3349 Tue May 27 23:48:38 1997 Jim Blandy <jimb@floss.cyclic.com>
3350
3351 Add new R4RS-compliant syntax for keywords.
3352 * read.c (scm_lreadr): Recognize `#:' as a prefix for keywords,
3353 regardless of the setting of the `keywords' read option.
3354 * kw.c (prin_kw): Print keywords using the `#:' syntax, so they
3355 can be re-read no matter what the setting of the `keywords' read
3356 option.
3357
3358 Tue May 27 22:47:31 1997 Tim Pierce <twp@twp.tezcat.com>
3359
3360 Add support for POSIX regular expressions.
3361
3362 * regex-posix.c, regex-posix.h: New files. (Some code
3363 is taken liberally from rx/rgx.c in the old Guile dist.)
3364
3365 * init.c: Include regex-posix.h.
3366 (scm_boot_guile_1): Call scm_init_regex_posix.
3367
3368 * Makefile.am (EXTRA_libguile_la_SOURCES, modinclude_HEADERS):
3369 Add regex-posix.[ch] sources.
3370 * Makefile.in: Regenerated.
3371
3372 * scmconfig.h.in: Add HAVE_REGCOMP macro. (automake is supposed
3373 to do this automatically? It didn't for me, bleh.)
3374
3375 Mon May 26 18:51:29 1997 Jim Blandy <jimb@floss.cyclic.com>
3376
3377 * fports.c (print_pipe_port): New function.
3378 (scm_fptob): Use print_pipe_port instead of scm_prinport; the
3379 latter doesn't even take the right arguments.
3380
3381 * Makefile.am: Increment shared lib revision number. I think
3382 sometimes the uninstalled Guile finds the installed shared lib;
3383 Gord says doing this might help. As things turned out, I can't
3384 say whether it does.
3385 * Makefile.in: Regenerated.
3386
3387 * gh_init.c (gh_enter): Cast c_main_prog to a void * before
3388 passing it as the closure argument to scm_boot_guile. (Bill
3389 Janssen)
3390
3391 * ports.c (print_void_port, putc_void_port, puts_void_port,
3392 write_void_port, flush_void_port, getc_void_port, close_void_port,
3393 noop0): Use ANSI prototypes instead of K&R declarations, so the
3394 initialization of void_port_ptob gets aggressively type-checked.
3395 Fix arguments of print_void_port and write_void_port. (Bill
3396 Janssen)
3397
3398 * COPYING, __scm.h, _scm.h, alist.c, alist.h, append.c, append.h,
3399 appinit.c, arbiters.c, arbiters.h, async.c, async.h, backtrace.c,
3400 backtrace.h, boolean.c, boolean.h, chars.c, chars.h,
3401 continuations.c, continuations.h, coop-defs.h, coop-threads.c,
3402 coop-threads.c.cygnus, coop-threads.h, coop-threads.h.cygnus,
3403 coop.c, debug.c, debug.h, dynl-dl.c, dynl-dld.c, dynl-shl.c,
3404 dynl-vms.c, dynl.c, dynl.h, dynwind.c, dynwind.h, eq.c, eq.h,
3405 error.c, error.h, eval.c, eval.h, extchrs.h, feature.c, feature.h,
3406 filesys.c, filesys.h, fports.c, fports.h, fsu-pthreads.h, gc.c,
3407 gc.h, gdbint.c, gdbint.h, genio.c, genio.h, gh.h, gh_data.c,
3408 gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c, gh_list.c,
3409 gh_predicates.c, gh_test_c.c, gh_test_repl.c, gscm.c, gscm.h,
3410 gsubr.c, gsubr.h, guile.c, hash.c, hash.h, hashtab.c, hashtab.h,
3411 init.c, init.h, ioext.c, ioext.h, kw.c, kw.h, libguile.h, list.c,
3412 list.h, load.c, load.h, mallocs.c, mallocs.h, markers.c,
3413 markers.h, mbstrings.c, mbstrings.h, mit-pthreads.c,
3414 mit-pthreads.h, net_db.c, net_db.h, numbers.c, numbers.h,
3415 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
3416 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
3417 procprop.h, procs.c, procs.h, putenv.c, ramap.c, ramap.h, read.c,
3418 read.h, root.c, root.h, scmhob.h, scmsigs.c, scmsigs.h, script.c,
3419 script.h, sequences.c, sequences.h, simpos.c, simpos.h, smob.c,
3420 smob.h, snarf.h, socket.c, socket.h, srcprop.c, srcprop.h,
3421 stackchk.c, stackchk.h, stacks.c, stacks.h, stime.c, stime.h,
3422 strings.c, strings.h, strop.c, strop.h, strorder.c, strorder.h,
3423 strports.c, strports.h, struct.c, struct.h, symbols.c, symbols.h,
3424 tag.c, tag.h, tags.h, threads.c, threads.h, throw.c, throw.h,
3425 unif.c, unif.h, variable.c, variable.h, vectors.c, vectors.h,
3426 version.c, version.h, vports.c, vports.h, weaks.c, weaks.h: New
3427 address for FSF.
3428
3429 Mon May 26 12:37:30 1997 Jim Blandy <jimb@floss.cyclic.com>
3430
3431 * script.c (scm_find_executable): Use prototype-style definition
3432 here; apparently it's not quite right to have const in a prototype
3433 and then use a K&R declaration. I wonder if stuff like this will
3434 go away if we compile with -Wrequire-prototypes, or whatever that
3435 is... (Bernard URBAN)
3436
3437 * scmhob.h: New text from Bernard URBAN.
3438
3439 Sat May 17 17:14:36 1997 Jim Blandy <jimb@floss.cyclic.com>
3440
3441 * script.c: Don't #define const on hpux. Configure takes care of
3442 this. (Thanks to Larry Schwimmer.)
3443
3444 * script.c: Use the HAVE_UNISTD_H symbol provided by autoconf to
3445 decide whether to #include <unistd.h>, instead of listing a bunch
3446 of systems. Don't #include stdio twice. Removed dyked-out
3447 definition of scm_find_impl_file.
3448
3449 Fri May 16 03:06:08 1997 Jim Blandy <jimb@floss.cyclic.com>
3450
3451 * Makefile.am (libguile_la_LDFLAGS): Update libguile's shared
3452 library version info to 1:0.
3453 * Makefile.in: Regenerated.
3454
3455 * backtrace.c, backtrace.h, debug.c, debug.h, eq.c,
3456 gdb_interface.h, gdbint.c, gdbint.h, gh_data.c, gh_init.c,
3457 gh_io.c, gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c,
3458 init.c, net_db.c, options.c, options.h, ports.c, print.c, read.c,
3459 script.h, snarf.h, srcprop.c, srcprop.h, stacks.c, stacks.h,
3460 throw.c: Update copyright years; these files have been worked on
3461 significantly in 1997, but only had copyright years for 1996.
3462 Also, change name of copyright holder on some from Mikael
3463 Djurfeldt to Free Software Foundation; he has signed papers
3464 assigning the changes to the FSF.
3465
3466 * script.c (scm_shell_usage): Pass FATAL to exit. There's no
3467 reason not to give the user the option.
3468
3469 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
3470 Return #f on end-of-file when scanning table (i.e. when called
3471 with no arguments). Try to catch errors, when we can.
3472 * posix.c (scm_getgrgid, scm_getpwuid): Same.
3473
3474 * script.h (scm_shell_usage, scm_compile_shell_switches): New
3475 external declarations. These are useful.
3476
3477 Thu May 15 05:21:36 1997 Gary Houston <ghouston@actrix.gen.nz>
3478
3479 * posix.c: don't include <sys/select.h> or define macros for
3480 select, since they were not used in this file.
3481
3482 * filesys.c (scm_select): make the fifth parameter microseconds,
3483 not milliseconds. let the fourth parameter be either a real value
3484 or an integer or #f. The first, second and third arguments can
3485 now be vectors: the type of the corresponding return set will be
3486 the same.
3487 (set_element, get_element): new static procedures.
3488
3489 Wed May 14 12:18:12 1997 Jim Blandy <jimb@floss.cyclic.com>
3490
3491 * strports.c (scm_eval_string): New function.
3492 (scm_eval_0str): Trivially re-implemented in terms of
3493 scm_eval_string.
3494 * strports.h (scm_eval_string): New extern decl.
3495
3496 * net_db.c (h_errno): Add extern decl for this.
3497
3498 * fports.c (local_pclose): New function.
3499 (scm_pipob): Use it in the initializer here.
3500
3501 From Tim Pierce:
3502 * net_db.c (scm_gethost, scm_getproto, scm_getnet, scm_getserv):
3503 Use a meaningful error message when signalling an error. For
3504 this, scm_gethost must check h_errno rather than errno.
3505
3506 Tue May 13 16:40:06 1997 Jim Blandy <jimb@floss.cyclic.com>
3507
3508 * Makefile.in: Regenerated, using automake-1.1p.
3509
3510 Tue May 13 04:34:52 1997 Gary Houston <ghouston@actrix.gen.nz>
3511
3512 * socket.c (scm_addr_vector): use SCM_UNDEFINED in scm_listify,
3513 not SCM_UNSPECIFIED.
3514
3515 * script.c (scm_compile_shell_switches): don't append (quit) if
3516 interactive.
3517 (scm_shell): call scm_exit_status and exit on the result of the
3518 evaluation.
3519
3520 Mon May 12 17:23:58 1997 Jim Blandy <jimb@floss.cyclic.com>
3521
3522 Ensure that shared substrings are handled properly when passed to
3523 a system call or other foreign function. Many thanks to Tim
3524 Pierce!
3525 * symbols.h (SCM_COERCE_SUBSTR): new macro.
3526 * filesys.c (scm_chmod, scm_rename, scm_delete_file, scm_mkdir,
3527 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
3528 scm_lstat), ports.c (scm_sys_make_void_port), posix.c (scm_utime,
3529 scm_putenv, scm_setlocale, scm_mknod), stime.c (setzone,
3530 scm_strftime), vports.c (scm_make_soft_port), backtrace.c
3531 (scm_display_error_message): use RO macros when strings may be RO.
3532 * error.c (scm_error_scm), filesys.c (scm_chown, scm_chmod,
3533 scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir,
3534 scm_chdir, scm_symlink, scm_readlink, scm_lstat), ioext.c
3535 (scm_freopen, scm_duplicate_port, scm_fdopen), net_db.c
3536 (scm_gethost, scm_getnet, scm_getproto, scm_getserv), ports.c
3537 (scm_sys_make_void_port), posix.c (scm_getgrgid, scm_utime,
3538 scm_setlocale, scm_mknod), stime.c (setzone, scm_strptime,
3539 scm_strftime), vports.c (scm_make_soft_port): use
3540 SCM_COERCE_SUBSTR to make sure shared substrings are
3541 null-terminated.
3542
3543 Mon May 12 15:33:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
3544
3545 * error.c (scm_error): Add newline to error message.
3546
3547 * init.c (scm_init_standard_ports): Doc fix.
3548
3549 Thu May 8 14:38:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
3550
3551 * dynl-shl.c: Completely replaced with new code from Bernard
3552 URBAN.
3553
3554 * script.c (scm_ice_9_already_loaded): New variable.
3555 (scm_compile_shell_switches): Use it.
3556
3557 Mon May 5 20:35:08 1997 Gary Houston <ghouston@actrix.gen.nz>
3558
3559 * filesys.c (scm_input_waiting_p): add missing third argument to
3560 scm_misc_error.
3561
3562 * stime.c (scm_localtime): copy the result of localtime before
3563 calling gmtime in case they share a buffer.
3564 (scm_localtime, scm_mktime): throw an error if neither HAVE_TM_ZONE
3565 nor HAVE_TZNAME.
3566
3567 Fri May 2 19:07:11 1997 Gary Houston <ghouston@actrix.gen.nz>
3568
3569 * eq.c (scm_equal_p): use SCM_TYP7SD (y) not SCM_TYP7SD (x).
3570
3571 Thu May 1 17:01:45 1997 Jim Blandy <jimb@floss.cyclic.com>
3572
3573 * Makefile.am (check-local): New target, which causes 'make check'
3574 to run gh_test_c and gh_test_repl, with some trivial input.
3575 * Makefile.in: Rgnrtd.
3576
3577 Tue Apr 29 19:00:40 1997 Marius Vollmer <mvo@zagadka.ping.de>
3578
3579 * dynl.c (print_dynl_obj): Indicate whether the dynamic object has
3580 been unlinked.
3581
3582 Mon Apr 28 06:10:14 1997 Gary Houston <ghouston@actrix.gen.nz>
3583
3584 * async.c (scm_sys_tick_async_thunk): commented out. I'm not
3585 sure how this was supposed to work.
3586 (scm_async_click): don't send SCM_TICK_SIGNAL.
3587 (scm_init_async): don't initialize %tick-thunk.
3588
3589 * the following change doesn't affect the Scheme interface:
3590 gc-thunk is called at the end of garbage collection. however it's
3591 no longer implemented by pretending it's a signal.
3592
3593 * gc.c (scm_gc_end): don't call scm_take_signal. instead mark the
3594 system async corresponding to scm_gc_thunk.
3595 * async.h: declare scm_gc_async.
3596 * async.c (scm_sys_gc_async_thunk): apply the thunk named by
3597 gc-thunk directly, instead of going through a signal handler.
3598 (scm_gc_async): new variable, points to the GC system-async.
3599 (scm_init_async): save the GC async as scm_gc_async instead
3600 of using system_signal_asyncs.
3601 (scm_gc_vcell): new variable, stores the gc-thunk vcell.
3602
3603 Mon Apr 28 19:14:44 1997 Jim Blandy <jimb@floss.cyclic.com>
3604
3605 * Makefile.am (libpath.h, cpp_err_symbols.c, cpp_sig_symbols.c):
3606 Don't screw up if we're interrupted.
3607 * Makefile.in: Regeneradet.
3608
3609 Sun Apr 27 17:57:15 1997 Jim Blandy <jimb@floss.cyclic.com>
3610
3611 * aclocal.m4: Removed; unnecessary, given changes of Apr 24.
3612
3613 * Makefile.am (modincludedir): Use "ice-9" instead of "@module@";
3614 we're not using AM_INIT_GUILE_MODULE any more.
3615 * Makefile.in: Reneregated.
3616
3617 Thu Apr 24 00:41:08 1997 Jim Blandy <jimb@floss.cyclic.com>
3618
3619 Functions for finding variable bindings, grace à Tim Pierce.
3620 * gh_data.c (gh_lookup, gh_module_lookup): New functions.
3621 * gh.h (gh_lookup, gh_module_lookup): New prototypes.
3622
3623 Get 'make dist' to work again.
3624 * Makefile.am (EXTRA_DIST): Remove PLUGIN files.
3625 * Makefile.in: Regenerated, like a surry without a fringe on top.
3626
3627 Changes for reduced Guile distribution: one configure script,
3628 no plugins.
3629 * configure.in, configure: Removed.
3630 * acconfig.h, acinclude.m4: Moved to parent directory, where the
3631 real configure script lives.
3632 * Makefile.in, scmconfig.h.in: Regenerated.
3633
3634 * init.c: #include "script.h", to get prototype for script.c's
3635 init function.
3636
3637 Wed Apr 23 21:25:39 1997 Jim Blandy <jimb@floss.cyclic.com>
3638
3639 * gh_data.c (gh_scm2newstr, gh_symbol2newstr): Use
3640 scm_must_malloc, not raw malloc.
3641
3642 * script.c (scm_compile_shell_switches): Dyke out debugging output
3643 code.
3644
3645 Mon Apr 21 05:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
3646
3647 * eq.c (scm_equal_p): use "SCM_TYP7SD", not "SCM (TYP7SD".
3648
3649 * stime.c: include both <sys/times.h> and <sys/timeb.h> if the
3650 system has them. Hope this is safe. Previously
3651 sys/timeb.h was included if HAVE_FTIME was defined or if
3652 HAVE_SYS_TIMEB_H was defined but HAVE_SYS_TIMES_H was not,
3653 but IRIX iris 5.3 apparently has ftime but not sys/timeb.h.
3654
3655 * ioext.c (scm_setfileno): add missing third argument to
3656 scm_misc_error call.
3657
3658 Sun Apr 20 15:09:31 1997 Jim Blandy <jimb@totoro.cyclic.com>
3659
3660 * eq.c (scm_equal_p): Correctly compare strings of different
3661 varieties. (Thanks to Tim Pierce.)
3662
3663 Sat Apr 19 03:59:02 1997 Jim Blandy <jimb@floss.cyclic.com>
3664
3665 * read.c (skip_scsh_block_comment): SCSH says the !# that ends a
3666 #! block comment must occur on a line all by itself.
3667
3668 Move most of the guts of shell command processing into libguile,
3669 so guile.c can be very small (and eventuallly auto-generated. (I
3670 mean, generated mechanically, not self-generated. Hmm.))
3671 * guile.c, script.c, script.h: New source files.
3672 * init.c (scm_boot_guile_1): Call scm_init_script.
3673 * libguile.h: #include "script.h".
3674 * Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
3675 targets, for new executable.
3676 (libguile_la_SOURCES): Mention script.c.
3677 (modinclude_HEADERS): Add script.h.
3678 * configure.in: Always check for -lm, -lsocket, -lnsl, whether or
3679 not dynamic linking is enabled. This is because we're generating
3680 executables now. Move CY_AC_WITH_THREADS call after those, so the
3681 values of cy_cv_threads_libs captures the libs chosen above.
3682 * Makefile.in, configure, aclocal.m4: Regenerated.
3683
3684 * Makefile.am (EXTRA_DIST): Don't distribute gscm.c or gscm.h.
3685 We don't maintain this interface any more, and it just confuses
3686 people.
3687
3688 * alloca.c: #include <scmconfig.h>, not <config.h>.
3689 * Makefile.am (EXTRA_libguile_la_SOURCES): Mention alloca.c, so
3690 it'll get included in disties.
3691
3692 Thu Apr 17 17:45:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
3693
3694 * gscm.c, gscm.h: These aren't supported any more, and shouldn't
3695 be distributed, because they confuse people.
3696 * Makefile.am (EXTRA_DIST): Remove gscm.c, gscm.h.
3697
3698 Sat Apr 19 11:56:18 1997 Tim Pierce <twp@twp.tezcat.com>
3699
3700 * configure.in: check for presence of gethostent (not present on
3701 OpenBSD by default).
3702 * net_db.c (scm_gethost): Check HAVE_GETHOSTENT.
3703 * configure, scmconfig.h.in: Regenerated.
3704
3705 Wed Apr 16 17:52:38 1997 Jim Blandy <jimb@floss.cyclic.com>
3706
3707 * backtrace.c (scm_backtrace): Split message string across
3708 newlines properly. GCC is more tolerant of this than other
3709 compilers.
3710
3711 Mon Apr 14 20:20:14 1997 Jim Blandy <jimb@floss.cyclic.com>
3712
3713 Merge threads directory into libguile.
3714 * coop-defs.h, coop-threads.c, coop-threads.h, coop.c, threads.c,
3715 threads.h: New source files.
3716 * Makefile.am (EXTRA_libguile_la_SOURCES): Add threads.c.
3717 (noinst_HEADERS): Add coop-threads.c, coop-threads.h, coop.c
3718 here; see comment.
3719 (modinclude_HEADERS): Add threads.h, coop-defs.h.
3720 (EXTRA_DIST): Add fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
3721 coop-threads.c.cygnus, coop-threads.h.cygnus.
3722 * configure.in: If we're using threads, include threads.o in
3723 LIBOBJS.
3724 * _scm.h, libguile.h: threads.h lives in this directory now.
3725 * fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
3726 coop-threads.c.cygnus, coop-threads.h.cygnus: New files, not
3727 currently used, but brought along for information's sake.
3728 * ChangeLog-threads: log from old 'threads' directory.
3729 * Makefile.in, configure: Rebuilt.
3730
3731 Mon Apr 14 20:15:29 1997 Jim Blandy <jimb@totoro.cyclic.com>
3732
3733 * stime.c (scm_mktime): #ifndef HAVE_TM_ZONE, Use lt.tm_zone, not
3734 lt->tm_zone.
3735
3736 Mon Apr 14 01:32:57 1997 Jim Blandy <jimb@floss.cyclic.com>
3737
3738 * gh_init.c (gh_standard_handler): Return SCM_BOOL_F, not garbage.
3739
3740 Merge GH interface library into libguile.
3741 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
3742 gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c: New files.
3743 * Makefile.am (libguile_la_SOURCES): Add gh_data.c, gh_eval.c,
3744 gh_funcs.c, gh_init.c, gh_io.c, gh_list.c, gh_predicates.c. Move
3745 _scm.h to ...
3746 (EXTRA_libguile_la_SOURCES): ... here.
3747 (pkginclude_HEADERS): Add variable, to get gh.h installed.
3748 (THREAD_LIBS, check_ldadd, check_PROGRAMS, gh_test_c_SOURCES,
3749 gh_test_c_LDADD, gh_test_repl_SOURCES, gh_test_repl_LDADD):
3750 New variables, describing how to build the gh test programs.
3751 * configure.in: Check for -lm, -lsocket, -lnsl; we need this to
3752 build the test programs, and we probably should have been linking
3753 libguile.la against them all along, to support AIX shared libs.
3754 Add cflags for threads to CFLAGS; add libs for threads to new
3755 variable THREAD_LIBS, used in Makefile.am.
3756 * ChangeLog-gh: log from old `gh' subdirectory.
3757 * Makefile.in, configure, scmconfig.h.in: Rebuilt.
3758
3759 Sun Apr 13 23:03:55 1997 Jim Blandy <jimb@floss.cyclic.com>
3760
3761 * acconfig.h: Undo change of Apr 9; including the definition of
3762 PACKAGE in the guile headers conflicts with applications' own
3763 definitions.
3764 * scmconfig.h.in: Regenerated.
3765
3766 Fri Apr 11 14:12:13 1997 Jim Blandy <jimb@floss.cyclic.com>
3767
3768 * filesys.c (scm_fcntl): New function from Roland McGrath.
3769 (scm_init_filesys): New symbols for use with fcntl.
3770 * filesys.h: Added prototype.
3771
3772 * eval.c (SCM_APPLY): Set debug apply frame argument list correctly
3773 when PROC is receiving no arguments.
3774
3775 Fri Apr 11 19:39:32 1997 Jim Blandy <jimb@totoro.cyclic.com>
3776
3777 * filesys.c (S_ISSOCK): Define this if it's missing, but we do
3778 have S_IFSOCK. This is the case under Ultrix.
3779
3780 * posix.c (scm_status_exit_val, scm_status_exit_val,
3781 scm_status_term_sig, scm_status_stop_sig): Modified to work with
3782 Ultrix versions of WIFSTOPPED, etc., which assume that their
3783 arguments are lvalues (hmm).
3784
3785 Thu Apr 10 15:10:07 1997 Jim Blandy <jimb@floss.cyclic.com>
3786
3787 * eval.c: Doc fixes.
3788
3789 * throw.c: Doc fixes; rearranged.
3790
3791 * putenv.c: #include "libguile/scmconfig.h", not <config.h>.
3792
3793 Wed Apr 9 18:01:20 1997 Jim Blandy <jimb@floss.cyclic.com>
3794
3795 * acconfig.h: Added entry for PACKAGE.
3796 * scmconfig.h.in: Regenerated.
3797
3798 Changes to work with automake-1.1n, which has better libtool support.
3799 * Makefile.am: Use lib_LTLIBRARIES instead of lib_PROGRAMS.
3800 Use libguile_la_LIBADD instead of libguile_la_LDADD. (What's the
3801 difference here?)
3802 (libguile_la_SOURCES, modinclude_HEADERS, EXTRA_DIST): Format for
3803 readability.
3804 * Makefile.in: Rebuild.
3805
3806 Wed Apr 9 09:08:54 1997 Gary Houston <ghouston@actrix.gen.nz>
3807
3808 * stime.c (scm_mktime): take an optional zone argument.
3809 (scm_localtime): check putenv return value.
3810 (scm_strftime, scm_strptime): moved from posix.c. move #include
3811 sequences.h too.
3812 stime.h, posix.h: update prototypes.
3813 (bdtime2c, setzone, restorezone): new static procedures.
3814 (scm_mktime, scm_strftime): use them.
3815 (scm_strftime): don't call mktime before strftime. Use
3816 filltime for return value.
3817 (filltime): convert NULL zname to #f.
3818 (scm_strptime): return a count of characters consumed, not
3819 the remaining string.
3820
3821 Sun Apr 6 05:44:11 1997 Gary Houston <ghouston@actrix.gen.nz>
3822
3823 * stime.c (scm_localtime): check HAVE_TM_ZONE and HAVE_TZNAME.
3824 (scm_mktime): likewise.
3825 Declare *tzname[].
3826 Uncomment localtime and mktime.
3827
3828 * configure.in: add AC_STRUCT_TIMEZONE.
3829
3830 Sat Apr 5 23:56:40 1997 Gary Houston <ghouston@actrix.gen.nz>
3831
3832 * stime.c (scm_init_stime): don't define ticks/sec.
3833 (scm_gettimeofday): renamed from scm_time_plus_ticks (avoids multiple
3834 return value problem and is still portable.)
3835
3836 Sat Apr 5 17:59:24 1997 Jim Blandy <jimb@floss.cyclic.com>
3837
3838 * cpp_err_symbols.in: Renamed from cpp_err_symbols, to avoid
3839 make's implicit cpp_err_symbols: cpp_err_symbols.c rule.
3840 * cpp_sig_symbols.in: Renamed from cpp_sig_symbols.
3841 * Makefile.am (check_errnos, check_signals, cpp_sig_symbols.c,
3842 cpp_err_symbols.c): Corresponding changes.
3843 * Makefile.in: Regenerated.
3844
3845 Sat Apr 5 02:39:02 1997 Gary Houston <ghouston@actrix.gen.nz>
3846
3847 * posix.c (scm_putenv): don't check HAVE_PUTENV.
3848 * Makefile.am (EXTRA_libguile_la_SOURCES): add putenv.c.
3849 * configure.in: move putenv from AC_CHECK_FUNCS to AC_REPLACE_FUNCS.
3850 * putenv.c: new file, from sh-utils 1.12.
3851
3852 * posix.c (scm_environ): use malloc in place of scm_must_malloc
3853 since allocation isn't for Scheme objects.
3854 (scm_putenv): copy strings before placing in the environment.
3855
3856 * stime.c (scm_current_time): throw an error if time returns -1,
3857 instead of returning #f.
3858 (scm_get_internal_real_time, scm_get_internal_real_time): use
3859 scm_long2num for return value instead of SCM_MAKINUM.
3860
3861 * stime.h: prototypes updated.
3862
3863 * stime.c (scm_time_in_msec): apparently unused, deleted.
3864
3865 Fri Apr 4 08:53:41 1997 Gary Houston <ghouston@actrix.gen.nz>
3866
3867 * configure.in: check for gettimeofday.
3868
3869 * stime.c (scm_time_plus_ticks): new procedure, an scsh interface
3870 which may be more usefully portable than a gettimeofday interface.
3871
3872 Wed Apr 2 17:11:39 1997 Jim Blandy <jimb@totoro.cyclic.com>
3873
3874 * Makefile.am (EXTRA_DIST): It's cpp_err_symbols, not
3875 cpp_err_signals.
3876 * Makefile.in: Regenerated.
3877
3878 Mon Mar 31 03:22:37 1997 Gary Houston <ghouston@actrix.gen.nz>
3879
3880 * stime.c (filltime): recovered static procedure.
3881 (scm_localtime, scm_gmtime, scm_mktime, scm_tzset): recovered from
3882 an earlier Guile.
3883
3884 * posix.h: add prototype for scm_close_pipe, remove prototypes for
3885 scm_open_input_pipe, scm_open_output_pipe, change scm_mknod prototype.
3886
3887 * posix.c (scm_mknod): split the mode argument into type and perms
3888 arguments, like the extra fields returned by stat.
3889
3890 * fports.c (scm_pipob): set the close, free and print procedures.
3891 (scm_close_pipe): new procedure.
3892
3893 * posix.c (scm_open_input_pipe, scm_open_output_pipe): deleted,
3894 define them in boot-9.scm
3895
3896 Wed Mar 26 04:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
3897
3898 * ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELD
3899 wan't defined. Don't include fd.h.
3900
3901 * Previously fd.h was regenerated whenever configure was run,
3902 forcing a couple of files to be recompiled.
3903
3904 * fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c.
3905 * configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER.
3906 Check for _fileno as well as _file.
3907 Don't output fd.h.
3908 * ioext.c: don't fd.h.
3909 * acconfig.h: remove duplicate HAVE_FD_SETTER and change the
3910 other to FD_SETTER.
3911
3912 * Change the stratigy for getting information about errno
3913 (and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of
3914 generating lists of symbols during the build process, which will
3915 not always work, include comprehensive lists in the distribution.
3916 To help keep the lists up to date, the "check_signals" and
3917 "check_errnos" make targets can be used.
3918
3919 * configure.in: don't check for a command to extract errno codes.
3920 * Makefile.am: update file lists, remove errnos.list and errnos.c
3921 targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals,
3922 check_errnos targets.
3923 (CLEANFILES): remove errnos.c and errnos.list, add
3924 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new
3925 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
3926 * errnos.default: deleted.
3927 * cpp_signal.c: new file.
3928 * cpp_errno.c: renamed from errnos_get.c.
3929 * cpp_err_symbols, cpp_sig_symbols: new files.
3930 * cpp_cnvt.awk: renamed from errnos_cnvt_awk.
3931 * error.c (scm_init_error): #include cpp_err_symbols instead of
3932 errnos.c.
3933 * posix.c (scm_init_posix): don't intern signal symbols. #include
3934 cpp_sig_symbols.c.
3935
3936 Tue Mar 25 04:51:10 1997 Gary Houston <ghouston@actrix.gen.nz>
3937
3938 * strop.c (scm_i_index): allow the lower bound to be equal to the
3939 length of the string, so a null string doesn't always give an error.
3940
3941 * posix.h: new prototypes.
3942 * posix.c (scm_status_exit_val, scm_status_term_sig,
3943 scm_status_stop_sig): new functions, as in scsh. They break down
3944 process status values as returned by waitpid.
3945
3946 Sat Mar 22 18:16:29 1997 Gary Houston <ghouston@actrix.gen.nz>
3947
3948 * net_db.c (scm_gethost): don't check HAVE_GETHOSTENT, since
3949 configure doesn't know about it.
3950
3951 Fri Mar 21 23:49:28 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3952
3953 * snarf.h, backtrace.c: Name change SCM_GLOBAL --> SCM_VCELL.
3954
3955 * snarf.h: Added new macros SCM_GLOBAL_SYMBOL and SCM_GLOBAL_VCELL
3956 which defines C variables with global linkage.
3957
3958 Mon Mar 17 05:57:11 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3959
3960 * snarf.h (SCM_PROC1): Bugfix: Use (void) rather than (...) for
3961 zero arg subrs.
3962
3963 Sun Mar 16 11:43:49 1997 Mikael Djurfeldt <mdj@floss.cyclic.com>
3964
3965 * eval.c (safe_setjmp): Temporarily use old setjmp until someone
3966 has time to check why this doesn't work well with continuations.
3967
3968 Sun Mar 16 05:09:55 1997 Jim Blandy <jimb@totoro.cyclic.com>
3969
3970 * Fix shell syntax error; some shells won't tolerate
3971 multiple "fi" statements on a single line. (Thanks to Fred Fish.)
3972
3973 Sat Mar 15 01:11:40 1997 Gary Houston <ghouston@actrix.gen.nz>
3974
3975 * posix.c (scm_uname): throw an error if uname fails instead
3976 of returning errno.
3977
3978 * error.h (scm_errno, scm_perror): obsolete prototypes removed.
3979
3980 * error.c (err_head, scm_errno, scm_perror): obsolete procedures
3981 removed.
3982
3983 * async.c (scm_ints_disabled): definition moved from error.c.
3984
3985 Sat Mar 15 00:06:08 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3986
3987 * acconfig.h: Removed PACKAGE.
3988
3989 * scmconfig.h.in: Regenerated.
3990
3991 * snarf.h: g++ says it's non-portable not to specify the first
3992 argument in a varargs declaration. I introduced the first
3993 argument by using preprocessor conditionals.
3994
3995 Thu Mar 13 21:28:25 1997 Gary Houston <ghouston@actrix.gen.nz>
3996
3997 * ioext.c (scm_read_delimited_x): use RO string macros for delims.
3998 (scm_freopen): use RO string macros for filename and modes.
3999 (scm_duplicate_port, scm_fdopen): use RO string macros for modes.
4000
4001 * posix.c (scm_getgrgid): simplify conversion of name to C string.
4002 (scm_mknod): use RO string macros for path.
4003
4004 * socket.c (scm_fill_sockaddr, scm_send, scm_sendto):
4005 use SCM_ROSTRINGP, SCM_ROCHARS, SCM_ROLENGTH.
4006
4007 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
4008 use SCM_ROSTRINGP and SCM_ROCHARS.
4009
4010 Thu Mar 13 18:31:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4011
4012 * unif.c (scm_array_set_x): Cast ICHR (obj) to char if storing in
4013 a scm_tc7_byvect.
4014
4015 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
4016 scm_array_index_map_x, raeql_1, scm_array_equal_p): Completed
4017 support for byte vectors.
4018
4019 * print.c (scm_iprin1): Limit number of vector elements printed
4020 according to pstate->length.
4021
4022 Thu Mar 13 00:12:35 1997 Gary Houston <ghouston@actrix.gen.nz>
4023
4024 * backtrace.c (scm_display_error_message): don't segv if message
4025 is an immediate.
4026
4027 * error.h: prototype for scm_error_scm.
4028
4029 * error.c (scm_error_scm): new procedure, reimplements scm-error
4030 in C and uses scm_error.
4031
4032 Tue Mar 11 03:51:00 1997 Gary Houston <ghouston@actrix.gen.nz>
4033
4034 * read.c (scm_read_hash_extend): make scm_read_hash_procedures a
4035 pointer to the Scheme variable read-hash-procedures and intern it
4036 in scm_init_read. Modify scm_read_hash_extend and
4037 scm_get_hash_procedure to use the pointer.
4038
4039 Mon Mar 10 06:28:54 1997 Gary Houston <ghouston@actrix.gen.nz>
4040
4041 * read.h (SCM_N_READ_OPTIONS): increase SCM_N_READ_OPTIONS to 4.
4042 (SCM_KEYWORD_STYLE): defined.
4043
4044 * read.c (scm_read_opts): add a keywords option. This isn't a
4045 boolean option, in case someone wants to add support for DSSSL
4046 keywords too.
4047 Setup scm_keyword_prefix symbol.
4048 (scm_lreadr): Only process keywords if SCM_KEYWORD_STYLE is
4049 set to 'prefix.
4050 I've left keyword support disabled by default, since it doesn't
4051 seem to break the module system and it gives R4RS standard behaviour.
4052 It can be reactivated with (read-set! keywords 'prefix).
4053
4054 Sun Mar 9 14:14:39 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4055
4056 * arbiters.c (scm_make_arbiter): Bugfix: Must SCM_DEFER_INTS
4057 before constructing arbiter.
4058
4059 * eval.c (scm_m_define): Bugfix: Check that the object is a
4060 closure before setting the procedure property!
4061
4062 * ports.h: Removed prototype for scm_ungetc_char_ready_p.
4063
4064 * ports.c: Removed `ungetc-char-ready?'.
4065
4066 Sat Mar 8 00:27:05 1997 Gary Houston <ghouston@actrix.gen.nz>
4067
4068 * read.c (scm_init_read): intitialise scm_read_hash_procedures
4069 (idea from Mikael: make it a pair so scm_permanent object only
4070 called once.)
4071 (scm_read_hash_extend): don't call scm_permanent_object.
4072 (ideas from Mikael): if chr is already in the list, replace its
4073 procedure instead of appending it again. If proc is #f, remove
4074 it from the list.
4075 (scm_get_hash_procedure): take CDR of scm_read_hash_procedures.
4076
4077 * strports.c (scm_read_0str, scm_eval_0str): update scm_read usage.
4078
4079 * gdbint.c (gdb_read): update scm_lreadr usage.
4080
4081 * load.h: update prototypes.
4082
4083 * load.c (scm_primitive_load, scm_read_and_eval_x,
4084 scm_primitive_load_path): remove case_insensitive_p, sharp arguments.
4085
4086 * read.h: add prototype for scm_read_hash_extend. Change args for
4087 other prototypes.
4088
4089 * read.c (scm_read_hash_procedures): new variable.
4090 (scm_read_hash_extend): new procedure.
4091 (scm_get_hash_procedure): new procedure.
4092 (scm_lreadr): use scm_get_hash_procedure instead of an argument
4093 for extended # processing.
4094 (scm_read, scm_lreadr, scm_lreadrecparen, scm_lreadparen,
4095 scm_read_token): remove case_i, sharp arguments. Change callers.
4096
4097 Fri Mar 7 08:58:21 1997 Gary Houston <ghouston@actrix.gen.nz>
4098
4099 * read.h (SCM_N_READ_OPTIONS): increase to 3.
4100 (SCM_CASE_INSENSITIVE_P): define.
4101
4102 * read.c: add case-insensitive option to scm_read_opts.
4103 (scm_read_token): use SCM_CASE_INSENSITIVE_P instead of an argument
4104 to determine whether to convert symbol case.
4105 (default_case_i): definition removed.
4106 * read.c (scm_read_token): if case_i, downcase ic before doing
4107 anything with it.
4108
4109 Sat Mar 8 03:49:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4110
4111 * configure.in: Added configuration option `guile-debug'.
4112 Configure with --enable-guile-debug if you want a bunch of extra
4113 functions used for debugging when developing Guile.
4114
4115 * acconfig.h: Added new preprocessor symbol GUILE_DEBUG.
4116
4117 * procs.c (make-cclo): New undocumented debugging procedure: Make
4118 compiled closure with internal procedure PROC and length LENGTH.
4119 Only compiled if GUILE_DEBUG is defined.
4120
4121 * debug.c: Only include `debug-hang' if GUILE_DEBUG is defined.
4122
4123 * print.c: Put #ifdef GUILE_DEBUG around `current-pstate'.
4124
4125 * ports.c: Changed preprocessor symbol DEBUG --> GUILE_DEBUG.
4126
4127 * eval.c (SCM_CEVAL): Added code sections for handling of rpsubrs
4128 with 3 or more args internally to the evaluator.
4129
4130 Fri Mar 7 19:38:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4131
4132 * eval.c (SCM_CEVAL): Added code sections for handling of asubrs
4133 with 3 or more args internally to the evaluator. This is mainly
4134 because we don't want to pass entry and exit points of the
4135 debug support twice, but it also seems to increase the speed of
4136 the evaluator for such calls (e. g. (+ 1 2 3)).
4137
4138 * backtrace.c (scm_display_application): New procedure:
4139 display-application; Set fancy printing parameters individually
4140 for different types of display (backtrace, error, application).
4141 (These should of course be customizable!)
4142
4143 * debug.h (SCM_RESET_DEBUG_MODE): Bugfix: The old code didn't
4144 clear the CHECK-flags.
4145
4146 Thu Mar 6 00:53:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4147
4148 * tags.h, eval.c (iqq): Fixes to comments about SCM_ECONSP.
4149
4150 Wed Mar 5 23:31:21 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4151
4152 * tags.h (SCM_ECONSP, SCM_NECONSP): Bugfix: Discriminate structs
4153 from pairs with a GLOC in the car.
4154
4155 * symbols.c (msymbolize): Bugfix: Also initialize SCM_SYMBOL_HASH,
4156 otherwise `symbol-hash' will behave badly.
4157 (scm_symbol_hash): Bugfix: Must msymbolize if tc7_ssymbol, othwise
4158 we get segmentation fault!
4159
4160 * symbols.c: Added #include "weaks.h". New functions:
4161 `builtin-bindings' and `builtin-weak-bindings'. (These will be
4162 moved to an extraneous library when we split libguile.)
4163
4164 Tue Mar 4 19:50:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4165
4166 * filesys.c (scm_stat): stat now takes fport arguments too as
4167 documented in the manual.
4168
4169 Mon Mar 3 07:11:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4170
4171 * debug.c (scm_single_step): Bugfix: Call continuation with
4172 scm_call_continuation instead of throwing to it.
4173
4174 Mon Mar 3 09:07:56 1997 Gary Houston <ghouston@actrix.gen.nz>
4175
4176 * ports.c (scm_char_ready_p): bug fix: in SCM_PROC char-ready's
4177 argument wasn't declared to be optional.
4178
4179 Sun Mar 2 16:34:40 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4180
4181 * stime.c (scm_init_stime): Add feature "current-time".
4182
4183 Sun Mar 2 06:37:31 1997 Gary Houston <ghouston@actrix.gen.nz>
4184
4185 * throw.h: prototype for scm_exit_status.
4186 * throw.c (scm_handle_by_message): if a 'quit is caught, use its
4187 args to derive an exit status. Allows (quit) to work from a
4188 script.
4189 (scm_exit_status): new function.
4190 #include "eq.h".
4191
4192 Sat Mar 1 00:09:15 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4193
4194 * eval.c (scm_deval): Removed some old code.
4195 (ENTER_APPLY): Bugfix: Reset apply-frame trap on trap as is done
4196 with the others.
4197 (ENTER_APPLY, scm_deval): Reset trace flag on apply-frame and
4198 exit-frame traps.
4199
4200 * symbols.c (msymbolize): Bugfix: Must initialize property list to
4201 SCM_EOL.
4202
4203 * procs.c: Introduce the existent C function scm_thunk_p at the
4204 Scheme level as well.
4205
4206 Wed Feb 26 12:53:58 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4207
4208 * symbols.c, symbols.h (scm_symbol_value0): New function. Can be
4209 used from C to easily lookup the value of a symbol in the current
4210 module.
4211
4212 Tue Feb 25 00:14:10 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4213
4214 * unif.c (scm_init_unif): Added #include "unif.x". (There are two
4215 scm_init_unif in this file. This will also fix a previous problem
4216 with guile-snarf.)
4217
4218 * configure.in: Added AM_MAINTAINER_MODE
4219
4220 Fri Feb 21 23:07:26 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4221
4222 * gdb_interface.h (GDB_INTERFACE): Added some (void *) casts to
4223 avoid warnings.
4224
4225 Fri Feb 21 18:00:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
4226
4227 * Makefile.am (EXTRA_libguile_la_SOURCES): New variable to hold
4228 source files that are not always included in libguile but should
4229 have their dependencies calculated by automake. This variable is
4230 recognized by automake, no further magic is needed.
4231 (libguile_la_DEPENDENCIES): Changed to @LIBLOBJS@. Libtool wants
4232 to deal exclusively with *.lo files, as it seems. The *.o files
4233 are built automatically when the corresponding *.lo file gets
4234 built.
4235
4236 Wed Feb 19 14:04:23 1997 Jim Blandy <jimb@floss.cyclic.com>
4237
4238 * list.h (scm_list_cdr_ref): Delete prototype; function no longer
4239 exists.
4240
4241 Thu Feb 13 21:44:07 1997 Gary Houston <ghouston@actrix.gen.nz>
4242
4243 * unif.c (scm_array_set_x): minor change to argument error checking.
4244
4245 Tue Feb 11 18:19:47 1997 Jim Blandy <jimb@floss.cyclic.com>
4246
4247 * Makefile.am (libguile_la_SOURCES): Remove backtrace.c, debug.c,
4248 inet_aton.c, srcprop.c, stacks.c, and strerror.c from this list.
4249 They should only be included in the library at configure.in's
4250 discretion.
4251 (libguile_la_LDADD): Include the appropriate .lo files here.
4252 (libguile_la_DEPENDENCIES): List the corresponding .o files here,
4253 so we know when to build them (and their .lo bretheren).
4254 * configure.in (LIBLOBJS): New substituted variable. We let
4255 configure decide which .o files to include in LIBOBJS, and then
4256 put the corresponding list of .lo files in LIBLOBJS. The latter
4257 is what we pass to libtool.
4258 * Makefile.in, configure: regenerated.
4259
4260 Mon Feb 10 00:08:08 1997 Mikael Djurfeldt <mdj@kenneth>
4261
4262 * symbols.c (scm_sysintern0): New function. Contains the core of
4263 old scm_sysintern but doesn't take a second value argument.
4264 (scm_sysintern): Now uses scm_sysintern0.
4265 (scm_sysintern_no_module_lookup): Renamed to
4266 scm_sysintern0_no_module_lookup and doesn't take a second value
4267 argument any longer.
4268
4269 * symbols.h (scm_sysintern0: Added declaration.
4270
4271 * options.c (scm_init_opts): Use scm_sysintern0 instead of
4272 scm_sysintern when interning option keys. Otherwise we risk
4273 destroying the values of already interned variables.
4274
4275 * symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
4276 scheme-level boolean (use SCM_NFALSEP).
4277
4278 * backtrace.c (scm_init_backtrace): Make Scheme-level variable
4279 `the-last-stack'.
4280 (scm_backtrace): New function. (C version of old function from
4281 boot-9.scm) Motivation: Make it possible to display backtraces
4282 without depending on boot-9.scm. (I'm uncertain if this
4283 motivation is good enough...)
4284
4285 * root.h (scm_root_state): Add member the_last_stack_var.
4286 (scm_the_stack_var): Defined to scm_root->the_last_stack_var.
4287
4288 * root.c (mark_root): Mark scm_the_last_stack_var.
4289
4290 * init.c (scm_start_stack): Initialize scm_the_last_stack_var to
4291 SCM_BOOL_F.
4292
4293 Sun Feb 9 18:04:41 1997 Mikael Djurfeldt <mdj@kenneth>
4294
4295 * throw.c (mark_lazy_catch, free_lazy_catch): Removed.
4296 1. mark_lazy_catch didn't mark the smob.
4297 2. Both functions above have standard variants:
4298 (lazy_catch_funs): Changed mark_lazy_catch --> scm_mark0,
4299 free_lazy_catch --> scm_free0.
4300
4301 Fri Feb 7 17:30:26 1997 Jim Blandy <jimb@floss.cyclic.com>
4302
4303 * throw.c (scm_internal_lazy_catch): New function.
4304 (scm_lazy_catch): Rewritten to use it.
4305 (scm_ithrow): Handle the new lazy catch representation.
4306 Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
4307 that doesn't have a jmpbuf is a lazy catch clause.
4308 (tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
4309 free_lazy_catch, print_lazy_catch, lazy_catch_funs,
4310 make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
4311 smob.
4312 (scm_init_throw): Register the new lazy-catch smob type.
4313 * throw.h (scm_internal_lazy_catch): decl for new function.
4314
4315 * throw.c (scm_internal_catch): Doc fixes.
4316
4317 * alloca.c: New file, needed to support the AC_FUNC_ALLOCA call in
4318 configure.in. Including this might cause problems if applications
4319 that link against libguile include their own copies of alloca, but
4320 if they're using autoconf, they should be adding libguile to LIBS
4321 before calling AC_FUNC_ALLOCA anyway, in which case they'll find
4322 the copy in libguile, and things will be okay. (I think.)
4323
4324 Thu Feb 6 03:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
4325
4326 * strop.c (scm_string_upcase_x, scm_string_downcase_x): moved from
4327 unif.c.
4328 strop.h: move prototypes too.
4329
4330 Wed Feb 5 08:33:00 1997 Gary Houston <ghouston@actrix.gen.nz>
4331
4332 * posix.c (scm_init_posix): don't intern EINTR since it's now done
4333 elsewhere.
4334
4335 * ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
4336 etc. I deleted them from filesys.c long ago, but didn't
4337 notice they were here too (although ineffective since
4338 sys/stat.h wasn't included).
4339
4340 Tue Feb 4 18:17:50 1997 Tom Tromey <tromey@cygnus.com>
4341
4342 * eval.c: Don't define alloca in GCC case. gcc will automatically
4343 use __builtin_alloca if appropriate.
4344
4345 Tue Feb 4 16:57:40 1997 Jim Blandy <jimb@floss.cyclic.com>
4346
4347 * eval.c (safe_setjmp): New function: trivial wrapper for setjmp.
4348 (SCM_CEVAL, SCM_APPLY): Call it, instead of setjmp, to make sure
4349 that values of automatic variables are preserved. See comments
4350 for safe_setjmp for details.
4351
4352 Change from Thomas Morgan:
4353 * variable.c: Include eq.h.
4354 (var_equal): New function.
4355 (variable_smob): Use var_equal as the discriminator for variables.
4356
4357 * throw.c (s_throw): Remove extraneous declaration.
4358
4359 * configure.in: Call AC_FUNC_ALLOCA, to see if we have alloca.
4360 * eval.c: Add necessary CPP cruft to support that.
4361 * configure, Makefile.in, scmconfig.h.in: regenerated.
4362
4363 Change from Thomas Morgan:
4364 * procprop.c (scm_procedure_properties): Convert the Scheme
4365 boolean returned by scm_procedure_p into a C boolean before using
4366 it as a condition for SCM_ASSERT.
4367 (scm_procedure_property): Likewise.
4368
4369 * simpos.c (SYSTNAME): Accept both 'unix' and '__unix' as
4370 indications of Unixness.
4371 * stime.c: Same.
4372
4373 Tue Feb 4 05:07:35 1997 Gary Houston <ghouston@actrix.gen.nz>
4374
4375 * net_db.c (scm_lnaof): change scheme name from lnaof to inet-lnaof.
4376
4377 Mon Feb 3 06:12:37 1997 Gary Houston <ghouston@actrix.gen.nz>
4378
4379 * read.c (scm_lreadr): use scm_misc_error to improve one of the
4380 "unknown # object" error messages.
4381
4382 * strop.c (scm_i_index, scm_i_rindex): combine into one procedure
4383 (scm_i_index) and declare it static. Add a 'direction' argument
4384 to indicate what way the search should go.
4385 (scm_i_index): throw out-of-range error instead of wrong-type-arg
4386 if indices are bad.
4387 (scm_string_index, scm_string_rindex): adjust usage of scm_i_index.
4388 strop.h: remove scm_i_index, scm_i_rindex prototypes.
4389
4390 Fri Jan 31 04:33:11 1997 Gary Houston <ghouston@actrix.gen.nz>
4391
4392 * ioext.c, ioext.h: remove obsolete _sys_ from 9 procedure names.
4393
4394 * posix.c (scm_fork): Scheme name changed from fork to primitive-fork,
4395 to avoid clash with various scsh forks.
4396
4397 Thu Jan 30 20:14:09 1997 Mikael Djurfeldt <mdj@syk-0606.pdc.kth.se>
4398
4399 The following two changes (ramap.c, throw.c) are motivated by the
4400 apparent unportability of forward declarations of static arrays of
4401 the form `static foo bar[];'.
4402
4403 * ramap.c (scm_array_fill_x): Moved above scm_array_fill_int.
4404 (ra_rpsubrs, ra_asubrs): Moved to the top of array code.
4405
4406 * throw.c (scm_throw): Moved above scm_ithrow.
4407
4408 * options.h: Removed the extern declarations of scm_yes_sym and
4409 scm_no_sym since these are static.
4410
4411 Fri Jan 24 06:16:32 1997 Gary Houston <ghouston@actrix.gen.nz>
4412
4413 * ports.c: add SCM_PROC declarations for pt-size and pt-member.
4414
4415 * Makefile.am: remove AWK=@AWK@.
4416 Add a rule for generating errnos.list.
4417 (CLEANFILES): put errnos.list here instead of in DISTCLEANFILES.
4418
4419 * configure.in: add AC_SUBST(AWK) and AC_SUBST(ERRNO_EXTRACT).
4420 don't extract errnos, just set a variable (avoids the
4421 need to recompile error.c just because configure is run.)
4422
4423 * unif.h: update prototypes.
4424 * unif.c (scm_uniform_array_read,write): change the offset and
4425 length arguments to start and end, for consistency.
4426
4427 * __scm.h: uncomment SCM_ARG6 and SCM_ARG7, I needed SCM_ARG6.
4428
4429 * ioext.h: update prototypes.
4430 * ioext.c (scm_read_delimited_x): replaces scm_read_line and
4431 scm_read_line_x, it's a more general procedure using an
4432 interface from scsh. read-line and read-line! are now defined
4433 in boot-9.scm.
4434 Note that the new read-line trims the terminator
4435 by default, previously it was appended to the returned string. An
4436 optional argument specifies how to process the terminator (scsh
4437 compatible). For the old behaviour: (read-line port 'concat).
4438 scm_read_line, scm_read_line_x: deleted. (read-line port 'split)
4439 returns a pair, but is converted to multiple values if the scsh
4440 module is loaded.
4441
4442 socket.h: update prototypes.
4443 * socket.c (scm_recvfrom): for consistency with other procedures,
4444 take start and end as separate optional arguments.
4445 (scm_recv, scm_recvfrom): don't allow the second argument
4446 to be a size, only a buffer. Change the scheme names to
4447 recv! and recvfrom!. Don't return the buffer.
4448
4449 * ioext.h, posix.h: move prototypes too.
4450 * ioext.c, posix.c (scm_read_line, scm_read_line_x, scm_write_line:
4451 moved back from posix.c to ioext.c. Also move #includes of "genio.h"
4452 "read.h" and "unif.h".
4453 * ioext.c: include "chars.h"
4454
4455 Mon Jan 20 19:54:49 1997 Marius Vollmer <mvo@zagadka.ping.de>
4456
4457 * dynl.c: The dynamic linking and module registration functions
4458 are now defined even when dynamic linking is not available for the
4459 host system. Some of their functionality can be done without
4460 dynamic linking; when it's really needed, they throw errors.
4461
4462 Thu Jan 16 16:39:29 1997 Marius Vollmer <mvo@zagadka.ping.de>
4463
4464 * configure.in: Only define DYNAMIC_LINKING when one of the system
4465 dependent functions is detected.
4466 * dynl.c (scm_dynamic_func): New function to get the address of a
4467 function in a dynamic object.
4468 (scm_dynamic_call, scm_dynamic_args_call): Accept the values
4469 produced by scm_dynamic_func as the thing to call.
4470
4471 Sun Jan 12 21:09:42 1997 Marius Vollmer <mvo@zagadka.ping.de>
4472
4473 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c: Restructured.
4474 (scm_register_module_xxx, scm_registered_modules,
4475 scm_clear_registered_modules): New functions.
4476
4477 Sat Jan 11 21:37:15 1997 Marius Vollmer <mvo@zagadka.ping.de>
4478
4479 * symbols.c (scm_sysintern): Renamed to
4480 scm_sysintern_no_module_lookup.
4481 (scm_sysintern): New function to take the place of the old
4482 scm_sysintern. It uses the current toplevel lookup closure to give
4483 the symbol its value. This is a temporary hack to put packages
4484 like gtcltk into their own module.
4485 (scm_can_use_top_level_lookup_closure_var): New variable to tell
4486 us whether `scm_top_level_lookup_closure_var' has been initialized
4487 and is usable.
4488 * eval.c (scm_init_eval): Set it.
4489
4490 Sat Jan 18 00:03:31 1997 Gary Houston <ghouston@actrix.gen.nz>
4491
4492 * fports.c (scm_open_file): pass errno to scm_syserror_msg.
4493 * filesys.h: update prototypes. Remove macros: SCM_FD_P, SCM_FD_FLAGS,
4494 SCM_FD.
4495 * filesys.c (scm_sys_stat, scm_sys_lstat): pass errno to
4496 scm_syserror_msg.
4497 (scm_sys_read_fd, scm_sys_write_fd, scm_sys_close, scm_sys_lseek,
4498 scm_sys_dup): deleted: FD capability will be added to other
4499 procedures.
4500 Remove support for the FD object type: scm_tc16_fd, scm_fd_print,
4501 scm_fd_free, fd_smob, scm_intern_fd.
4502 (scm_open): renamed from scm_sys_open. Return a port instead of
4503 an FD object. Make the mode argument optional.
4504 (scm_sys_create): deleted, it's just a special case of open.
4505 (scm_init_filesys): move interning of constants O_CREAT etc.,
4506 here (were previously using SCM_CONST_LONG macro).
4507 Add missing constants: O_RDONLY, O_WRONLY, O_RDWR, O_CREAT.
4508 don't newsmob fd.
4509 (numerous _sys_ procedures): remove gratuitous _sys_ from names.
4510 include "fports.h" and <stdio.h>
4511 (scm_stat, scm_select): don't support FD objects.
4512
4513 * error.h: adjust scm_syserror_msg prototype.
4514 * error.c (scm_syserror_msg): take an extra argument for errno.
4515 Using the global value didn't always work, since it could be
4516 reset by procedure calls in the message or args arguments.
4517
4518 * fports.c (scm_setbuf0): call setbuf even if FIONREAD is not defined.
4519 I don't understand why the check was there (and what about the
4520 ultrix check?)
4521
4522 * strop.c (scm_string_copy): allow shared substrings to be copied.
4523
4524 * unif.h: corresponding change to prototypes.
4525 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write_x):
4526 recognize two new optional arguments: offset and length. Allow
4527 the port argument to be an integer (file descriptor, for scsh).
4528 Include <unistd.h> for "read" prototype.
4529
4530 Tue Jan 14 02:42:02 1997 Gary Houston <ghouston@actrix.gen.nz>
4531
4532 * socket.c: don't include filesys.h.
4533
4534 Mon Jan 13 03:47:04 1997 Gary Houston <ghouston@actrix.gen.nz>
4535
4536 * Makefile.am: add AWK=@AWK@ (?)
4537
4538 * Makefile.am (EXTRA_DIST): add errnos_cnvt.awk, errnos.default,
4539 errnos_get.c.
4540 Add a rule to generate errnos.c from errnos.
4541 * error.c (scm_init_error): include errnos.c.
4542 * errnos_cnvt.awk: new file, converts the list of errno codes to
4543 C expressions.
4544 * errnos_get.c: new file.
4545 * errnos.default: new file, contains errnos to try if they can't
4546 be extracted from errno.h.
4547 * configure.in: if using GCC, try and extract errno codes from
4548 errno.h.
4549 Added AC_PROG_AWK.
4550
4551 Sat Jan 11 14:47:00 1997 Marius Vollmer <mvo@zagadka.ping.de>
4552
4553 * configure.in: Replaced AC_PROG_RANLIB with AM_PROG_LIBTOOL.
4554 * Makefile.am: Made libguile into a libtool library.
4555 * PLUGIN/guile.config: Removed "-L ../libguile" from xtra_cflags.
4556 Set libtool_libs to indicate that libguile is a libtool library.
4557 See guile/ChangeLog for details.
4558 * .cvsignore: ignore "*.lo", the libtool library objects.
4559
4560 Wed Jan 8 06:54:54 1997 Gary Houston <ghouston@actrix.gen.nz>
4561
4562 * net_db.c (scm_getserv): add missing SCM_ALLOW_INTS.
4563 use htons in getservbyport argument.
4564
4565 Tue Jan 7 18:11:24 1997 Jim Blandy <jimb@floss.cyclic.com>
4566
4567 * ports.h (SCM_PTOBNUM): Removed extraneous semicolon.
4568 * smob.h: (SCM_PTOBNUM): Removed entirely; this definition is a
4569 duplicate.
4570
4571 * objprop.c (scm_object_property): No need to take the CDR of the
4572 value returned by scm_object_properties, since Aug 20 change.
4573
4574 * configure.in: When checking for struct linger, #include
4575 <sys/types.h> as well as <sys/socket.h>. I've never known
4576 <sys/types.h> to cause any portability problems, and Solaris's
4577 <sys/socket.h> needs it.
4578 * configure: Rebuilt.
4579
4580 I think the Sun compiler has chosen a perverse way to interpret
4581 ANSI declarations combined with K&R definitions. We'll
4582 appease it a little bit. But when it invades France, we fight.
4583 * print.c (scm_iprlist): Change 'tlr' argument to an int.
4584 * print.h (scm_iprlist): Here too.
4585 * numbers.c (scm_divbigdig): Change definition to match
4586 declaration in numbers.h.
4587 * unif.c (scm_makflo): Change definition to match declaration in
4588 unif.h.
4589
4590 * init.c (scm_boot_guile): Don't return the value of
4591 scm_boot_guile_1. This function doesn't return a value;
4592 scm_boot_guile_1 doesn't return a value (or return at all).
4593
4594 * eval.c (unmemocopy): Add a semicolon to appease the Sun
4595 compiler.
4596
4597 * simpos.c (SYSTNAME): Add case for AIX; otherwise it won't
4598 compile. I have a feeling this function is a bad idea anyway ---
4599 one should always test for features, not systems.
4600
4601 * smob.h (SCM_SMOBNUM, SCM_PTOBNUM): Remove extraneous
4602 semicolons. Only pure luck kept this from being noticed earlier.
4603
4604 Tue Jan 7 15:04:06 1997 Mikael Djurfeldt <mdj@kenneth>
4605
4606 * socket.c (scm_recvfrom): Added missing semicolon.
4607
4608 Mon Jan 6 20:39:08 1997 Gary Houston <ghouston@actrix.gen.nz>
4609
4610 * socket.c (scm_recvfrom): allow buff_or_size to be a list containing
4611 the buffer and start and end positions for scsh networking
4612 implementation.
4613
4614 Sun Jan 5 13:53:53 1997 Jim Blandy <jimb@floss.cyclic.com>
4615
4616 * configure.in: Revert previous change to this file; the problem
4617 is due to transient automake weirdness.
4618 * configure: Rebuilt.
4619
4620 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in, not
4621 PLUGIN/guile.libs. configure generates the latter from the former.
4622 * Makefile.in: Rebuilt.
4623
4624 * configure.in: Call AM_PROG_INSTALL; the automake manual says we
4625 need this if we install scripts, like guile-snarf.
4626 * configure: Rebuilt.
4627
4628 Thu Jan 2 01:56:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
4629
4630 * Makefile.am (EXTRA_DIST): Added DYNAMIC-LINKING
4631
4632 Sat Dec 28 19:14:01 1996 Gary Houston <ghouston@actrix.gen.nz>
4633
4634 * socket.c (scm_addr_vector): fix faulty scm_listify.
4635
4636 Sat Dec 28 13:55:58 1996 Marius Vollmer <mvo@zagadka.ping.de>
4637
4638 * read.c (scm_lreadr): Encountering EOF after skipping a SCSH
4639 style block comment is no longer considered an error.
4640
4641 Fri Dec 27 13:44:23 1996 Marius Vollmer <mvo@zagadka.ping.de>
4642
4643 * PLUGIN/guile.libs.in: New file.
4644 * PLUGIN/guile.libs: Removed from repository.
4645 * configure.in: Create PLUGIN/guile.libs from
4646 PLUGIN/guile.libs.in. This is for including additonal libraries
4647 needed for dynamic linking.
4648 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in
4649 instead of PLUGIN/guile.libs.
4650
4651 * Makefile.am: Added explicit dependency "dynl.o: dynl.x".
4652
4653 Sun Dec 22 23:06:14 1996 Jim Blandy <jimb@floss.cyclic.com>
4654
4655 * list.c (scm_delq_x, scm_delv_x, scm_delete_x): Delete all
4656 occurrences of the given element from the list, not just the
4657 first. This is how the Emacs Lisp functions behave, how the
4658 analogous Common Lisp functions behave, and (I believe) how the
4659 older Maclisp functions worked. I realize that this change may
4660 break code, but it seemed better to break it before the Guile
4661 release than after.
4662
4663 * gc.c (scm_protect_object, scm_unprotect_object): New functions.
4664 Their prototypes were already present in gc.h, but they weren't
4665 implemented.
4666 (scm_init_storage): Initialize scm_protects.
4667 * root.c (scm_protects): New element of scm_sys_protects.
4668
4669 * net_db.h (scm_init_net_db): Fix spelling from scm_init_netdb.
4670
4671 Sat Dec 21 15:38:32 1996 Jim Blandy <jimb@floss.cyclic.com>
4672
4673 * libguile.h: Added #include "libguile/net_db.h".
4674
4675 * libguile.h: Don't #include "libguile/libpath.h", contrary to Oct
4676 30 change. That file is only meant for communication between the
4677 configuration process and load.c. If code linked against libguile
4678 wants to get at the paths mentioned in libpath.h, it can call
4679 functions declared in load.h.
4680
4681 Sat Dec 21 14:50:42 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4682
4683 * libguile.h: Removed #include "libguile/fdsocket.h"
4684
4685 * net_db.c: Added #include <sys/socket.h>.
4686
4687 Sat Dec 21 00:33:03 1996 Gary Houston <ghouston@actrix.gen.nz>
4688
4689 * filesys.c (scm_input_waiting_p): use select in preference to
4690 FIONREAD, since the latter doesn't detect EOF.
4691 Throw error if neither select nor FIONREAD available.
4692
4693 * socket.c (scm_connect): take a port, not a fd object.
4694 (scm_fill_sockaddr): throw an error if fam is not recognised.
4695 (scm_bind): use scm_fill_sockaddr.
4696 (scm_listen): take a port, not a fd object.
4697 (scm_accept): take and return a port. return #f in the car if
4698 address can't be got
4699 (scm_sock_fd_to_port): new procedure.
4700 (scm_socket): use scm_sock_fd_to_port.
4701 (scm_addr_vector): throw error if unrecognised address type.
4702 take an extra argument with the calling procedure name.
4703 (scm_getsockname): take a port. return #f if address can't be got.
4704 (scm_getpeername): take a port. return #f if address can't be got.
4705 (scm_recvfrom): take a port. return #f for address component if can't
4706 be got.
4707 (scm_sendto, scm_socketpair, scm_getsockopt scm_shutdown,
4708 scm_setsockopt, scm_recv, scm_send): take a port not a fd object.
4709
4710 Fri Dec 20 23:06:53 1996 Jim Blandy <jimb@floss.cyclic.com>
4711
4712 * throw.c (scm_internal_catch): Make body funcs and handler funcs
4713 use separate data pointers, to allow them to be designed
4714 independently and reused.
4715 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message):
4716 Renamed from catch_body, catch_handler, and uncaught_throw; made
4717 generically useful.
4718 (struct scm_catch_body_data): Renamed from catch_body_data; moved
4719 to throw.h.
4720 (scm_catch): Use the above.
4721 (scm_throw): Don't bother printing a message for an uncaught
4722 throw; we establish a default handler in init.
4723 * throw.h (scm_internal_catch): Prototype updated.
4724 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message): New
4725 decls.
4726 (struct scm_body_thunk_data): New structure, used as data
4727 argument to scm_body_thunk.
4728 * init.c (struct main_func_closure): New structure, packaging up
4729 the data to pass to the user's main function.
4730 (scm_boot_guile): Create one. Pass it to scm_boot_guile_1.
4731 (scm_boot_guile_1): Pass it through to invoke_main_func. Use
4732 scm_internal_catch to establish a catch-all handler, using
4733 scm_handle_by_message. This replaces the special-case code in
4734 scm_throw.
4735 (invoke_main_func): Body function for scm_internal_catch; invoke
4736 the user's main function, using the main_func_closure pointer to
4737 decide what to pass it.
4738 * root.c (struct cwdr_body_data): Remove handler_proc member.
4739 (cwdr): Use scm_handle_by_proc instead of cwdr_handler.
4740 (cwdr_handler): Removed.
4741
4742 Thu Dec 19 00:00:26 1996 Gary Houston <ghouston@actrix.gen.nz>
4743
4744 * socket.h (SCM_P): update bind prototype.
4745 * socket.c (scm_init_socket): intern PF_UNSPEC, PF_UNIX, PF_INET.
4746 include "feature.h".
4747 (scm_socket): return a port, not a file descriptor object.
4748 include "fports.h" and <unistd.h>
4749 (scm_bind): take a port, not a file descriptor object.
4750 take an extra argument for address args.
4751
4752 * net_db.c (scm_init_net_db): intern INADDR_ANY, INADDR_BROADCAST,
4753 INADDR_NONE, INADDR_LOOPBACK.
4754
4755 Tue Dec 17 22:58:26 1996 Gary Houston <ghouston@actrix.gen.nz>
4756
4757 * init.c: include net_db.h and not fdsocket.h.
4758 (scm_boot_guile_1): call scm_init_net_db and not scm_init_fdsocket.
4759
4760 * Makefile.am: corresponding changes.
4761 * socket.h: renamed from fdsocket.h, fix names.
4762 * net_db.h: renamed from socket.h, fix names.
4763 * socket.c: renamed from fdsocket.c.
4764 remove _sys from procedure names.
4765 (scm_init_socket): rename from scm_init_fdsocket. include socket.x.
4766 add "socket" to features list.
4767 * net_db.c: renamed from socket.c.
4768 remove _sys from procedure names.
4769 (scm_init_net_db): rename from scm_init_socket. include net_db.x.
4770 add "net-db" to features list.
4771 include "net_db.h". don't include <sys/socket.h> or
4772 <sys/un.h>.
4773
4774 Thu Dec 19 14:03:24 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4775
4776 * tags.h (scm_tags): Removed comma at end of last enumerator.
4777
4778 Thu Dec 19 02:54:59 1996 Jim Blandy <jimb@floss.cyclic.com>
4779
4780 Don't use GCC extensions to allocate space for debugging frames.
4781 (Here he goes again! Why do we put up with this?!)
4782 * debug.h (scm_debug_frame): Make the 'vect' member a pointer to
4783 an scm_debug_info structure, not an in-line array of them. Add
4784 'info' member, to say how many vect elements we've used, for eval
4785 frames.
4786 * eval.c (SCM_CEVAL): Use alloca to allocate space for vect. Use
4787 a new variable debug_info_end to mark the end of vect, instead of
4788 the address of the 'info' pointer itself.
4789 [DEVAL] (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Remove casts of
4790 &debug to scm_debug_frame *; debug is a real scm_debug_frame now.
4791 (SCM_APPLY): Explicitly allocate space for debug.vect.
4792 * debug.c (scm_m_start_stack): Same, for vframe.vect.
4793 * stacks.c: Adjusted for new debug frame structure.
4794 (RELOC_INFO, RELOC_FRAME): New macros.
4795 (stack_depth, read_frames): Use them, and new scm_debug_frame
4796 element 'info', instead of magically knowing that eval frames have
4797 an info pointer sitting after vect.
4798 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Use
4799 RELOC_FRAME.
4800 (scm_init_stacks): Formatting tweaks.
4801
4802 Wed Dec 18 14:57:57 1996 Jim Blandy <jimb@floss.cyclic.com>
4803
4804 Give GCC more control flow information, so it can be sure that
4805 variables aren't used uninitialized.
4806 * error.h (scm_error, scm_syserror, scm_syserror_msg,
4807 scm_sysmissing, scm_num_overflow, scm_out_of_range,
4808 scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
4809 scm_misc_error): Tell GCC that these functions never return.
4810 * struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
4811 out the field type, call abort if SCM_ASSERT returns, to placate
4812 the optimizer.
4813 * stacks.c (scm_make_stack, scm_last_stack_frame): abort if
4814 scm_wta ever returns. We can't handle this case anyway, and this
4815 gives the optimizer more information.
4816 * unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
4817 scm_wta ever returns.
4818
4819 In some cases, the code is fine, but GCC isn't smart enough to
4820 figure that out; this usually happens when one variable is only
4821 initialized and used when a particular condition holds true, and
4822 we know that condition will never change within a given invocation
4823 of the function. In this case, we simply initialize the variables
4824 to placate the compiler, hopefully to a value which will cause a
4825 crash if it is ever actually used.
4826 * print.c (scm_iprin1): Initialize mw_pos.
4827 * read.c (scm_lreadrecparen): Initialize tl2, ans2.
4828 * throw.c (scm_ithrow): Initialize dynpair.
4829 * unif.c (scm_uniform_vector_ref): Initialize cra.
4830 * struct.c (init_struct): Initialize prot.
4831 * mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
4832
4833 * strports.c (scm_eval_0str): Don't return uninitialized garbage
4834 if EXPR contains no expressions.
4835
4836 Wed Dec 18 11:43:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
4837
4838 * eval.c, debug.h: Revert changes of Dec 16 and Nov 21. They
4839 cause an infinite loop (???). So much for the algebraic
4840 equivalency of variable-sized arrays and alloca...
4841
4842 Tue Dec 17 20:29:03 1996 Marius Vollmer <mvo@zagadka.ping.de>
4843
4844 * backtrace.c (scm_display_error): Bugfix: scm_procedure_p returns
4845 a SCM boolean, not a C boolean.
4846
4847 Sat Dec 14 23:21:45 1996 Marius Vollmer <mvo@zagadka.ping.de>
4848
4849 * gc.c (SCM_MTRIGGER_HYSTERESIS): New memory management parameter.
4850 (scm_must_malloc, scm_must_realloc): Added a hysteresis to the
4851 rules for raising scm_mtrigger. Previously, unfortunate but not
4852 unlikely circumstances could result in almost constant invokation
4853 of the gc. Now, this situations should be less likely, but they
4854 are not prevented completely.
4855
4856 Tue Dec 17 16:19:07 1996 Jim Blandy <jimb@totoro.cyclic.com>
4857
4858 * numbers.c (scm_fuck): Procedure removed; looks like old test
4859 code.
4860 * numbers.h: Prototype removed.
4861
4862 Mon Dec 16 18:20:32 1996 Jim Blandy <jimb@totoro.cyclic.com>
4863
4864 * debug.h (scm_debug_frame): Change `vect' member from an in-line
4865 array to a pointer, to match my Nov 21 change in eval.c.
4866
4867 Fri Dec 13 16:12:14 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4868
4869 * libguile.h: Added #include "libguile/backtrace.h", #include
4870 "libguile/stacks.h".
4871
4872 * strings.c (scm_string scm_make_string scm_string_ref
4873 scm_string_set_x scm_string_equal_p scm_string_append):
4874 Bugfix according to scm patch from Aubrey Jaffer:
4875 Corrected long-standing
4876 (not (eqv? (integer->char 128)
4877 (string-ref (make-string 1 (integer->char 128)) 0)))
4878 bug found by John Kozak <jk@noontide.demon.co.uk>.
4879
4880 * strports.c, strports.h: Make scm_eval_0str return the value of
4881 the last expression evaluated (previously, it returned void).
4882
4883 * strports.c, strports.h: New function: scm_read_0str. Does what
4884 it sounds like.
4885
4886 Tue Dec 10 23:38:43 1996 Gary Houston <ghouston@actrix.gen.nz>
4887
4888 * simpos.c (scm_getenv): return #f if string can't be found in the
4889 environment instead of throwing an exception, for compatibility
4890 with numerous other systems.
4891
4892 Mon Dec 9 23:23:35 1996 Tom Tromey <tromey@cygnus.com>
4893
4894 * Makefile.am (.c.x): Use guile-snarf.
4895 * configure.in (AC_OUTPUT): Generate guile-snarf; make it
4896 executable.
4897 * guile-snarf.in: New file, resurrected from old guile-snarf.sh.
4898
4899 Mon Dec 9 18:36:50 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
4900
4901 * backtrace.c (scm_display_error_message): Made non-static, and
4902 renamed from display_error_message.
4903 * backtrace.h (scm_display_error_message): Added extern decl.
4904 * throw.c (uncaught_throw): Use it to display the error message.
4905
4906 Mon Dec 9 10:10:38 1996 Tom Tromey <tromey@cygnus.com>
4907
4908 * inet_aton.c: Use #if 0, not #ifdef 0.
4909
4910 Mon Dec 9 06:36:48 1996 Gary Houston <ghouston@actrix.gen.nz>
4911
4912 * ioext.c (scm_sys_ftell): use scm_long2num instead of SCM_MAKINUM
4913 to convert the returned value.
4914 (scm_sys_fseek): use scm_num2long instead of SCM_INUM to convert
4915 the offset argument.
4916
4917 Sun Dec 8 21:06:38 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
4918
4919 Add new interface to catch/throw, usable from C as well as
4920 Scheme.
4921 * throw.h (scm_catch_body_t, scm_catch_handler_t): New types.
4922 (scm_internal_catch): New function, replaces...
4923 (scm_catch_apply): Deleted.
4924 * throw.c (scm_catch_apply): Deleted; replaced with a more general
4925 mechanism which is a bit more code, but can be used nicely from C
4926 and implement the Scheme semantics as well.
4927 (scm_internal_catch): This is the replacement; it's named after
4928 the analogous function in Emacs.
4929 (scm_catch): Reimplemented in terms of the above.
4930 (struct catch_body_data, catch_body, catch_handler): New
4931 functions, used by scm_catch.
4932 * root.c (cwdr): Reimplemented in terms of scm_internal_catch.
4933 (struct cwdr_body_data, cwdr_body, cwdr_handler): New functions;
4934 support for new cwdr.
4935
4936 * Makefile.am (libpath.h): Re-incorporate Mikael's changes of Wed
4937 Oct 30.
4938
4939 Sun Dec 8 17:55:34 1996 Marius Vollmer <mvo@zagadka.ping.de>
4940
4941 * acconfig.h: Added DYNAMIC_LINKING symbol.
4942 * configure.in: Add option and checks for dynamic linking.
4943 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c,
4944 dynl.h: New files for dynamic linking support.
4945 * Makefile.am (libguile_a_SOURCES):
4946 Added "dynl.c".
4947 (modinclude_HEADERS): Added "dynl.h".
4948 (EXTRA_DIST): Added "dynl-dl.c", "dynl-dld.c", "dynl-shl.c" and
4949 "dynl-vms.c".
4950 * init.c (scm_boot_guile_1): Call
4951 scm_init_dynamic_linking to initialize dynamic linking support.
4952
4953 Thu Dec 5 22:47:53 1996 Marius Vollmer <mvo@zagadka.ping.de>
4954
4955 * init.c (scm_boot_guile_1): Moved `live' variable to the toplevel
4956 (as we Schemers say). It needs to be global, so that I can tweak
4957 it for the proper operation of unexec.
4958 (scm_boot_guile_1_live): New variable, see above.
4959
4960 Sun Dec 1 00:00:49 1996 Tom Tromey <tromey@cygnus.com>
4961
4962 * guile-snarf.sh: Removed.
4963 * PLUGIN/guile.libs: Added dependency for -lm.
4964 * acinclude.m4: Renamed from aclocal.m4.
4965 * PLUGIN/greet: Removed.
4966 * Makefile.am, aclocal.m4: New files.
4967 * configure.in: Updated for Automake.
4968
4969 Thu Nov 28 00:23:55 1996 Marius Vollmer <mvo@zagadka.ping.de>
4970
4971 * eval.c (scm_definedp): Use top_level_lookup_closure_var
4972 and not top_level_lookup_thunk_var.
4973
4974 Wed Nov 27 22:04:19 1996 Jim Blandy <jimb@baalperazim.frob.com>
4975
4976 * Makefile.in (ancillary): List ChangeLog-scm, not ChangeLog.scm.
4977
4978 Wed Nov 27 14:14:56 1996 Marius Vollmer <mvo@zagadka.ping.de>
4979
4980 * eval.c (scm_definedp): Incompatibly changed to be a builtin
4981 Scheme function, instead of syntax. Single argument is now a
4982 symbol.
4983
4984 Thu Nov 21 20:26:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
4985
4986 * ramap.c (scm_ra_sum, scm_ra_difference, scm_ra_product,
4987 scm_ra_divide): Properly terminate statements passed as arguments
4988 to IVDEP macros. (Thanks to Bernard Urban.)
4989
4990 * eval.c (SCM_CEVAL): Use alloca, not GCC's extensions for arrays
4991 with non-constant sizes. (Thanks to Bernard Urban.)
4992
4993 Thu Nov 21 11:17:42 1996 Jim Blandy <jimb@floss.cyclic.com>
4994
4995 It's an "eval closure", not an "eval thunk." A thunk is a
4996 function of no arguments.
4997 * root.h (struct scm_root_state): Renamed
4998 top_level_lookup_closure_var from top_level_lookup_thunk_var.
4999 (scm_top_level_lookup_closure_var): Renamed from
5000 scm_top_level_lookup_thunk_var.
5001 * root.c (mark_root): Uses changed.
5002 * gdbint.c (gdb_eval, gdb_binding): Uses changed.
5003 * init.c (scm_start_stack): Uses changed.
5004 * eval.c (scm_eval, scm_eval_x, scm_init_eval): Rename uses.
5005 Change scheme-visible name to *top-level-lookup-closure* from
5006 *top-level-lookup-thunk*.
5007
5008 Tue Nov 19 22:43:31 1996 Jim Blandy <jimb@totoro.cyclic.com>
5009
5010 * gc.c (scm_igc, scm_gc_mark): Round up the size of the stack we
5011 pass to scm_mark_locations. (Thanks to Aubrey Jaffer.)
5012
5013 Sun Nov 10 13:35:05 1996 Jim Blandy <jimb@floss.cyclic.com>
5014
5015 * gc.c (struct scm_heap_seg_data): Doc fixes.
5016
5017 * gc.c (scm_gc_sweep): Empty all segments' freelists before
5018 sweeping. Then, prepend each segment's free cells to its
5019 freelist, rather than wiping out the old value. (Thanks to Marius
5020 Vollmer.)
5021
5022 * gc.c (which_seg, scm_map_free_list, scm_newcell_count,
5023 scm_check_freelist, scm_debug_newcell): New functions and
5024 variables, for debugging freelist problems.
5025 * pairs.h (SCM_NEWCELL): New debugging version added.
5026 * gc.h (scm_debug_newcell): Added extern declaration, used by
5027 debugging version of SCM_NEWCELL.
5028
5029 Sat Nov 9 19:02:46 1996 Jim Blandy <jimb@floss.cyclic.com>
5030
5031 On some systems <libc.h> conflicts with <unistd.h>, and should not
5032 be #included at all.
5033 * aclocal.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): New autoconf macro.
5034 * acconfig.h (LIBC_H_WITH_UNISTD_H): New CPP symbol.
5035 * configure.in: Call it.
5036 * posix.c, filesys.c: Use its results to decide whether or not to
5037 #include <libc.h>.
5038 * configure, scmconfig.h.in: Rebuilt with autoconf and
5039 autoheader.
5040
5041 Wed Nov 6 16:19:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
5042
5043 * fports.c (scm_stdio_to_port, scm_open_file): Set the port's
5044 pointer to the stdio stream before calling scm_setbuf0, so the
5045 latter will be able to retrieve it. I'm surprised this didn't
5046 segfault earlier. (Thanks to Christopher Lee.)
5047
5048 Wed Nov 6 16:01:20 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5049
5050 * throw.c (scm_lazy_catch, scm_ithrow): Completed implementation
5051 of `lazy-catch'.
5052
5053 Sat Nov 2 21:01:48 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5054
5055 * stacks.c, stacks.h (scm_make_stack): Now takes arbitrary
5056 number of stack narrowing specifier pairs. The first specifier in
5057 a pair controls inner border, the second the outer border. A
5058 number means cut that number of frames, a procedure object means
5059 cut until that object is found in operator position in a frame.
5060
5061 * root.c (cwdr): Bugfix.
5062
5063 * read.c: Recording of positions disabled by default.
5064
5065 * procs.c (scm_closure_p): New function.
5066
5067 * posix.c (scm_tmpnam): New function.
5068
5069 * load.c: Added #include "throw.h".
5070 (scm_sys_search_load_path): Bugfix: Don't add an extra '/' if path
5071 ends with '/'.
5072
5073 * load.c, load.h (scm_read_and_eval_x): New function.
5074
5075 * eval.c: Renamed debug option "deval" to "debug".
5076
5077 (scm_eval_x): `eval!' is no longer accessible from the scheme
5078 level. Motivation: We can't allow operations which introduce
5079 glocs into the scheme level. Guile's type system can't handle
5080 these as data. Use `eval' or `read-and-eval!' as replacement.
5081
5082 * debug.c (scm_m_start_stack): Bugfix: Use SCM_ECONSP instead of
5083 SCM_CONSP since this is a macro!; Set vframe.prev to
5084 scm_last_debug_frame instead of 0. In this way we can look
5085 "above" the virtual start stack frame if we wish.
5086 (scm_debug_hang): New function: Useful for debugging Guile in
5087 certain tricky situations. Will probably be removed later...
5088
5089 * debug.h: Changed semantics of debug option "backtrace". This
5090 option now only indicates whether we want automatic backtrace at
5091 an error.
5092
5093 Wed Oct 30 00:31:55 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5094
5095 * ports.c: #include "filesys.h"
5096 (scm_char_ready_p): input_waiting renamed and moved to filesys.c.
5097
5098 * filesys.c, filesys.h (scm_input_waiting_p): Moved from ports.c.
5099 Motivation: This is system specific code which is related to file
5100 I/O. It also may use select. Added code by Gary Houston to
5101 detect presence of character in stdio buffers.
5102
5103 * libguile.h: #include "libguile/libpath.h"
5104
5105 * Makefile.in (libpath.h): Renamed definition of: LIBRARY_PATH -->
5106 SCM_LIBRARY_DIR; Added definitions of: SCM_PKGDATA_DIR,
5107 SCM_SITE_DIR; Install libpath.h among the other include files.
5108
5109 * load.c, load.h (scm_sys_package_data_dir): New function.
5110
5111 Mon Oct 28 11:43:41 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5112
5113 * stacks.h: Bugfix: Don't use tail-array length field as stack
5114 length field! This screwed GC.
5115
5116 Tue Oct 22 01:01:00 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5117
5118 * _scm.h: Added #ifndef around definition of macros min and max.
5119
5120 * __scm.h: Added hooks for threads to plugin to in ints protection
5121 macros: SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER,
5122 SCM_THREAD_ALLOW_1, SCM_THREAD_ALLOW_2. Motivation: We don't want
5123 the main code in these macros duplicated and spread over multiple
5124 files. Renamed SCM_THREADS_SWITCHING_CODE ->
5125 SCM_THREAD_SWITCHING_CODE.
5126
5127 Tue Oct 29 14:55:40 1996 Marius Vollmer <mvo@zagadka.ping.de>
5128
5129 * snarf.h: New file.
5130 * guile-snarf.sh: New file.
5131 * Makefile.in (inner_h_files): Added snarf.h
5132 (ancillary, install, uninstall, distclean): Added actions for
5133 guile-snarf.
5134 (.c.x): Use guile-snarf.
5135 (guile-snarf): New rule, to produce guile-snarf from guile-snarf.sh.
5136 (gen_c_files): Note that these depend on guile-snarf.
5137 * _scm.h: Removed the snarfing macros (SCM_PROC, etc). They are
5138 now in "snarf.h". Added #include "snarf.h" to get them.
5139 * libguile.h: Added #include "snarf.h".
5140 (Patches applied and tweaked by Jim Blandy.)
5141
5142 Tue Oct 29 13:21:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
5143
5144 * socket.c: Use K&R style declaration for 'close'; the GNU coding
5145 standards suggest against providing prototypes for system
5146 functions. Thanks to Greg Troxel.
5147
5148 Mon Oct 28 16:48:32 1996 Jim Blandy <jimb@floss.cyclic.com>
5149
5150 * strports.c (scm_eval_0str): New function.
5151 #include "read.h", to get prototype for scm_read.
5152 * Makefile.in (strports.o): Update dependencies.
5153 * strports.h: New prototype.
5154
5155 * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
5156 scheme name from "int?" to "integer?". It seems to do the job.
5157 * numbers.h: Rename prototype too.
5158 * scmhob.h (intp): Change definition to refer to scm_integer_p. I
5159 hope this is right.
5160
5161 * numbers.c (scm_less_p, scm_gr_p, scm_leq_p, scm_geq_p,
5162 scm_num_eq_p): Rename these according to R4RS conventions: call
5163 them <, <=, =, >, and >=, not <?, <=?, =?, >?, and >=?. En route
5164 to making libguile R4RS compliant without ice-9...
5165
5166 * load.c (scm_sys_search_load_path): Search for files under all
5167 extensions listed in the %load-extensions variable. If FILENAME
5168 is absolute, return it unchanged, without searching the load path.
5169 (scm_loc_load_extensions): New variable, pointing to
5170 %load-extensions' value cell.
5171 (scm_init_load): Initialize it, and the value it points to.
5172 (scm_primitive_load_path): Improve error reporting.
5173
5174 * load.c (scm_loc_load_hook): New variable, pointing to value cell
5175 of new Scheme variable %load-hook.
5176 (scm_primitive_load): Apply %load-hook to filename.
5177
5178 Mon Oct 28 06:28:28 1996 Gary Houston <ghouston@actrix.gen.nz>
5179
5180 * configure.in: add tests for figuring out whether buffered data
5181 is available in a FILE structure, which is needed by char-ready.
5182
5183 * acconfig.h: define FILE_CNT_FIELD, FILE_CNT_GPTR and
5184 FILE_CNT_READPTR.
5185
5186 * simpos.c (scm_getenv): renamed from scm_sys_getenv. Throw
5187 exceptions using misc_error instead of syserror. It seems a bit
5188 odd to throw an exception if a string can't be found in the
5189 environment, but it's consistent with open-file, stat etc.
5190 (simpos.h): remove sys_ from getenv.
5191
5192 * posix.c (scm_putenv): renamed from scm_sys_putenv. If an error
5193 occurs, throw an error instead of returning errno. Return value
5194 is now unspecified.
5195 (numerous in posix.c and posix.h): removed superfluous sys_ from names.
5196
5197 Sun Oct 27 01:22:04 1996 Gary Houston <ghouston@actrix.gen.nz>
5198
5199 * filesys.c (scm_stat2scm): derive file type and permissions from
5200 the stat mode and append them to the returned vector.
5201 There isn't much overhead in doing this and it avoids the need to
5202 work with S_IRUSR et al. in Scheme.
5203 Define symbols scm_sym_regular etc.
5204 (scm_init_filesys): don't intern S_IRUSR etc.
5205
5206 * load.c: change s_try_load and s_try_load_path to s_primitive_load
5207 and s_primitive_load_path.
5208
5209 * eval.c, load.c, error.c (scm_wta): use scm_misc_error.
5210
5211 * error.h: don't declare error symbols. prototype for scm_misc_error.
5212
5213 * stackchk.c (scm_stack_overflow_key): defined here instead of in
5214 error.c.
5215
5216 * error.c: use SCM_SYMBOL to set up error keys.
5217 scm_misc_error: new procedure.
5218
5219 Fri Oct 25 01:56:30 1996 Jim Blandy <jimb@floss.cyclic.com>
5220
5221 * read.c (scm_lreadr): Recognize SCSH-style block comments; text
5222 between `#!' and `!#' is ignored.
5223 (skip_scsh_block_comment): New function.
5224
5225 * feature.c (scm_set_program_arguments): New argument, FIRST.
5226 * feature.h: Update prototype.
5227 * init.c (scm_boot_guile_1): Pass new argument to
5228 scm_set_program_arguments.
5229
5230 Tue Oct 22 20:54:42 1996 Jim Blandy <jimb@floss.cyclic.com>
5231
5232 * init.c (scm_start_stack): Don't initialize scm_progargs here.
5233 (scm_boot_guile): Call scm_set_program_arguments here, later than
5234 the old initialization.
5235
5236 * init.c: (scm_boot_guile, scm_boot_guile_1): New, simplified
5237 initialization procedure.
5238 - Delete in, out, err arguments; there are other perfectly good
5239 ways to override these when desired.
5240 - Delete result argument; this function shouldn't ever return.
5241 - Rename init_func argument to main_func, for less confusion.
5242 - Delete boot_cmd argument; main_func is more general.
5243 -Add 'closure' argument, to help people pass data to main_func
5244 without resorting to global variables.
5245 - Abort if reentered; don't bother returning an error code.
5246 - Call scm_init_standard_ports to set up the default/current
5247 standard ports; no need to pass them to scm_start_stack.
5248 - Remove code to evaluate the boot_cmd, and start the repl; let
5249 the user do something like that in main_func if they want.
5250 - Remove code to package up a return value; main_func can do any
5251 of that as needed.
5252 - Call exit (0), instead of returning.
5253 (scm_start_stack): Don't initialize the I/O ports here; that's
5254 weird. Delete in, out, err arguments. Move guts to
5255 scm_init_standard_ports, scm_stdio_to_port.
5256 (scm_init_standard_ports): New function, to set up current and
5257 default standard ports.
5258 (scm_start_stack, scm_restart_stack): Make these static.
5259 * init.h (scm_boot_guile): Adjust declaration.
5260 (scm_start_stack, scm_restart_stack): Remove externally
5261 visible declarations for these.
5262 (enum scm_boot_status): Removed; now scm_boot_guile never returns.
5263
5264 * fports.c (scm_stdio_to_port): New function. Its guts used to be
5265 written out several times in scm_start_stack.
5266 * fports.h: New declaration for the above.
5267
5268 * feature.c (scm_set_program_arguments): New function.
5269 * feature.h: New declaration for the above.
5270
5271 * ports.c: Formatting tweak.
5272
5273 Sun Oct 20 03:29:32 1996 Mikael Djurfeldt <mdj@kenneth>
5274
5275 * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
5276 ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
5277 for obtaining the address of a car or cdr field. Motivation:
5278 &SCM_CXR make assumptions about the internal structure of the
5279 SCM_CXR selectors.
5280
5281 * eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
5282 Motivation: see SCM_CXRLOC.
5283
5284 * pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
5285 srcprop.h, tags.h, throw.c, unif.c: Added new selectors
5286 SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
5287 Motivation: Safer use. Some other macros are defined in terms of
5288 these operations. If these are defined using the SCM_SETCXR
5289 (<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
5290 to inefficiency and an <e1> with side-effects could potentially
5291 break. Also, these particular operations are heavily utilized in
5292 the garbage collector. In unoptimized code there will be a
5293 measurable speedup.
5294
5295 * alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
5296 eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
5297 ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
5298 pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
5299 procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
5300 strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
5301 vports.c: Cleaned up use of pairs: Don't make any special
5302 assumptions about the internal structure of selectors and
5303 mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
5304 SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
5305 (Among other things, this change makes it easier to build Guile
5306 with certain compilers which have problems with casted lvalues.)
5307
5308 Fri Oct 18 01:11:56 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5309
5310 * stacks.c: Improve selection of relevant stack frames when making
5311 a stack object. Introduce one level of indirection in the stack
5312 object to make it possible to "narrow" to a certain region of the
5313 stack. This facilitates making use of more clever algorithms (not
5314 implemented) for selecting relevant frames and gives a cleaner
5315 design since selection of frames can be done independently of
5316 extraction of frames from the real stack.
5317 (scm_stack_id): Also take #t as argument which means look at
5318 current stack.
5319
5320 * stacks.h: In struct scm_stack: Turn field frames into a pointer.
5321 Turn n_tail into an integer directly representing current number
5322 of frames in stack. Add field tail.
5323
5324 * ports.c (scm_port_line_x, scm_port_column_x): New mutators.
5325
5326 * debug.c (scm_make_memoized): Made it available at scheme level.
5327 (scm_unmemoize, scm_memoized_environment): Bugfix: Check for
5328 SCM_NIMP before applying heavier predicates in argument checking.
5329 (scm_local_eval): Also take memoized object as argument.
5330
5331 * backtrace.c (scm_display_error): Just a safety measure: Stacks
5332 aren't created with zero length, but should such a strange
5333 creature suddenly turn up...
5334
5335 Wed Oct 16 11:08:41 1996 Marius Vollmer <mvo@zagadka.ping.de>
5336
5337 * hashtab.h (scm_hashx_remove_x): Renamed `delete' parameter to
5338 `del', for the sake of C++ compilers. (Patch applied by JimB.)
5339
5340 Tue Oct 15 17:06:13 1996 Jim Blandy <jimb@floss.cyclic.com>
5341
5342 * variable.c (scm_make_variable): Make the name hint optional, as
5343 documented.
5344 (anonymous_variable_sym): Renamed from variable_sym. All uses
5345 changed.
5346
5347 * load.c (scm_primitive_load, scm_primitive_load_path): Renamed
5348 from scm_sys_try_load and scm_sys_try_load_path. The Scheme name
5349 of scm_primitive_load_path was also changed to
5350 "primitive-load-path", from "%try-load-path". Callers changed.
5351 We'd like to respect the convention that a function named
5352 "try-mumble" should behave just like the function called "mumble",
5353 but return #f instead of signalling some error.
5354 * load.h: Rename prototypes.
5355
5356 Tue Oct 15 05:34:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5357
5358 * print.c (make_print_state, grow_print_state), print.h: Modified
5359 the print state representation: Don't use a tail array for
5360 recording of circular references. Resizing of the print state
5361 structure invalidates the print state pointer. To avoid passing
5362 around an indirect print state reference to all printing
5363 functions, we instead let the print state reference a resizable
5364 vector.
5365
5366 Mon Oct 14 19:25:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
5367
5368 * alist.c (scm_sloppy_assq, scm_sloppy_assv, scm_sloppy_assoc):
5369 Don't crash when passed an improper list terminated by a
5370 non-immediate value.
5371
5372 Mon Oct 14 19:08:33 1996 Jim Blandy <jimb@floss.cyclic.com>
5373
5374 Allocate data for structures on an eight-byte boundary, as
5375 required by the tagging system.
5376 * struct.c (alloc_struct): New function.
5377 (scm_make_struct, scm_make_vtable_vtable): Call it.
5378 * struct.h (scm_struct_n_extra_words): Bump to 3.
5379 (scm_struct_i_ptr): New "field".
5380 * gc.c (scm_gc_sweep): When we need to free the data, use the
5381 information stored by alloc_struct to find the beginning of the
5382 block allocated to the structure, so we can free it.
5383
5384 Mon Oct 14 17:07:55 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5385
5386 * init.c (scm_boot_guile_1): Moved scm_init_struct in front of
5387 scm_init_stacks.
5388
5389 * debug.h (SCM_VOIDFRAME, SCM_VOIDFRAMEP): New macros.
5390 (scm_debug_info): New member: id.
5391
5392 * stacks.c: Stacks are now represented as structs; Stacks have an
5393 id given to them by `start-stack'.
5394 (scm_last_stack_frame): Added predicates `stack?' and `frame?'.
5395
5396 * stacks.h: Added declarations of scm_stack_p and scm_frame_p;
5397 Changed stack representation.
5398
5399 * debug.c (scm_procedure_name): Try procedure property `name' for
5400 compiled closures aswell.
5401
5402 * gc.c (scm_init_storage): Initialize scm_stand_in_procs to SCM_EOL.
5403
5404 * eval.c: scm_i_name moved to gsubr.c
5405 (scm_m_define): Record names of all kinds of procedure
5406 objects. (Earlier, only closures were recorded.)
5407
5408 * procprop.h: Added declaration of scm_i_name.
5409
5410 * gsubr.c: Added global scm_i_name. Added #include "procprop.h".
5411 (scm_make_gsubr): Record names of compiled closures.
5412
5413 Mon Oct 14 04:21:51 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5414
5415 * debug.c, debug.h: Removed obsolete code.
5416
5417 * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
5418 stacks.c: Renamed regs --> scm_contregs.
5419
5420 * print.c (scm_free_print_state): Cleanup print state before
5421 returning it to pool. It is better to do it here than in
5422 scm_prin1 since scm_prin1 is called often.
5423
5424 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
5425 s_set_source_property_x): Check that first argument is a pair or a
5426 memoized object.
5427
5428 * srcprop.c, srcprop.h: Made scm_i_filename, scm_i_copy,
5429 scm_i_line, scm_i_column and scm_i_breakpoint global.
5430
5431 * init.c: Added #include "backtrace.h" and #include "stacks.h".
5432 (scm_boot_guile_1): Added calls to scm_init_backtrace and
5433 scm_init_stacks.
5434
5435 * debug.h: Added debug object smob declaration and macro
5436 definitions.
5437
5438 * configure.in: Build with backtrace.o and stacks.o if debug
5439 support enabled.
5440
5441 * Makefile.in: Added entries for new files: backtrace.c,
5442 backtrace.h, stacks.c and stacks.h.
5443
5444 * symbols.c (scm_sym2ovcell): Fixed documentation.
5445
5446 * _scm.h (min, max): Added.
5447
5448 * async.c: Moved `min' macro to _scm.h.
5449
5450 * debug.h: New debug options SCM_BACKTRACE_MAXDEPTH and
5451 SCM_BACKTRACE_INDENT.
5452
5453 * eval.c: Added new debug options `maxdepth' and `indent'.
5454
5455 * print.c (make_print_state): Bugfix: Initialize pstate->ceiling.
5456
5457 * print.h: Added selector SCM_PRINT_STATE.
5458
5459 * print.c: New functions: scm_make_print_state,
5460 scm_free_print_state.
5461
5462 * print.h: Added declarations for scm_make_print_state,
5463 scm_free_print_state.
5464
5465 * debug.c (scm_m_start_stack): New acro.
5466
5467 * debug.h: Small cleanup.
5468
5469 * init.c (scm_boot_guile_1): Moved scm_init_debug below
5470 scm_init_eval.
5471
5472 Sun Oct 13 20:14:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
5473
5474 * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
5475 arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
5476 chars.c, chars.h, continuations.c, continuations.h, debug.c,
5477 debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
5478 eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
5479 filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
5480 gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
5481 hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
5482 kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
5483 markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
5484 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
5485 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
5486 procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
5487 root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
5488 simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
5489 stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
5490 strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
5491 struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
5492 unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
5493 version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
5494 declare functions with prototypes. (Patch thanks to Marius
5495 Vollmer.)
5496
5497 More prototype-related changes from Marius Vollmer:
5498 * gdb_interface.h: Wrapped header file in #ifdef/#endif
5499 * gscm.h (gscm_run_scm): Added prototype for `initfn' paramter.
5500 * ports.h (ptobfuns): Added prototypes. This means some casting in
5501 fports.c.
5502 * fports.c: Added casts for initializations, since the functions
5503 are defined to take FILE * as their stream argument, not SCM.
5504 * fdsocket.c, fdsocket.h: Made `init_addr_buffer' static.
5505 * genio.c (scm_gen_puts): Changed `unsigned char *str_data' parameter
5506 to `char *str_data' to conform to prototype.
5507
5508 Sat Oct 12 21:49:29 1996 Gary Houston <ghouston@actrix.gen.nz>
5509
5510 * error.c, eval.c, load.c, stackchk.c: use scm_error not lgh_error.
5511
5512 * __scm.h (lgh_error): removed, lgh shouldn't be in libguile.
5513
5514 * stime.c, stime.h: use SCM_P method.
5515
5516 Sat Oct 12 16:16:25 1996 Jim Blandy <jimb@floss.cyclic.com>
5517
5518 * eval.c (scm_nconc2last): Don't accept an empty list; apply must
5519 be given at least two arguments. Insist that lst's last element
5520 be a list, but don't make any requirements of its predecessors.
5521
5522 Fri Oct 11 03:58:25 1996 Jim Blandy <jimb@floss.cyclic.com>
5523
5524 * eval.c (scm_nconc2last): Revert last change; there seems to be
5525 other stuff going on here.
5526
5527 Fri Oct 11 02:43:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
5528
5529 * eval.c (scm_nconc2last): Make sure that each element of lst
5530 (which is a list of argument lists, except for the tail) is a
5531 proper list, i.e., finite and terminated by '().
5532
5533 Thu Oct 10 21:09:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
5534
5535 * unif.c (scm_ra_set_contp): Localize `inc' declaration.
5536 Clarifies flow.
5537
5538 * struct.c (scm_make_struct, scm_make_vtable_vtable): Use the
5539 symbolic name for the tag, scm_tc3_cons_gloc, instead of just
5540 saying "1".
5541
5542 * vectors.c (scm_make_vector): Fill vectors with the undefined
5543 value, to help make Guile Scheme code more portable to other
5544 Schemes.
5545
5546 * symbols.c (scm_intern_obarray_soft, scm_sysintern): Doc fixes.
5547 * symbols.h, tags.h: Doc fixes.
5548
5549 Wed Oct 9 19:39:29 1996 Jim Blandy <jimb@floss.cyclic.com>
5550
5551 * async.c (scm_take_signal): Doc fixes.
5552
5553 Mon Oct 7 22:30:34 1996 Jim Blandy <jimb@totoro.cyclic.com>
5554
5555 * numbers.c (scm_divbigint): When the remainder is zero, we don't
5556 want to subtract it from the modulus; we just want to leave it
5557 alone.
5558
5559 Mon Oct 7 00:14:17 1996 Mikael Djurfeldt <mdj@kenneth>
5560
5561 * init.c (scm_boot_guile_1): Bugfix: i --> base in argument to
5562 `scm_init_threads'.
5563
5564 * throw.h (scm_catch_apply): Removed the `lazyp' argument.
5565
5566 * throw.c (scm_catch_apply): Finished implementation of
5567 `lazy-catch'.
5568
5569 Sun Oct 6 05:26:05 1996 Gary Houston <ghouston@actrix.gen.nz>
5570
5571 * filesys.c (scm_sys_select): move SCM_ALLOW_INTS past the sreturn
5572 check.
5573 (scm_init_filesys): set "i/o-extensions" feature.
5574 include feature.h.
5575
5576 Sat Oct 5 12:22:00 1996 Jim Blandy <jimb@floss.cyclic.com>
5577
5578 * Makefile.in (root.o): Correct dependencies.
5579
5580 Sat Oct 5 18:40:42 1996 Mikael Djurfeldt <mdj@kenneth>
5581
5582 * Makefile.in: Added dependency entry for root.o.
5583
5584 * continuations.c, debug.[ch], eval.c, gscm.c init.c, root.c,
5585 throw.c: Renamed last_debug_info_frame -> scm_last_debug_frame.
5586
5587 * init.c (scm_start_stack): Set initial root continuation number
5588 to 0.
5589
5590 * procs.c: New function: scm_thunk_p.
5591
5592 * procs.h: Added declarations of scm_thunk_p.
5593
5594 * root.c: Renamed `call-with-new-root' -->
5595 `call-with-dynamic-root'.
5596 (cwdr): Removed allocation of new root state. This should be done
5597 separately by use of scm_make_root.
5598 (scm_apply_with_dynamic_root): New function: Does what it
5599 sounds like. Needed when spawning threads.
5600
5601 * root.h: Added member last_debug_frame to root state.
5602 Added #include "libguile/debug.h"
5603
5604 * throw.c: Renamed scm_catch --> scm_catch_apply and added more
5605 arguments. The motivation is that code in root.c needs catch
5606 functionality, and we want to avoid code duplication.
5607 New functions: scm_catch, scm_lazy_catch. These are wrappers for
5608 scm_catch_apply. scm_lazy_catch is intended to introduce catch
5609 handlers that run without popping the stack into the dynwind
5610 chain.
5611
5612 * throw.h: Added prototypes for scm_catch_apply and
5613 scm_lazy_catch.
5614
5615 Thu Oct 3 11:12:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5616
5617 * root.h (scm_root, scm_set_root): Decouple thread support details
5618 by introducing the selector SCM_THREAD_LOCAL_DATA and the mutator
5619 SCM_SET_THREAD_LOCAL_DATA.
5620
5621 * print.c (scm_iprlist): Bugfix: Added SCM_ECONSP tests in hare
5622 and tortoise scanning loop.
5623
5624 Thu Oct 3 00:04:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
5625
5626 * Makefile.in: Rebuild dependencies.
5627
5628 * libguile.h: #include "libguile/print.h" before "smob.h", since
5629 the latter uses the print_state structure.
5630
5631 * throw.c (scm_ithrow): Use the correct variable when checking to
5632 see if a given element of scm_dynwinds is a valid catch.
5633
5634 * throw.c (scm_ithrow): If scm_dynwinds has invalid list
5635 structure, abort; don't just silently ignore the garbage.
5636
5637 * _scm.h: #include "print.h" here, since it seems to be used just
5638 about everywhere.
5639 * eval.c, gdbint.c, genio.h, numbers.h, smob.h, srcprop.c,
5640 strports.c, unif.h: Don't #include "print.h".
5641
5642 Tue Oct 1 05:15:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5643
5644 * feature.h (scm_loc_features): Removed external declaration.
5645 (Bug fix suggested by Petr Adamek <adamek@mit.edu>.)
5646
5647 Tue Oct 1 00:00:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5648
5649 * feature.c (scm_init_feature): Added threads feature (needs to be
5650 initialized here, since features doesn't exist when
5651 scm_init_threads is called).
5652
5653 * libguile.h: Added #include "libguile/../threads/threads.h".
5654 (This is a kludge to get thread support working. This should be
5655 fixed.)
5656
5657 * configure.in, acconfig.h: Added flags for thread support.
5658
5659 * scmsigs.c: Define `signal' to be `pthread_signal' if using
5660 mit-pthreads.
5661
5662 * gc.c (scm_igc): Added SCM_THREAD_CRITICAL_SECTION_START and
5663 SCM_THREAD_CRITICAL_SECTION_END. Moved marking of root data to
5664 root.c:mark_root.
5665
5666 * _scm.h: Added conditional #include "threads.h"
5667
5668 * __scm.h (SCM_ASYNC_TICK): Added call to macro
5669 SCM_THREADS_SWITCHING_CODE.
5670
5671 * init.c (scm_start_stack): Call `scm_make_root' to dynamically
5672 allocate the basic dynamic root object.
5673 (scm_boot_guile): Added call to scm_init_root.
5674
5675 * root.c, root.h: Added root smob.
5676 (cwdr, scm_call_with_new_root, scm_dynamic_root, scm_app_wdr): New
5677 functions: Implements dynamic roots mostly according to spec in
5678 SCM manual. Main difference is that the second argument is a
5679 throw handler rather than an error "thunk".
5680
5681 * root.h: Added declaration of scm_init_root.
5682
5683 * root.c: Added #include "genio.h", #include "smob.h", #include
5684 "pairs.h", #include "throw.h", #include "dynwind.h", #include
5685 "eval.h"
5686 (scm_init_root): Added #include "root.x".
5687
5688 * throw.c: Added #include "stackchk.h"
5689 (scm_catch): Changed SCM_DEFER_INTS --> SCM_REDEFER_INTS and
5690 SCM_ALLOW_INTS --> SCM_REALLOW_INTS. This is so that scm_catch
5691 can be used in scm_call_with_new_root; Added reenabling of stack
5692 checking when catching a throw.
5693
5694 Mon Sep 30 21:48:11 1996 Jim Blandy <jimb@totoro.cyclic.com>
5695
5696 * list.c, list.h: Use SCM_P instead of CPP hair. Doc fixes.
5697
5698 * list.c (scm_member, scm_memv, scm_memq): Return #f if a matching
5699 element is not found, as per R4RS.
5700
5701 Sat Sep 28 18:13:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
5702
5703 * list.c: Doc fixes throughout.
5704
5705 Sat Sep 28 02:07:43 1996 Gary Houston <ghouston@actrix.gen.nz>
5706
5707 * strings.c, strings.h: (scm_makfrom0str, scm_makefrom0str_opt:
5708 declare the char * to be const. Avoids a warning in rgx.c.
5709
5710 * ports.h: spelling fix.
5711
5712 * filesys.c (scm_sys_stat, scm_sys,lstat): include file name in
5713 error messages.
5714
5715 * load.c (scm_sys_try_load_path): throw an error if file not found
5716 (like it says it in NEWS).
5717
5718 Fri Sep 27 18:27:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
5719
5720 * symbols.c (scm_intern_obarray_soft): Initialize the new symbol's
5721 PROPS slot to '(), not #f; it's an empty alist.
5722
5723 * throw.h, throw.c: Use SCM_P instead of #if hair.
5724
5725 Remove special support for uncaught throws; see throw.c for
5726 rationale.
5727 * throw.c (uncaught_throw): New function.
5728 (scm_ithrow): Call uncaught_throw if we don't find a throw
5729 target; don't mess with scm_bad_throw_vcell.
5730 (scm_bad_throw_vcell): Variable deleted.
5731 (scm_init_throw): Don't initialize it.
5732
5733 * throw.c (scm_ithrow): Don't let outer key matches shadow inner
5734 #t catches.
5735
5736 Wed Sep 25 04:35:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
5737
5738 * numbers.c (scm_istr2int): If the number is short (as most
5739 numbers are), just call scm_small_istr2int to deal with it.
5740 (scm_small_istr2int): New function, created by un-#ifdefing the
5741 non-bignum version of scm_istr2int and renaming it.
5742
5743 Tue Sep 24 06:48:38 1996 Gary Houston <ghouston@actrix.gen.nz>
5744
5745 * load.c (scm_sys_try_load): don't check whether value returned
5746 by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED.
5747 Change the Scheme name from %try-load to primitive-load.
5748
5749 * error.c (scm_error): convert a NULL message to SCM_BOOL_F.
5750 Can avoid passing a message, allowing it to be derived in the
5751 error handler (e.g., if we want to throw to the key both from
5752 Scheme and C).
5753
5754 Mon Sep 23 00:42:15 1996 Mikael Djurfeldt <mdj@kenneth>
5755
5756 * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
5757 references now have a new appearance which is more compact and
5758 also gives a clue about what the target of the reference is.
5759 By setting parameters in the print state, more fancy printing can
5760 be achieved. This is used by the (not yet commited) backtrace
5761 code.
5762
5763 Sun Sep 22 17:10:06 1996 Mikael Djurfeldt <mdj@kenneth>
5764
5765 * eval.c, numbers.h, unif.h, smob.h, srcprop.c: Added #include
5766 "print.h"
5767
5768 * print.c: Added #include "struct.h". Removed function
5769 scm_prlist.
5770
5771 * print.h: Modified prototypes for scm_iprlist, scm_prin1 and
5772 scm_iprin1. Removed prototype for scm_prlist.
5773
5774 * arbiters.c (prinarb),
5775 async.c (print_async),
5776 debug.c (prindebugobj, prinmemoized),
5777 eval.c (prinprom, prinmacro),
5778 filesys.c (scm_fd_print, scm_dir_print),
5779 kw.c (print_kw),
5780 mallocs.c (prinmalloc),
5781 numbers.c, numbers.h (scm_floprint, scm_bigprint),
5782 smob.h (scm_smobfuns),
5783 srcprop.c (prinsrcprops),
5784 throw.c (prinjb),
5785 unif.c, unif.h (scm_raprin1, rapr1),
5786 variable.c (prin_var): Changed argument `int writing' to
5787 `scm_print_state *pstate'.
5788
5789 * init.c (scm_boot_guile): Moved scm_init_struct upwards so
5790 that it will be called before scm_init_print.
5791
5792 * print.c (scm_prin1): Print states are now allocated when calling
5793 scm_prin1 and then passed around to all printing functions as an
5794 argument. A cache `print_state_pool' enables reuse of print
5795 states.
5796 (scm_make_print_state): New function.
5797 (scm_iprin1): Adaption to print states.
5798 (scm_iprlist): An initial "hare and tortoise" scan brings down
5799 time complexity to O (depth * N). (Better time complexity will be
5800 achieved when the printing code is completely rewritten.)
5801
5802 Fri Sep 20 22:01:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
5803
5804 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): Use AC_CACHE_CHECK instead of
5805 AC_CACHE_VAL; #define UTIMBUF_NEEDS_POSIX outside AC_CACHE_VAL, so
5806 it gets done whether or not the cache variable has a value.
5807
5808 Thu Sep 19 17:06:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
5809
5810 Distinguish #f and ().
5811 * __scm.h: #undef SICP.
5812 * pairs.h (SCM_EOL): Delete this definition, equating it with
5813 SCM_BOOL_F.
5814 * tags.h (SCM_EOL): Give it a new definition here; I think I found
5815 the value it used to have. Doc fixes, too.
5816
5817 Thu Sep 19 15:33:51 1996 Mikael Djurfeldt <mdj@kenneth>
5818
5819 * struct.c (scm_make_struct_layout, init_struct, scm_struct_ref,
5820 scm_struct_set_x), struct.h, gc.c (scm_gc_mark): Completed Tom
5821 Lord's implementation of structs, allowing for tail arrays as
5822 described in the manual. Also fixed some bugs. (Both the interface
5823 and the implementation should be improved.)
5824
5825 * read.c (scm_init_read): Removed #ifdef READER_EXTENSIONS
5826
5827 * print.c, print.h: Closures now print like #<procedure foo (x)>.
5828 People who whish to see the source can do `(print-enable 'source)'.
5829 Removed #ifdef DEBUG_EXTENSIONS.
5830
5831 Thu Sep 19 00:00:29 1996 Gary Houston <ghouston@actrix.gen.nz>
5832
5833 * filesys.c (scsm_sys_stat): don't SIGSEGV if argument is an
5834 integer (assuming for now accepting an integer is a good thing).
5835
5836 * error.c, fports.c: replace use of %S in lgh_error args with %s.
5837 %S will be used instead for write'ing arguments.
5838
5839 * unif.c (scm_transpose_array): change arguments in the SCM_WNA
5840 asserts. fix a few other asserts.
5841 (scm_aind, scm_enclose_array, scm_array_in_bounds_p,
5842 scm_uniform_vector_ref, scm_array_set_x,
5843 scm_dimensions_to_unform_array): change args in
5844 SCM_WNA SCM_ASSERTS and change scm_wta's to scm_wrong_num_args.
5845 strop.c (scm_substring_move_left_x, scm_substring_move_right_x,
5846 scm_substring_fill_x): likewise.
5847 gsubr.c (scm_gsubr_apply): likewise.
5848 eval.c (SCM_APPLY): likewise.
5849
5850 * eval.c (4 places): replace scm_everr with lgh_error or
5851 scm_wrong_num_args.
5852
5853 * error.c, error.h (scm_wrong_num_args, scm_wrong_type_arg,
5854 scm_memory_error): new procedures.
5855 scm_everr: deleted. can use scm_wta, dropping first two args.
5856 scm_error: convert NULL subr to SCM_BOOL_F.
5857
5858 * __scm.h: don't define SCM_STACK_OVFLOW, SCM_EXIT, SCM_ARG6, SCM_ARG7,
5859 SCM_ARGERR.
5860
5861 * stackchk.c (scm_report_stack_overflow): use lgh_error instead
5862 of scm_wta.
5863
5864 * error.c, error.h: new error keys: scm_arg_type_key,
5865 scm_args_number_key, scm_memory_alloc_key, scm_stack_overflow_key,
5866 scm_misc_error_key.
5867 scm_wta: reimplement using lgh_error instead of scm_everr.
5868
5869 Wed Sep 18 17:13:35 1996 Mikael Djurfeldt <mdj@kenneth>
5870
5871 * gdbint.c: scm_lread now has one more argument.
5872
5873 * ports.c, ports.h: Name change: scm_\(line\|column\)_number -->
5874 scm_port_\1; Added mutator scm_set_port_filename_x (used when
5875 loading source from non-file ports, which, e. g., happens when
5876 using the Emacs interface).
5877
5878 * fports.c (scm_open_file): Don't call scm_makfrom0str on a scheme
5879 object.
5880
5881 * read.c: Added code for recording of positions of source code
5882 expressions; New functions: recsexpr, scm_lreadrecparen;
5883 _scm_make_srcprops --> scm_make_srcprops
5884 (scm_flush_ws): Removed updating of positions counters. This work
5885 is already done by scm_gen_getc
5886
5887 * read.h: Added prototype for scm_lreadrecparen
5888
5889 * print.c: Added #include "alist.h"
5890
5891 * eval.c: Added #include "hash.h"
5892
5893 * eq.c: Added #include "ramap.h"
5894
5895 * options.c: Documentation fixes.
5896
5897 * srcprop.c (scm_finish_srcprop): Bugfix: update ptr.
5898 (scm_init_srcprop): Adjusted size of initial source-whash. Name
5899 changes: tc16_srcprops --> scm_tc16_srcprops, _scm_make_srcprops
5900 --> scm_make_srcprops
5901
5902 * srcprop.h: Name changes: tc16_srcprops --> scm_tc16_srcprops,
5903 _scm_make_srcprops --> scm_make_srcprops; Remove one layer of
5904 function calls in the definition of the whash access macros.
5905
5906 Tue Sep 17 11:33:16 1996 Lee Iverson <leei@Canada.AI.SRI.COM>
5907
5908 * init.c (scm_boot_guile): Add level of indirection to
5909 scm_boot_guile_1() to ensure that stack base pointer is properly
5910 initialized. There was no guarantee that variable i was the
5911 highest/lowest variable on stack (i.e. the call frame of
5912 scm_boot_guile was not completely protected from gc).
5913
5914 Tue Sep 17 01:40:56 1996 Gary Houston <ghouston@actrix.gen.nz>
5915
5916 * ports.h (scm_port_table): put back file_name, it will be used to
5917 support debugging. Undo related changes in fports.c, ioext.c,
5918 ports.c, gc.c.
5919
5920 Sun Sep 15 03:58:29 1996 Gary Houston <ghouston@actrix.gen.nz>
5921
5922 * ports.h (scm_port_table): remove file_name member for now, it seems
5923 undesirable.
5924 * fports.c (scm_open_file): don't set file_name in PTAB.
5925 (prinfport): don't use file_name in PTAB.
5926 * ioext.c (scm_sys_duplicate_port): don't set file_name in PTAB.
5927 * ports.c (scm_add_to_port_table): don't intialize file_name.
5928 (scm_port_file_name): remove for now.
5929 * gc.c (scm_gc_mark): don't mark PTAB file_name.
5930
5931 * fports.h (scm_mkfile): prototype deleted.
5932 * fports.c (scm_mkfile): merged into scm_open_file to simplify.
5933
5934 * debug.c, unif.c: use scm_out_of_range instead of
5935 wta for range errors (ASSERT still needs work).
5936
5937 * error.c, error.h (scm_out_of_range): new procedure.
5938
5939 * error.c, error.h (scm_out_of_range_key): new key.
5940
5941 * posix.c (scm_sync): #else was missing.
5942
5943 * error.c, error.h: append _key to names scm_num_overflow and
5944 scm_system_error.
5945
5946 * __scm.h (SCM_SYSMISSING, SCM_NUM_OVERFLOW): use SCM_BOOL_F instead
5947 of consing an empty list.
5948 (SCM_SYSERROR etc.): move into error.c, make them procedures instead
5949 of macros, saves code and string space.
5950 error.c, fports.c, numbers.c, posix.c, ioext.c, filesys.c, socket.c,
5951 fdsocket.c, simpos.c: change names of SCM_SYSERROR etc., to
5952 lower case. Rename scm_syserror_m to scm_syserror_msg.
5953 error.h: prototypes for new procedures.
5954
5955 Sat Sep 14 03:35:41 1996 Gary Houston <ghouston@actrix.gen.nz>
5956
5957 * numbers.c: use SCM_NUM_OVERFLOW instead of scm_wta or ASSERT.
5958
5959 * error.c, error.h: setup scm_num_overflow key.
5960
5961 * __scm.h: SCM_NUM_OVERFLOW: macro for reporting numerical overflow.
5962 Remove definition of SCM_OVSCM_FLOW.
5963
5964 * fports.c (scm_open_file): use SCM_SYSERROR_M.
5965
5966 * __scm.h: SCM_SYSERROR_M: new macro for system errors with an
5967 explicit message and args.
5968
5969 * error.c, error.h, __scm.h: change system_error_sym to
5970 scm_system_error.
5971
5972 * error.c (system_error_sym): remove leading %% from the Scheme name
5973 "%%system-error".
5974
5975 * __scm.h (SCM_SYSMISSING): Redefine using lgh_error.
5976
5977 Fri Sep 13 12:58:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5978
5979 * __scm.h, chars.c, debug.c, eval.c, eval.h, extchrs.c, extchrs.h,
5980 fdsocket.c, feature.c, mbstrings.c, mbstrings.h, numbers.c,
5981 numbers.h, print.c, scmhob.h, simpos.h, symbols.c, symbols.h,
5982 tags.h, throw.c, variable.h: Name cleanup. Lots of xxxSCM_yyy
5983 renamed. (These were introduced by unsupervised name
5984 substitution.)
5985
5986 Fri Sep 13 01:19:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
5987
5988 * print.c: Added code for detection of circular references during
5989 printing. (init_ref_stack, grow_ref_stack): New functions. Added
5990 a hook for printing of closures (accessible via print options).
5991 This leads to a split of calls to scm_iprin1 into two classes:
5992 elementary print operations (e. g. the code which prints a smob)
5993 still use scm_iprin1 while top level calls (like scm_display) use
5994 scm_prin1. scm_prin1 begins by clearing the data structure used
5995 to record reference information.
5996
5997 * print.h: Added declarations of scm_prin1 and scm_prlist.
5998
5999 * strports.c (scm_strprint_obj): scm_iprin1 --> scm_prin1
6000
6001 * gscm.c (gscm_portprint_obj): scm_iprin1 --> scm_prin1
6002
6003 * gscm.h (gscm_print_obj): scm_iprin1 --> scm_prin1
6004
6005 * error.c (err_head): scm_iprin1 --> scm_prin1
6006
6007 * debug.c: Adjusted header comment.
6008
6009 * tags.h: Typo.
6010
6011 Wed Sep 11 17:55:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
6012
6013 * strerror.c: Doc fix.
6014
6015 Thu Sep 12 00:00:32 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
6016
6017 * gdbint.c (gdb_read): Now possible to run during GC.
6018 (unmark_port, remark_port): New functions.
6019
6020 * symbols.h (SCM_SETLENGTH): Use SCM_SETCAR.
6021
6022 * read.c (scm_grow_tok_buf): Use scm_vector_set_length_x instead
6023 of allocating a new string object. Also, increase size by
6024 the factor 2 instead of 1.5.
6025
6026 Wed Sep 11 15:10:38 1996 Petr Adamek <jimb@floss.cyclic.com>
6027
6028 * __scm.h (SCM_P): Corrected to run under traditional C.
6029
6030 * _scm.h (SCM_PROC): Extraneous semicolon (outside functions)
6031 removed.
6032
6033 * async.c: Calls to scm_sysintern corrected.
6034
6035 * async.h (scm_async_clock): Redundant declaration removed.
6036
6037 * continuations.c (scm_dynthrow): Redundant declaration removed.
6038
6039 * debug.c (scm_single_step, scm_memoized, scm_lookup_soft):
6040 Definition typos corrected.
6041
6042 * debug.h: Missing declarations of functions in debug.c added
6043 (lots).
6044
6045 * eval.h (scm_eval_args, scm_deval_args, scm_m_undefine):
6046 Missing declarations to functions in eval.c added.
6047
6048 * filesys.c: Possibly uninitialized variable rv.
6049
6050 * gc.h (scm_object_addr, scm_unhash_name): Missing
6051 declarations of functions defined in gc.c added.
6052
6053 * genio.c: Possible typos str_data -> wstr_data. ???
6054
6055 * genio.c: Possibly unintended shadowing of local variable
6056 `int c' (gotos out of scope of inner `c'). ???
6057
6058 * init.c: Uninitialized `SCM last' may be used.
6059
6060 * ioext.h: (scm_sys_isatty_p): Typo.
6061
6062 * list.h (scm_list_head): Missing prototype for function in
6063 list.c added.
6064
6065 * numbers.c (scm_two_doubles): Changed from extern to static
6066 (is used only within numbers.c).
6067
6068 * numbers.h: Repeated declarations removed.
6069
6070 * ports.h (scm_close_all_ports_except): Declaration for the
6071 function defined in ports.c added.
6072
6073 * posix.h: Missing declarations added.
6074
6075 * procs.h (scm_make_subr_opt): Missing declaration added.
6076
6077 * socket.h (scm_sys_gethost): Missing declaration added.
6078
6079 * socket.h: Redundant declarations removed (they are in fdsocket.h).
6080
6081 * srcprop.h (scm_set_source_property_x, scm_finish_srcprop):
6082 Missing declarations added.
6083
6084 * stime.h (scm_get_internal_real_time): Repeated declarations removed.
6085
6086 * struct.c: Uninitialized variable `SCM answer' may be used.
6087
6088 * unif.c (l2ra): Declaration prototype.
6089
6090 * unif.c (scm_array_equal_p): Dummy definition removed (it is
6091 defined in ramap.c).
6092
6093 * unif.h (scm_raprin1, scm_istr2bve, scm_array_equal_p):
6094 Redundant declarations removed (they are in ramap.h).
6095
6096 * variable.h (scm_make_udvariable,
6097 scm_make_undefined_variable): Declaration corrected to
6098 correspond variable.c.
6099
6100 * vectors.h (scm_vector_move_left_x, scm_vector_move_right_x):
6101 Missing declarations added.
6102
6103 Wed Sep 11 14:38:50 1996 Jim Blandy <jimb@floss.cyclic.com>
6104
6105 * Makefile.in (distclean): Don't forget to delete fd.h.
6106
6107 Tue Sep 10 14:01:46 1996 Jim Blandy <jimb@floss.cyclic.com>
6108
6109 * fd.h.in, tags.h: Trivial cleanups.
6110
6111 * marksweep.c, marksweep.h: Deleted; marksweep.c was empty, and
6112 marksweep.h just declared functions from gc.c.
6113 * gc.h, libguile.h: Don't #include "marksweep.h".
6114 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
6115 marksweep.o, marksweep.h, marksweep.c, and marksweep.x. Other
6116 dependencies updated.
6117
6118 * libguile.h: Don't #include "files.h"; it's been deleted.
6119
6120 * files.c (scm_sys_delete_file): Moved to filesys.c.
6121 File is now empty; deleted.
6122 * files.h: Deleted.
6123 * filesys.c: scm_sys_delete_file is now here. Remove
6124 #if's; they seem to rely on remnants of an old portability
6125 regimen. If the problems come up again, solve them properly,
6126 using autoconf. Specifically: Don't test M_SYSV, and #define
6127 remove to be unlink if it's #defined; don't use remove just
6128 because HAVE_STDC_HEADERS is #defined.
6129 * filesys.h: Add declarations for scm_sys_delete_file.
6130 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
6131 files.o, files.h, files.c, and files.x.
6132 * init.c: Don't #include "files.h", and don't call scm_init_files.
6133
6134 Use SCM_P instead of PROTO; the latter intrudes on the user's
6135 namespace.
6136 * params.h: Deleted; definition of SCM_P moved to...
6137 * __scm.h: ... here, where it replaces PROTO macro.
6138 * libguile.h, smob.h: Don't #include "params.h".
6139 * continuations.c, error.h, feature.h, gc.c, gc.h, init.h, load.h,
6140 smob.h: Fix prototypes accordingly.
6141 * Makefile.in: Update dependencies.
6142 (inner_h_files): Remove params.h.
6143
6144 * gc.c: #include "gc.h"; every module should include its header,
6145 to let the compiler cross-check the declarations against the
6146 definitions.
6147
6148 * eq.h, files.h, hashtab.h, load.h, mallocs.h, scmsigs.h,
6149 simpos.h: #include "libguile/__scm.h".
6150
6151 Mon Sep 9 20:00:15 1996 Jim Blandy <jimb@floss.cyclic.com>
6152
6153 * init.c: Don't forget to #include smob.h and init.h.
6154 * Makefile.in: Dependencies updated.
6155
6156 * smob.h: Use PROTO instead of #if __STDC__.
6157
6158 * continuations.c (scm_dynthrow): Use PROTO, not SCM_P.
6159
6160 * __scm.h: Doc fixes.
6161
6162 * __scm.h, libguile.h: Use "quotes" in the #includes, not
6163 <angles>; this allows `make depends' to work properly.
6164
6165 * libguile.h: #include smob.h and pairs.h before the others; they
6166 define typedefs used by other headers.
6167
6168 C files should #include only the header files they need, not
6169 libguile.h (which #includes all the header files); the pointless
6170 recompilation was wasting my time.
6171 * Makefile.in (all .o dependency lists): Regenerated.
6172 * libguile.h: Don't try to get a definition for size_t here...
6173 * __scm.h: Do it here.
6174 * _scm.h: Since this is the internal libguile header, put things
6175 here that all (or a majority) of the libguile files will want.
6176 Don't #include <libguile.h> here; that generates dependencies on
6177 way too much. Instead, get "__scm.h", "error.h", "pairs.h",
6178 "list.h", "gc.h", "gsubr.h", "procs.h", "numbers.h", "symbols.h",
6179 "boolean.h", "strings.h", "vectors.h", "root.h", "ports.h", and
6180 "async.h".
6181 * alist.c: Get "eq.h", "list.h", "alist.h".
6182 * append.c: Get "append.h", "list.h".
6183 * arbiters.c: Get "arbiters.h", "smob.h".
6184 * async.c: Get "async.h", "smob.h", "throw.h", "eval.h".
6185 * boolean.c: Get "boolean.h".
6186 * chars.c: Get "chars.h".
6187 * continuations.c: Get "continuations.h", "dynwind.h", "debug.h",
6188 "stackchk.h".
6189 * debug.c: Get "debug.h", "feature.h", "read.h", "strports.h",
6190 "continuations.h", "alist.h", "srcprop.h", "procprop.h", "smob.h",
6191 "genio.h", "throw.h", "eval.h".
6192 * dynwind.c: Get "dynwind.h", "alist.h", "eval.h".
6193 * eq.c: Get "eq.h", "unif.h", "smob.h", "strorder.h",
6194 "stackchk.h".
6195 * error.c: Get "error.h", "throw.h", "genio.h", "pairs.h".
6196 * eval.c: Get "eval.h", "stackchk.h", "srcprop.h", "debug.h",
6197 "hashtab.h", "procprop.h", "markers.h", "smob.h", "throw.h",
6198 "continuations.h", "eq.h", "sequences.h", "alist.h", "append.h",
6199 "debug.h".
6200 * fdsocket.c: Get "fdsocket.h", "unif.h", "filesys.h".
6201 * feature.c: Get "feature.h".
6202 * files.c: Get "files.h".
6203 * filesys.c: Get "filesys.h", "smob.h", "genio.h".
6204 * fports.c: Get "fports.h", "markers.h".
6205 * gc.c: Get "async.h", "unif.h", "smob.h", "weaks.h",
6206 "genio.h", "struct.h", "stackchk.h", "stime.h".
6207 * gdbint.c: Get "gdbint.h", "chars.h", "eval.h", "print.h",
6208 "read.h", "strports.h", "tag.h".
6209 * genio.c: Get "genio.h", "chars.h".
6210 * gsubr.c: Get "gsubr.h", "genio.h".
6211 * hash.c: Get "hash.h", "chars.h".
6212 * hashtab.c: Get "hashtab.h", "eval.h", "hash.h", "alist.h".
6213 * init.c: Get everyone who has an scm_init_mumble function:
6214 "weaks.h", "vports.h", "version.h", "vectors.h", "variable.h",
6215 "unif.h", "throw.h", "tag.h", "symbols.h", "struct.h",
6216 "strports.h", "strorder.h", "strop.h", "strings.h", "stime.h",
6217 "stackchk.h", "srcprop.h", "socket.h", "simpos.h", "sequences.h",
6218 "scmsigs.h", "read.h", "ramap.h", "procs.h", "procprop.h",
6219 "print.h", "posix.h", "ports.h", "pairs.h", "options.h",
6220 "objprop.h", "numbers.h", "mbstrings.h", "mallocs.h", "load.h",
6221 "list.h", "kw.h", "ioext.h", "hashtab.h", "hash.h", "gsubr.h",
6222 "gdbint.h", "gc.h", "fports.h", "filesys.h", "files.h",
6223 "feature.h", "fdsocket.h", "eval.h", "error.h", "eq.h",
6224 "dynwind.h", "debug.h", "continuations.h", "chars.h", "boolean.h",
6225 "async.h", "arbiters.h", "append.h", "alist.h".
6226 * ioext.c: Get "ioext.h", "fports.h".
6227 * kw.c: Get "kw.h", "smob.h", "mbstrings.h", "genio.h".
6228 * list.c: Get "list.h", "eq.h".
6229 * load.c: Get "load.h", "eval.h", "read.h", "fports.h".
6230 * mallocs.c: Get "smob.h", "genio.h".
6231 * markers.c: Get "markers.h".
6232 * mbstrings.c: Get "mbstrings.h", "read.h", "genio.h", "unif.h",
6233 "chars.h".
6234 * numbers.c: Get "unif.h", "genio.h".
6235 * objprop.c: Get "objprop.h", "weaks.h", "alist.h", "hashtab.h".
6236 * options.c: Get "options.h".
6237 * ports.c: Get "ports.h", "vports.h", "strports.h", "fports.h",
6238 "markers.h", "chars.h", "genio.h".
6239 * posix.c: Get "posix.h", "sequences.h", "feature.h", "unif.h",
6240 "read.h", "scmsigs.h", "genio.h", "fports.h".
6241 * print.c: Get "print.h", "unif.h", "weaks.h", "read.h",
6242 "procprop.h", "eval.h", "smob.h", "mbstrings.h", "genio.h",
6243 "chars.h".
6244 * procprop.c: Get "procprop.h", "eval.h", "alist.h".
6245 * procs.c: Get "procs.h".
6246 * ramap.c: Get "ramap.h", "feature.h", "eval.h", "eq.h",
6247 "chars.h", "smob.h", "unif.h".
6248 * read.c: Get "alist.h", "kw.h", "mbstrings.h", "unif.h",
6249 "eval.h", "genio.h", "chars.h".
6250 * root.c: Get "root.h", "stackchk.h".
6251 * scmsigs.c: Get "scmsigs.h".
6252 * sequences.c: Get "sequences.h".
6253 * simpos.c: Get "simpos.h", "scmsigs.h".
6254 * smob.c: Get "smob.h".
6255 * socket.c: Get "socket.h", "feature.h".
6256 * srcprop.c: Get "srcprop.h", "weaks.h", "hashtab.h", "debug.h",
6257 "alist.h", "smob.h".
6258 * stackchk.c: Get "stackchk.h", "genio.h".
6259 * stime.c: Get "stime.h"."libguile/continuations.h".
6260 * strings.c: Get "strings.h", "chars.h".
6261 * strop.c: Get "strop.h", "chars.h".
6262 * strorder.c: Get "strorder.h", "chars.h".
6263 * strports.c: Get "strports.h", "print.h", "eval.h", "unif.h".
6264 * struct.c: Get "struct.h", "chars.h".
6265 * symbols.c: Get "symbols.h", "mbstrings.h", "alist.h",
6266 "variable.h", "eval.h", "chars.h".
6267 * tag.c: Get "tag.h", "struct.h", "chars.h".
6268 * throw.c: Get "throw.h", "continuations.h", "debug.h",
6269 "dynwind.h", "eval.h", "alist.h", "smob.h", "genio.h".
6270 * unif.c: Get "unif.h", "feature.h", "strop.h", "sequences.h",
6271 "smob.h", "genio.h", "eval.h", "chars.h".
6272 * variable.c: Get "variable.h", "smob.h", "genio.h".
6273 * vectors.c: Get "vectors.h", "eq.h".
6274 * version.c: Get "version.h".
6275 * vports.c: Get "vports.h", "fports.h", "chars.h", "eval.h".
6276 * weaks.c: Get "weaks.h".
6277
6278 * stackchk.h: #include "libguile/debug.h",
6279
6280 * print.h, read.h: #include "options.h", since everyone who uses
6281 either of these files will need that.
6282
6283 * smob.h: #include "ports.h", "genio.h", and "print.h", since
6284 anyone who uses this file will need them to define the smob
6285 printing functions. Also, get markers.h, since people will need
6286 to #define the mark functions.
6287
6288 * smob.h (scm_ptobfuns, SCM_PTOBNUM): Definitions moved...
6289 * ports.h: ... to here.
6290
6291 * ports.h (scm_port_table_size): Explicitly give type as 'int';
6292 don't rely on archaic C default type rules.
6293
6294 * fports.h: #include "libguile/ports.h", since you need that in
6295 order to parse this.
6296
6297 * genio.h: #include "libguile/print.h", because you need that to
6298 parse this; don't bother #including "ports.h", since print.h gets
6299 that.
6300
6301 * error.h: Don't #include "pairs.h"; _scm.h will do that now.
6302
6303 * eval.h (scm_top_level_lookup_thunk_var): Remove declaration for
6304 this; it's now a reference to an element of *scm_root.
6305
6306 * debug.h: Don't #include "options.h"; the compiler won't be able
6307 to find that once the headers are installed; instead, #include
6308 "libguile/options.h".
6309 * gc.h: Same, with marksweep.h.
6310 * mbstrings.h: Same, with symbols.h.
6311 * scmhob.h: Same, with _scm.h.
6312 * smob.h: Same, with params.h.
6313
6314 * Makefile.in (depends): Don't nuke scmconfig.h and the generated
6315 C files; there's no need for this, and it forces recompilations
6316 unnecessarily.
6317
6318 Sat Sep 7 06:57:23 1996 Gary Houston <ghouston@actrix.gen.nz>
6319
6320 * error.c (scm_error): declare scm_error_callback.
6321
6322 * error.h: prototype for scm_error_callback.
6323
6324 * __scm.h: define lgh_error.
6325 (SCM_SYSERROR): redefine using lgh_error.
6326
6327 Thu Sep 5 22:40:06 1996 Gary Houston <ghouston@actrix.gen.nz>
6328
6329 * error.c (scm_error): new procedure.
6330
6331 * error.h: prototype for scm_error.
6332
6333 * Makefile.in (install): install scmconfig.h from the current
6334 directory, not $(srcdir).
6335
6336 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
6337
6338 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
6339 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
6340 feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h,
6341 hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h,
6342 mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h,
6343 posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
6344 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
6345 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
6346 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
6347 vports.h, weaks.h: #include "libguile/__scm.h", not
6348 <libguile/__scm.h>. This allows 'gcc -MM' to determine which
6349 dependencies are within libguile properly.
6350
6351 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
6352
6353 * Makefile.in (.c.x): Simplify; there's no need to run this rule
6354 when scmconfig.h doesn't exist.
6355
6356 * load.c (scm_sys_try_load): Correct spelling.
6357
6358 * feature.c (scm_loc_features): Make this static.
6359
6360 * Makefile.in (libpath.h): Omit trailing slash from path. We
6361 shouldn't require it of users, so why put it here?
6362
6363 Move code to initialize and search %load-path from ice-9 to C
6364 code, so we can use the load-path to find the ice-9 boot code;
6365 this makes it easier to run Guile without installing it. See
6366 corresponding changes in guile/Makefile.in.
6367 * feature.c: Move stuff concerned with the load path to load.c.
6368 (scm_compiled_library_path): Deleted.
6369 Don't #include libpath.h here.
6370 * feature.h: Don't mention scm_compiled_library_path.
6371 * load.c: #include "libpath.h" here, as well as <sys/types.h>,
6372 <sys/stat.h>, and <unistd.h> (if present).
6373 (R_OK): #define if the system hasn't deigned to.
6374 (scm_loc_load_path): New variable.
6375 (scm_init_load_path, scm_sys_search_load_path,
6376 scm_sys_try_load_path): New functions.
6377 (scm_init_load): Initialize scm_loc_load_path to point to the
6378 value cell of the Scheme %load-path variable.
6379 * load.h: Add declarations for scm_sys_search_load_path,
6380 scm_sys_try_load_path.
6381 * init.c: Call scm_init_load_path.
6382 * Makefile.in (feature.o, load.o): Dependencies updated.
6383
6384 * load.c, load.h: Rewrite using PROTO macro.
6385
6386 Thu Sep 5 01:54:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
6387
6388 * gc.c (scm_cellp): New function: C predicate to determine if an
6389 SCM value can be regarded as a pointer to a cell on the heap.
6390
6391 * gc.h: Added declaration of scm_cellp.
6392
6393 * gdb_interface.h: New file: The GDB interface header from the GDB
6394 distribution.
6395
6396 * gdbint.c: New file: GDB interface.
6397
6398 * gdbint.h: New file: GDB interface.
6399
6400 * libguile.h: Added #include <libguile/gdbint.h>.
6401
6402 * init.c (scm_boot_guile): Added scm_init_gdbint.
6403
6404 * Makefile.in: Added gdb_interface.h, gdbint.[hc].
6405 Added -I.. to INCLUDE_CFLAGS (otherwise the include files won't be
6406 found if object files and source are kept separate).
6407
6408 Wed Sep 4 14:35:02 1996 Jim Blandy <jimb@floss.cyclic.com>
6409
6410 * feature.h, feature.c: Use PROTO macro, instead of #if __STDC__.
6411
6412 Wed Sep 4 01:30:47 1996 Jim Blandy <jimb@totoro.cyclic.com>
6413
6414 * configure.in: Don't substitute the values of TCL_SRC_DIR and
6415 TK_SRC_DIR; they're not relevant any more.
6416
6417 * Makefile.in (CC): Don't list -Wall here; it's a GCC-specific flag.
6418 * configure.in: Instead, put it in CFLAGS here, iff we're using GCC.
6419
6420 Wed Sep 4 00:55:49 1996 Jim Blandy <jimb@floss.cyclic.com>
6421
6422 * PLUGIN/guile.config (xtra_cflags): Include .. in the header
6423 search path, so we can find the <libguile/MUMBLE.h> headers.
6424
6425 * Makefile.in (ancillary): List aclocal.m4, for 'make dist'.
6426
6427 * Makefile.in (ALL_CFLAGS): Don't mention CFLAGS here; it's
6428 implicit in the .c.o rule.
6429 (.c.x): Don't mention ALL_CFLAGS here; its value is included in
6430 $(CC) already.
6431
6432 Put the library path in a header file, instead of passing it on
6433 the command line in every compilation.
6434 * Makefile.in (libpath.h): New target.
6435 (feature.o): Depend on libpath.h.
6436 (clean): Delete libpath.h.
6437 (ALL_CFLAGS): Don't use -DLIBRARY_PATH here. Instead ...
6438 * feature.c: ... #include "libpath.h" here.
6439 * .cvsignore: Ignore libpath.h.
6440
6441 Don't install the unwashed masses of Guile header files in the
6442 main #include path; put most of them in a subdirectory called
6443 'libguile'. This avoids naming conflicts between Guile header
6444 files and system header files (of which there were a few).
6445 * Makefile.in (pkgincludedir): Deleted.
6446 (innerincludedir): New variable; this and $(includedir) are enough.
6447 (INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
6448 (installed_h_files): Divide this up. Now this variable lists
6449 those header files which should go into $(includedir) (i.e. appear
6450 directly in the #include path), and ...
6451 (inner_h_files): ... this new variable says which files appear in
6452 a subdirectory, and are referred to as <libguile/mumble.h>.
6453 (h_files): List them both.
6454 (install): Create innerincludedir, not pkgincludedir. Put
6455 the installed_h_files and inner_h_files in their proper places.
6456 (uninstall): Corresponding changes.
6457 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
6458 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
6459 feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
6460 ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
6461 mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
6462 print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
6463 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
6464 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
6465 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
6466 vports.h, weaks.h: Find __scm.h in its new location.
6467 * __scm.h: Find scmconfig.h and tags.h in their new locations
6468 (they're both "inner" files).
6469
6470 Tue Sep 3 20:27:35 1996 Jim Blandy <jimb@floss.cyclic.com>
6471
6472 * Makefile.in (.c.x): Remove duplicate use of $(ALL_CFLAGS).
6473
6474 Tue Sep 3 19:53:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
6475
6476 * posix.c: Doc fixes.
6477
6478 Mon Sep 2 15:22:40 1996 Jim Blandy <jimb@totoro.cyclic.com>
6479
6480 * socket.c: Don't include a prototype for inet_aton; just use a
6481 K&R style declaration, to avoid warnings but minimize the chance
6482 of conflicts with the system.
6483
6484 On NextStep, <utime.h> doesn't define struct utime, unless we
6485 #define _POSIX_SOURCE before #including it.
6486 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): New test.
6487 * acconfig.h: New comment text for above CPP symbol.
6488 * configure.in: Call it.
6489 * posix.c: #define _POSIX_SOURCE if it seems necessary.
6490
6491 * configure.in (AC_CHECK_HEADERS): Include sys/utime.h and utime.h
6492 in the list.
6493 * posix.c: Check HAVE_SYS_UTIME_H and HAVE_UTIME_H, instead of
6494 testing for __EMX__.
6495
6496 * posix.c: #include <libc.h>, if it exists.
6497
6498 * posix.c: Cast the return result to GETGROUPS_T, not gid_t; we
6499 don't even know if the latter exists.
6500
6501 * posix.c (s_sys_setpgid, s_sys_setsid, s_sys_ctermid,
6502 s_sys_tcgetpgrp, s_sys_tcsetpgrp): Renamed from s_setpgid,
6503 s_setsid, s_ctermid, s_tcgetpgrp, s_tcsetpgrp, for consistency.
6504
6505 * posix.c (R_OK, W_OK, X_OK, F_OK): #define these if the system's
6506 header files don't.
6507 (scm_init_posix): Use them when initializing the Scheme constants
6508 of the same name.
6509
6510 Fri Aug 30 16:01:30 1996 Jim Blandy <jimb@floss.cyclic.com>
6511
6512 * Makefile.in (libdir, includedir, bindir): Use the
6513 autoconf-supplied values, instead of deriving them ourselves.
6514 (pkgincludedir, datadir, pkgdatadir): New variables.
6515 (install, uninstall): Put the header files in a special
6516 subdirectory, not in the main search path.
6517
6518 * Makefile.in (ALL_CFLAGS): Provide the proper value for
6519 LIBRARY_PATH --- use $(pkgdatadir) instead of $(libdir).
6520
6521 * Makefile.in (IMPLPATH): Deleted; never used.
6522
6523 * Makefile.in (TCL_SRC_DIR, TK_SRC_DIR): Deleted; we don't depend
6524 on the Tcl/Tk source any more.
6525 (INCLUDE_CFLAGS): Remove references to the above.
6526
6527 * Makefile.in (version.o): Corrected dependencies.
6528
6529 Thu Aug 29 23:06:19 1996 Thomas Morgan <tmorgan@gnu.ai.mit.edu>
6530
6531 * libguile.h: #include "version.h"
6532
6533 * init.c (scm_boot_guile): Call scm_init_version.
6534 * gscm.c (gscm_run_scm): Call scm_init_version.
6535
6536 * configure.in (GUILE_MAJOR_VERSION, GUILE_MINOR_VERSION,
6537 GUILE_VERSION): AC_DEFINE these.
6538 (acconfig.h): #undef the above symbols.
6539
6540 * Makefile.in (libobjs): Add version.o.
6541 (installed_h_files): Add version.h.
6542 (c_files): Add version.c.
6543 (gen_c_files): Add version.x.
6544 (version.o): New rule.
6545 (alist.o, append.o, appinit.o, arbiters.o, async.o, boolean.o,
6546 chars.o, continuations.o, dynwind.o, eq.o, error.o, eval.o,
6547 fdsocket.o, feature.o, files.o, filesys.o, fports.o, gc.o,
6548 genio.o, gsubr.o, hash.o, hashtab.o, init.o, kw.o, list.o, load.o,
6549 mallocs.o, markers.o, marksweep.o, mbstrings.o, numbers.o,
6550 objprop.o, pairs.o, ports.o, posix.o, print.o, procprop.o,
6551 procs.o, ramap.o, read.o, root.o, scmsigs.o, sequences.o,
6552 simpos.o, smob.o, socket.o, stackchk.o, stime.o, strings.o,
6553 strop.o, strorder.o, strports.o, struct.o, symbols.o, tag.o,
6554 throw.o, unif.o, variable.o, vectors.o, version.o, vports.o,
6555 weaks.o): Add version.h to dependency lists.
6556 (markers.o): Remove duplicate rule.
6557
6558 * version.h: New file.
6559
6560 * version.c: New file.
6561
6562 Thu Aug 29 15:21:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
6563
6564 * symbols.c (scm_strhash): scm_downcase is now a function, not an
6565 array; use it appropriately. Since GCC is quite happy to
6566 subscript functions, it never warned us about this; we should use
6567 -Wpointer-arith in the future. I guess we never tested
6568 case-insensitivity.
6569
6570 Wed Aug 28 18:52:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
6571
6572 * socket.c: Doc and copyright fixes.
6573
6574 Sat Aug 24 05:29:19 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
6575
6576 * debug.c: Fixed and improved gdb support.
6577
6578 Fri Aug 23 18:00:16 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
6579
6580 * socket.c: Added declaration of inet_aton to avoid compiler
6581 warning. (Hope this solution is correct.)
6582
6583 * stime.c: Added declaration of ftime. (This is missing in
6584 Solaris 2 headers.)
6585
6586 Fri Aug 23 02:03:32 1996 Gary Houston <ghouston@actrix.gen.nz>
6587
6588 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
6589
6590 * Makefile.in (c_files): add strerror.c.
6591
6592 * strerror.c: new file from Emacs' sysdep.c.
6593 maybe configure should also check for sys_errlist.
6594
6595 * configure.in (AC_REPLACE_FUNCS): add strerror.
6596
6597 Fri Aug 23 03:02:46 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
6598
6599 * debug.c (scm_init_debug): Added initialization for
6600 scm_evaluator_traps.
6601
6602 * debug.h, debug.c: Various name changes.
6603 (Mostly prefixing with SCM_.) Renamed "debug-options" -->
6604 "debug-options-interface". See commentary in options.c.
6605
6606 * options.h, options.c: Options now have documentation strings.
6607 Also added a long explanatory commentary.
6608
6609 * eval.c, print.h, print.c, read.h, read.c: Modifications to
6610 run-time options.
6611
6612 * gscm.c, init.c, root.c, throw.c: Bug fixes:
6613 last_debug_info_frame is now updated in all cases.
6614
6615 * __scm.h, stackchk.h, stackchk.c: Guile now performs stack
6616 checking.
6617
6618 Thu Aug 22 17:34:17 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
6619
6620 * __scm.h: SCM_STACK_LIMIT removed (now a run-time option).
6621 Added option STACK_CHECKING.
6622
6623 Tue Aug 20 18:48:40 1996 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6624
6625 * Makefile.in: Added {debug,options,srcprop}.{h,c}
6626
6627 * __scm.h: Removed symbols for debugging support.
6628
6629 * acconfig.h: Added symbols for debugging support.
6630
6631 * configure.in: Added user option for debugging support.
6632 --enable-debug will include the debugging code into libguile.a.
6633
6634 * continuations.c (scm_make_cont): Enlarged the #if 0 around
6635 scm_relocate_chunk_to_heap.
6636
6637 * debug.c: New file: low-level debugging support. It also
6638 includes support for debugging with gdb. (The extensions to gdb
6639 are written by Per Bothner at Cygnus.)
6640
6641 * debug.h: New file: low-level debugging support.
6642
6643 * eval.c: scm_m_set and SCM_IM_SET no longer supports multiple
6644 argument pairs. Extensive modifications to the debugging
6645 evaluator. Added "SECTION:" commentaries to clarify what happens
6646 when, during double compilation. Renamed EVALIMP --> EVALIM.
6647 Renamed EVAL --> XEVAL. Removed function evalcar. Defined
6648 evalcar to scm_eval_car. Added explanation of "EVAL" symbols to
6649 the beginning of the file. New procedure: scm_unmemocopy.
6650 Added some global state variables needed by the debugging
6651 evaluator: scm_ceval_ptr, last_debug_info_frame, debug_mode,
6652 check_entry, check_apply, check_exit, debug_options and
6653 evaluator_traps. New acro: undefine.
6654
6655 * eval.h: Renamed EVAL --> XEVAL.
6656
6657 * gc.c (scm_init_storage): Renamed scm_make_weak_hash_table
6658 --> scm_make_weak_key_hash_table.
6659
6660 * init.c (scm_restart_stack, scm_boot_guile): Added initialization
6661 of SCM_DFRAME. Added calls to scm_init_{debug,options,srcprop}.
6662
6663 * libguile.h: Conditionally include debug.h
6664
6665 * objprop.c (scm_object_properties, scm_set_object_properties_x):
6666 scm_object_properties shouldn't return handle. `handle' now gets
6667 initialized in scm_set_object_properties_x. scm_object_properties
6668 doesn't any longer create an entry in scm_object_whash.
6669
6670 * options.c: New file: handling of run time options.
6671
6672 * options.h: New file: handling of run time options.
6673
6674 * posix.c (scm_getpgrp): Cast pointer to getpgrp.
6675
6676 * print.c: New procedure: scm_print_options
6677
6678 * print.h: Defines for print options.
6679
6680 * read.c: New procedure: scm_read_options
6681
6682 * read.h: Defines for reader options.
6683
6684 * root.h: Added scm_source_whash among scm_sys_protects.
6685
6686 * srcprop.c: New file: source properties.
6687
6688 * srcprop.h: New file: source properties.
6689
6690 * throw.c (jbsmob): Jump buffers are now correctly allocated.
6691 (Bug found by A. Green.)
6692
6693 * weak.c: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
6694
6695 * weak.h: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
6696
6697 Thu Aug 15 02:05:14 1996 Jim Blandy <jimb@totoro.cyclic.com>
6698
6699 * libguile.h: #include "objprop.h"; I guess this was forgotten.
6700
6701 * init.c (scm_boot_guile): Don't call scm_init_rgx; it's a plugin,
6702 and should be called by the final client.
6703
6704 Wed Aug 14 21:41:37 1996 Jim Blandy <jimb@totoro.cyclic.com>
6705
6706 * gc.h: Use the PROTO macro when declaring functions.
6707 * gc.c: Use the PROTO macro when declaring static functions.
6708 Remove the CPP hair around function definitions.
6709
6710 * gc.c (scm_init_storage): Initialize scm_asyncs.
6711
6712 * libguile.h: #include "__scm.h" before testing the STDC_HEADERS
6713 preprocessor symbol; "__scm.h" is where it might get #defined.
6714 * __scm.h: Similar: #include <scmconfig.h> before testing
6715 HAVE_LIMITS_H.
6716
6717 * __scm.h: It's HAVE_LIMITS_H, not HAVE_LIMITSH.
6718
6719 Fri Aug 9 11:09:28 1996 Jim Blandy <jimb@totoro.cyclic.com>
6720
6721 * init.c (scm_boot_guile): Add init_func argument; call
6722 (*init_func) instead of calling scm_appinit; it's ucky to
6723 hard-code names for the user's procedures.
6724 * init.h (scm_boot_guile): Adjust declaration.
6725
6726 * __scm.h (PROTO): New macro, for declaring functions with
6727 prototypes.
6728
6729 * init.h (scm_start_stack, scm_restart_stack): Use PROTO;
6730 eliminate all the __STDC__ conditionals.
6731 (scm_boot_guile): Add declaration.
6732 * init.c (scm_start_stack, scm_restart_stack, scm_boot_guile):
6733 Remove __STDC__ conditionals around function definitions; the
6734 declarations in init.h will provide the same information, more
6735 usefully.
6736
6737 * __scm.h (SCM_SYSMISSING): When we don't have ENOSYS, don't
6738 complain about it in the error message; the error message is
6739 adequate without that note, and there's nothing the user can do
6740 about it.
6741
6742 Wed Aug 7 14:14:46 1996 Jim Blandy <jimb@totoro.cyclic.com>
6743
6744 * Makefile.in (ancillary): Drop def.sed.
6745
6746 * posix.c (scm_init_posix): Use numeric values, rather than
6747 CPP symbols, when defining the scheme values R_OK, W_OK, X_OK, and
6748 F_OK. The symbols aren't available on some systems, and I'm
6749 pretty sure their values are fixed by common widespread practice.
6750 * ioext.c (scm_init_ioext): Code here defined them too; remove it.
6751
6752 More functions unavailable on some systems.
6753 * configure.in (AC_CHECK_FUNCS): Add ctermid, setpgid, setsid,
6754 tcgetpgrp, tcsetpgrp, and waitpid to the list of functions to
6755 check for.
6756 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
6757 * posix.c (scm_sys_ctermid, scm_sys_setpgid, scm_sys_setsid,
6758 scm_sys_tcgetpgrp, scm_sys_tcsetpgrp, scm_sys_waitpid): Put the
6759 bodies of these functions in "#ifdef HAVE_MUMBLE" clauses, with a
6760 stub that signals an error as the #else.
6761
6762 * Makefile.in (ancillary): Drop acconfig-1.5.h; add acconfig.h.
6763
6764 Wed Aug 7 06:28:42 1996 Gary Houston <ghouston@actrix.gen.nz>
6765
6766 * Fixes motivated by Petr Adamek <adamek@mit.edu>:
6767
6768 * unif.c: include ramap.h.
6769
6770 * read.c (endif): case_insensative_p renamed case_insensitive_p.
6771
6772 * ramap.h: rename scm_array_copy prototypes to scm_array_copy_x.
6773
6774 * ports.c: include sys/ioctl.h.
6775
6776 * scmconfig.h.in: add HAVE_SYS_IOCTL_H.
6777
6778 * configure.in: check for sys/ioctl.h.
6779
6780 * ports.c: include <malloc.h> not "malloc.h".
6781
6782 * mallocs.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
6783
6784 * fports.c: remove ttyname and tmpnam declarations.
6785
6786 * posix.c: fewer ttyname declarations.
6787
6788 * fports.c: include <string.h> not "string.h".
6789
6790 * init.c, ioext.c: include string.h and unistd.h.
6791
6792 * gc.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
6793
6794 * async.c, strings.h, strports.c, struct.c, symbols.c, feature.c,
6795 genio.c, simpos.c, vports.c: include string.h.
6796
6797 * socket.c, fdsocket.c: include string.h only if HAVE_STRING_H.
6798
6799 * fdsocket.c (getsockopt, setsockopt): change type of optlen from
6800 scm_sizet to int.
6801 (scm_addr_buffer_size): change type from scm_sizet to int.
6802 (accept, getsockname, getpeername, recvfrom): change type of tmp_size
6803 from scm_sizet to int.
6804
6805 * error.c: include unistd.h.
6806
6807 * __scm.h: (SCM_SYSMISSING): another version in case ENOSYS isn't
6808 defined.
6809
6810 * Makefile.in: remove references to .hd, .cd suffix and __scm.hd.
6811
6812 * __scm.hd, def.sed: deleted.
6813
6814 Tue Aug 6 14:49:08 1996 Jim Blandy <jimb@totoro.cyclic.com>
6815
6816 Changes for NeXT, suggested by Robert Brown.
6817 * configure.in: Call AC_TYPE_MODE_T.
6818 (AC_CHECK_HEADERS): Add libc.h, to get more prototypes on the
6819 NeXT. Put header file list in alphabetical order.
6820 * configure, scmconfig.h.in: Regenerated.
6821 * filesys.c [HAVE_LIBC_H]: #include <libc.h>.
6822
6823 * filesys.c [HAVE_STRING_H]: #include <string.h>, to get prototype
6824 for strerror.
6825
6826 * acconfig.h: New file, providing documentation for the CPP
6827 symbols defined in configure.in
6828 * acconfig-1.5.h: Removed; superceded by the above.
6829
6830 Sat Aug 3 01:27:14 1996 Gary Houston <ghouston@actrix.gen.nz>
6831
6832 * ioext.c (scm_sys_fdopen): fix the port-table assignment.
6833
6834 * fports.c (scm_open_file): don't return #f, throw error.
6835
6836 * ioext.c (fileno): renamed from %fileno.
6837 (soft-fileno): deleted.
6838
6839 * ports.c (scm_port_revealed): don't need to check for -1 from
6840 scm_revealed_count.
6841 (scm_set_port_revealed_x): return unspecified, not #f.
6842
6843 * ioext.c (primitive-move->fdes): return #t or #f, not 1 or 0.
6844
6845 * fdsocket.c: getsockopt, setsockopt: use HAVE_STRUCT_LINGER.
6846
6847 * scmconfig.h.in: add HAVE_STRUCT_LINGER.
6848
6849 * configure.in: check for struct linger, set HAVE_STRUCT_LINGER.
6850
6851 Thu Aug 1 02:58:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
6852
6853 * filesys.c, posix.c: #include <sys/types.h> before <sys/stat.h>.
6854 This is necessary on Ultrix, and doesn't hurt portability.
6855
6856 * Makefile.in (dist-dir): New target, implementing a new dist system.
6857 (installed_h_files): Put in alphabetical order.
6858 Remove duplicate entries for markers.h and unif.h.
6859 (c_files): Remove duplicate entries for markers.c.
6860 (ancillary): Renamed from anillery; all uses changed. Remove
6861 PLUGIN; it's a directory, and needs special treatment in dist-dir.
6862 Remove all the ../doc/* files; doc/Makefile.in handles that.
6863
6864 * Makefile.in (libobjs): Remove duplicate entry for markers.o.
6865
6866 * Makefile.in (.c.x): Compensate for Ultrix's broken Bourne shell:
6867 every if must have an else, or else the whole command has a
6868 non-zero exit code whenever the if's condition is false.
6869
6870 Thu Aug 1 08:22:24 1996 Gary Houston <ghouston@actrix.gen.nz>
6871
6872 * posix.c: include string.h.
6873
6874 Wed Jul 31 23:43:05 1996 Gary Houston <ghouston@actrix.gen.nz>
6875
6876 * numbers.c: rename %expt -> $expt, %atan2 -> $atan2, as it must
6877 have been once.
6878
6879 * posix.c, ioext.c, socket.c, fdsocket.c, files.c, filesys.c, simpos.c:
6880 Remove leading % from scheme names.
6881 Do not return error values, call SCM_SYSERROR or similar.
6882
6883 * __scm.h (SCM_SYSERROR, SCM_SYSMISSING): new macros.
6884
6885 Wed Jun 12 00:28:31 1996 Tom Lord <lord@beehive>
6886
6887 * struct.c (scm_init_struct): new file.
6888
6889 Fri Jun 7 14:02:00 1996 Tom Lord <lord@beehive>
6890
6891 * list.c (scm_list_tail): list-cdr-ref is the same as list-tail.
6892 (scm_list_head): added list-head for rapidly chopping argument
6893 lists off of longer lists (and similar).
6894
6895 Tue Jun 4 09:40:33 1996 Tom Lord <lord@beehive>
6896
6897 * objprop.c (scm_object_property): assq the cdr of the whash
6898 handle for obj, not the handle itself.
6899
6900 Mon Jun 3 17:19:30 1996 Tom Lord <lord@beehive>
6901
6902 * gc.c (scm_mark_weak_vector_spines): Mark the spines (alists) of
6903 weak hash tables last of all marking to avoid an obscure gc bug.
6904 WARNING: circular lists stored in a weak hash table will hose us.
6905
6906 Fri May 24 09:53:39 1996 Tom Lord <lord@beehive>
6907
6908 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
6909 new functions similar to scm_substring_move_left_x and
6910 scm_substring_move_right_x.
6911
6912 Wed May 22 20:07:01 1996 Tom Lord <lord@beehive>
6913
6914 * init.c (scm_boot_guile): prevent gc with scm_block_gc not
6915 scm_gc_heap_lock!
6916
6917 Wed May 15 16:13:29 1996 Tom Lord <lord@beehive>
6918
6919 * ports.c (scm_unread_char): scm_gen_ungetc as a scheme procedure.
6920
6921 Thu May 9 09:33:17 1996 Tom Lord <lord@beehive>
6922
6923 * strports.c (scm_strprint_obj): convenience function. C for
6924 (lambda (obj) (call-with-output-string (lambda (p) (write obj p))))
6925
6926 * guile-{tcl,tk}.[ch], events.[ch], keysyms.[ch], tcl-channels.[ch]
6927 removed to a separate library
6928
6929 * init.c (scm_boot_guile): copied from guile-tcl.c.
6930 Initialization specific to tcl interpreters removed.
6931
6932 Wed May 8 15:07:37 1996 Tom Lord <lord@beehive>
6933
6934 * ports.c (scm_ports_prehistory): size malloced here doesn't
6935 matter so long as it is non-0 (got rid of "* 4").
6936
6937 Tue May 7 11:43:37 1996 Tom Lord <lord@beehive>
6938
6939 * gscm.h: gscm_mkarray eliminated (presumably was not being used
6940 since its definition was bogus).
6941
6942 Mon May 6 13:02:56 1996 Tom Lord <lord@beehive>
6943
6944 * mallocs.[ch]: back again (for rx at least).
6945
6946 Wed Apr 17 08:54:20 1996 Tom Lord <lord@beehive>
6947
6948 * ports.c: removed functions relating to the mapping between ports
6949 and descriptors. (That stuff is unix-specific and should be collected
6950 in a separate library).
6951
6952 * ramap.c (scm_array_copy): return #<unspecified> not #<undefined>.
6953 (Tom Mckay@avanticorp.com)
6954
6955 Mon Apr 15 14:16:55 1996 Tom Lord <lord@beehive>
6956
6957 * gc.c (scm_gc_sweep): Immediates in weak vectors were not
6958 handled correctly (SCM_FREEP was applied to them) -- test for
6959 NIMP. Keys in weak hash tables were spuriously (though harmlessly)
6960 being overwritten with #f. (brown@grettir.bibliotech.com)
6961
6962 Tue Apr 2 22:25:00 1996 Tom Lord <lord@beehive>
6963
6964 * gc.c (scm_unhash_name): new procedure, unhash-name, flushes glocs
6965 for a specific symbol or for all symbols.
6966
6967 Mon Apr 1 10:34:55 1996 Tom Lord <lord@beehive>
6968
6969 * gc.c (scm_gc_mark): mark weak hash tables correctly (was getting weak
6970 keys and weak values confused).
6971
6972 Thu Mar 14 22:20:20 1996 Tom Lord <lord@beehive>
6973
6974 * list.c (scm_last_pair): map '()=>'()
6975
6976 Wed Mar 13 16:43:34 1996 Tom Lord <lord@beehive>
6977
6978 * pairs.c, hashtab.c, list.c, alist.c append.c, sequences.c:
6979 Generalized assoc and hash-table functions.
6980 Factored pairs.c into multiple files.
6981
6982 Fri Mar 8 14:44:39 1996 Tom Lord <lord@beehive>
6983
6984 * gscm.c (gscm_run_scm): got rid of objprop.
6985
6986 Fri Mar 1 10:39:52 1996 Tom Lord <lord@beehive>
6987
6988 * genio.c (scm_getc):
6989 NOTE: fgetc may not be interruptable.
6990
6991 * procprop.c (scm_stand_in_scm_proc):
6992 NOTE: don't use a alist here.
6993 (scm_set_procedure_properties_x): fix type checking throughout this file.
6994
6995 * gc.c (scm_gc_sweep): free heap segments with free, not must_free.
6996
6997 * ports.c (scm_remove_from_port_table): adjust scm_mallocated
6998 after freeing part of the port table.
6999
7000 Thu Feb 29 16:21:17 1996 Tom Lord <lord@beehive>
7001
7002 * strports.c (scm_mkstrport):
7003 * vports.c (scm_make_soft_port): allocate a port table entry
7004 (possibly triggering gc) before setting the tag of the corresponding
7005 ports handle.
7006
7007 * pairs.c (scm_delq_x): never throw an error.
7008
7009 * vectors.c (scm_make_vector): made the default vector fill argument
7010 into '() (much more useful than the previous value, "#unspecified")
7011
7012 Mon Feb 26 17:19:09 1996 Tom Lord <lord@beehive>
7013
7014 * ports.c (scm_add_to_port_table): Added fields
7015 to port table entries: file_name, line_num, col.
7016 Update these in open_file, gen_getc and gen_ungetc.
7017 Added procedures to access those fields.
7018
7019 Sun Feb 25 00:10:36 1996 Tom Lord <lord@beehive>
7020
7021 * procs.c (scm_make_subr_opt): new entry point for making
7022 anonymous subrs.
7023
7024 Sat Feb 24 17:11:31 1996 Tom Lord <lord@beehive>
7025
7026 * gc.h: SCM_STACK_GROWS_UP is now set by autoconf.
7027
7028 Fri Feb 23 10:26:29 1996 Tom Lord <lord@beehive>
7029
7030 * numbers.c (scm_exact_p): This function no longer
7031 implements "integer?".
7032
7033 Thu Feb 22 20:56:16 1996 Tom Lord <lord@beehive>
7034
7035 * gc.c (scm_gc_end): simulate a signal at the end of each GC.
7036 (scm_gc_stats): return an assoc of useful data. Replaces "room"
7037 and the stats reporting formerlly built into repl.
7038
7039 * repl.[ch]: removed.
7040 GC statistics keeping moved to gc.c.
7041 Other statistics keeping can be done from Scheme.
7042 REPLS are now written in Scheme.
7043
7044 Wed Feb 21 10:28:53 1996 Tom Lord <lord@beehive>
7045
7046 * cnsvobj.c (gscm_is_gscm_obj): new file for old functions (icky
7047 conservatively marked objects).
7048
7049 * throw.c (scm_ithrow): Unwind up to the right catch during a throw!
7050
7051 * error.c (scm_init_error): init system_error_sym here, not in repl.c.
7052
7053 * feature.c (scm_compiled_library_path): moved here from repl.c.
7054 This file is for stuff relating specifically to Scheme libraries
7055 like slib.
7056
7057 * eval.c (scm_m_define): don't give warning about redefinition, don't
7058 check verbosity.
7059
7060 NOTE: this should throw a resumable exception with parameters --
7061 the name, the top-level env, the variable, the definition, #t/#f: redefining builtin?
7062
7063 * repl.c (scm_gc_begin/end): don't print a message, don't check verbosity.
7064
7065 * error.c: scm_warn eliminated.
7066
7067 * read.c (scm_lreadr): extra right paren gets an error, not a warning.
7068
7069 * repl.c, marksweep.c, gc.c (various):
7070 lose exit_report, growth_mon.
7071
7072 * gscm.c: got rid of verbosity functions.
7073
7074 Tue Feb 20 00:19:10 1996 Tom Lord <lord@beehive>
7075
7076 * throw.c (scm_ithrow): guard against the bad-throw hook changing
7077 between the call to procedurep and use.
7078
7079 * error.c (scm_everr):
7080 * gc.c (fixconfig):
7081 * gsubr.c (scm_make_gsubr): use exit, not scm_quit. still wrong,
7082 but less so.
7083
7084 * strports.c: don't reveal the port's string to the caller
7085 because it changes size.
7086
7087 (stputc stwrite): check/change the strings length with interrupts
7088 blocked.
7089
7090 * objprop.c (scm_set_object_property_x &c): use the generic
7091 hashing functions and be threadsafe.
7092
7093 * eval.c (scm_unmemocar): do this operation in a thread-safe way.
7094 (per suggestion jaffer@gnu.ai.mit.edu).
7095
7096 * mbstrings.c (scm_multi_byte_string): guard against argument list
7097 changing length.
7098
7099 * strings.c (scm_make_string): loop cleanup
7100
7101 * unif.c (scm_vector_set_length_x): scm_vector_set_length_x no longer
7102 a scheme function.
7103
7104 * weaks.c (scm_weak_vector): guard against argument list
7105 changing length.
7106
7107 * variable.c (scm_builtin_variable): check for/make a built-in
7108 variable automicly.
7109
7110 * vectors.c (scm_vector): while filling the new array,
7111 guard against a list of fill elements that grows after
7112 the vector is allocated.
7113
7114 * hashtab.c -- new file: general hash table
7115 functions. hash, hashq, hashv, hashx.
7116
7117 * tags.h: made wvect an option bit of vector.
7118
7119 Mon Feb 19 09:38:05 1996 Tom Lord <lord@beehive>
7120
7121 * symbols.c: made the basic symbol table operations atomic.
7122
7123 * root.c &c.: collected stack-specific global state.
7124 linum/colnum etc *should* be port-specific state.
7125
7126 * struct.c (scm_init_struct): init the first struct type during
7127 initialization to fix a race condition.
7128
7129 * continuations.c (scm_dynthrow): pass throwval in the 'regs'
7130 object, not in a global.
7131 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
7132
7133 * throw.c (_scm_throw): Pass throwval on the stack, not in a global
7134 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
7135
7136 * *.[ch]: namespace cleanup. Changed all (nearly) exported CPP
7137 and C symbols to begin with SCM_ or scm_.
7138
7139 Sun Feb 18 15:55:38 1996 Tom Lord <lord@beehive>
7140
7141 * gsubr.c (scm_gsubr_apply): statically allocate the
7142 array of arguments (bothner@cygnus.com).
7143
7144 Sat Feb 17 20:20:40 1996 Tom Lord <lord@beehive>
7145
7146 * scmsigs.c: Simplified to use async rountines.
7147
7148 * async.c: New support for interrupt handlers.
7149
7150 Thu Feb 15 11:39:09 1996 Tom Lord <lord@beehive>
7151
7152 * symbols.c (scm_string_to_symbol et al.): number of tweaky changes to
7153 set the multi_byte flag correctly in symbols. This is wrong.
7154 intern_obbary_soft and msymbolize should take an extra parameter.
7155 Also, weird multibyte symbols don't print correctly.
7156 The weird symbol syntax is also a bit bogus (emacs doesn't quite
7157 cope).
7158
7159 Tue Feb 13 11:39:37 1996 Tom Lord <lord@beehive>
7160
7161 * symbols.c (scm_string_to_obarray_symbol): obarray == #f means
7162 use the system symhash. == #t means create an uninterned symbol.
7163
7164 Wed Feb 7 09:28:02 1996 Tom Lord <lord@beehive>
7165
7166 * strings.c (scm_make_shared_substring): build'em.
7167 It might better to keep a table of these and use one
7168 less cons-pair per shared-substring.
7169
7170 Tue Feb 6 17:45:21 1996 Tom Lord <lord@beehive>
7171
7172 * strings.c (scm_string_shared_substring): create shared
7173 substrings. (Doesn't handle mb strings yet).
7174
7175 * mbstrings.c (scm_print_mb_string): handle RO strings.
7176
7177 * print.c (scm_iprin1): print substrings as their non-substring
7178 counterparts (dubious).
7179
7180 * marksweep.c (scm_gc_mark scm_gc_sweep): handle RO and MB
7181 strings.
7182
7183 * hash.c (scm_hasher): hash RO and MB strings as bytestrings.
7184
7185 * eval.c (SCM_CEVAL): self-evaluate RO and MB strings.
7186
7187 * eq.c (scm_equal_p): handle RO and MB strings.
7188
7189 * symbols.c (scm_string_to_symbol):
7190 (scm_string_to_obarray_symbol):
7191 * strop.c (scm_i_index):
7192 (scm_i_rindex):
7193 (scm_string_null_p):
7194 (scm_string_to_list):
7195 * strings.c (scm_string_length):
7196 (scm_string_ref):
7197 (scm_substring):
7198 (scm_string_append):
7199 * simpos.c (scm_system):
7200 (scm_getenv):
7201 * fports.c (scm_open_file):
7202 * strorder.c (scm_string_equal_p):
7203 (scm_string_ci_equal_p):
7204 (scm_string_less_p):
7205 (scm_string_ci_less_p):
7206 * pairs.c (scm_obj_length):
7207 * mbstrings.c (scm_multi_byte_string_length):
7208
7209 Use RO string macros for RO strings.
7210
7211 Tue Jan 30 09:19:08 1996 Tom Lord <lord@beehive>
7212
7213 * Makefile.in (CFLAGS ALL_CFLAGS): be more standard.
7214
7215 * strop.c (scm_i_rindex, scm_i_index): Don't use the BSD functions
7216 index/rindex. Do handle embedded \000 characters.
7217
7218 Sun Jan 28 13:16:18 1996 Tom Lord <lord@beehive>
7219
7220 * error.c (def_err_response): (int)scm_err_pos => (long)scm_err_pos
7221 Eliminate a (presumed) warning on some systems.
7222
7223 * gscm.c (gscm_run_scm): SCM_INIT_PATH => GUILE_INIT_PATH
7224 (Mikael Djurfeldt <mdj@nada.kth.se>)
7225
7226 Sat Jan 27 12:36:55 1996 Tom Lord <lord@beehive>
7227
7228 * eval.c (scm_map): added argument type checking.
7229 (kawai@sail.t.u-tokyo.ac.jp)
7230
7231 * gscm.c (gscm_set_procedure_properties_x): parameter "new" => "new_val"
7232 for C++. (Seth Alves <alves@gryphon.com>)
7233
7234 (gscm_cstr): uses an uninitialized local variable causing
7235 segv. (kawai@sail.t.u-tokyo.ac.jp)
7236
7237
7238 * lvectors.c (scm_get_lvector_hook):
7239 In guile-ii, the lvector code was broken. It was fixed in guile-iii.
7240 It seems to me like if it is broken again in guile-iv...Here is a patch.
7241 "! || (LENGTH (keyvec) == 0))"
7242 (From: Mikael Djurfeldt <mdj@nada.kth.se>)
7243
7244
7245 * gscm.c (gscm_sys_default_verbosity):
7246 incorrectly declared for non-__STDC__
7247 (Tom_Mckay@avanticorp.com)
7248
7249 * ports.c (scm_setfileno): Tweak the macro a bit
7250 to make it easier to port to systems that use
7251 more than a single structure field to hold a descriptor.
7252
7253 * debug.c (change_mode): Avoid GNUCism "int foo[n];"
7254 Give a warning, not an error, for unrecognized modes.
7255
7256 * eval.c (SCM_CEVAL):
7257 static char scm_s_for_each[];
7258 static char scm_s_map[];
7259 not needed.
7260
7261 * strings.c (scm_string_p):
7262 static char s_string[];
7263 (see next entry)
7264
7265 * struct.c (scm_sys_struct_set_x):
7266 static char s_sys_make_struct[];
7267 static char s_sys_struct_ref[];
7268 static char s_sys_struct_set_x[];
7269 Rearrange code to eliminate those forward decls for the sake of
7270 broken compilers.
7271
7272 * variable.c (make_vcell_variable): static char s_make_variable[];
7273 isn't needed.
7274
7275 * fports.c (scm_port_mode):
7276 chars modes[3] = "";
7277 to
7278 chars modes[3];
7279 modes[0] = '\0';
7280 (Tom_Mckay@avanticorp.com)
7281
7282
7283 * pairs.c (scm_set_cdr_x): non-__STDC__ declaration of
7284 scm_cons2(), scm_acons(), and scm_set_cdr_x() missing semicolon
7285 (Tom_Mckay@avanticorp.com)
7286
7287 * numbers.c (scm_num_eq_p): Non-__STDC__ declaration of
7288 scm_num_eq_p() was scm_equal_p().
7289 (Tom_Mckay@avanticorp.com)
7290
7291 * symbols.c (msymbolize): "CHARS(X) = " => "SETCHARS..."
7292 (Tom_Mckay@avanticorp.com)
7293
7294 Fri Jan 26 14:03:01 1996 Tom Lord <lord@beehive>
7295
7296 * weaks.c (scm_make_weak_vector): "VELTS(X) =" => "SETVELTS..."
7297 (Tom_Mckay@avanticorp.com)
7298
7299 * strop.c (scm_substring_fill_x):
7300 Non-__STDC__ declaration of scm_substring_fill_x() missing semicolon
7301 (Tom_Mckay@avanticorp.com)
7302
7303 * eval.c (SCM_APPLY): variables "debug_info" -> dbg_info.
7304 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
7305
7306 * _scm.h (CxR functions): #define CxR SCM_CxR => #define CxR(X) SCM_CxR(X)
7307 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
7308
7309 * lvectors.c (scm_lvector_set_x): avoid VELTS (VELTS (...)[..]) which
7310 can turn into an obscure gc bug.
7311
7312 * chars.c (scm_char_p): fixed PROC call.
7313
7314 * gscm.h (gscm_vset): use scm_vector_set_x not (the missing)
7315 scm_vector_set.
7316
7317 Tue Jan 23 13:29:40 1996 Tom Lord <lord@beehive>
7318
7319 * elisp.c (new file): dynamic scoping and other bits for
7320 elisp. Don't use this yet unless you specificly want to
7321 hack on elisp emulation.
7322
7323 * dynwind.c (scm_dowinds): When entering or leaving a dynamic
7324 scope created by scm_with_dynamic_bindings_operation_x, swap
7325 the bindings of that scope with the corresponding globals.
7326
7327 * continuations.c (scm_make_cont): when a continuation is captured,
7328 relocate the continuation stack chunks registered on the wind chain
7329 to the heap.
7330
7331 Sun Jan 21 19:31:17 1996 Tom Lord <lord@beehive>
7332
7333 * eval.c (SCM_CEVAL): if the function position evaluates
7334 to a macro, process it accordingly. (Previously, macros were
7335 handled only if the function position was a symbol naming a
7336 variable bound to a macro).
7337
7338 Sat Jan 20 23:21:37 1996 Tom Lord <lord@beehive>
7339
7340 * eval.c (scm_m_set): allow multi-variable set! like
7341 (set! x 1 y 2 z 3).
7342
7343 Wed Dec 6 02:40:49 1995 Tom Lord <lord@beehive>
7344
7345 * ports.h fports.c vports.c marksweep.c gc.c strports.c: moved the
7346 STREAM of ports into the port table and replaced it with a
7347 port-table index.
7348
7349 * repl.c (iprin1): added tc7_mb_string -- same as tc7_string.
7350
7351 * marksweep.c (scm_gc_mark): added tc7_mb_string -- same as tc7_string.
7352
7353 * mbstrings.c (new file): functions on multi-byte strings.
7354
7355 * tags.h (scm_typ7_string, scm_typ7_mb_string): added a tag
7356 for multi-byte strings. Moved the string tag.
7357
7358 * chars.h chars.c repl.c (many functions): made scm_upcase and
7359 scm_downcase functions that are safe for extended character sets.
7360
7361 Changed the range of integer->char.
7362
7363 Changed the type of SCM_ICHR.
7364
7365 Tue May 16 17:49:58 1995 Mikael Djurfeldt <mdj@sanscalc.nada.kth.se>
7366
7367 * guile.c: Changed init file name from "SCM_INIT_PATH" to
7368 "GUILE_INIT_PATH"
7369
7370 Sun Aug 6 15:14:46 1995 Andrew McCallum <mccallum@vein.cs.rochester.edu>
7371
7372 * guile.c (gscm_is_gscm_type): New function. (Without this how will we
7373 know that it's safe to pass an object to gscm_get_type?)
7374 (gscm_get_type): Fix tyop in error message.
7375
7376 * variable.c (scm_variable_ref): fixed assertion test.
7377 (Robert STRANDH <strandh@labri.u-bordeaux.fr>)
7378
7379 * gscm.h: fixed several prototypes, notably gscm_vref.
7380 Add gscm_is_eq and temporarily commented out gscm_eq (see
7381 the note in gscm.h near gscm_eq if this change effects your
7382 code).
7383 (Reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
7384
7385 * pairs.c (scm_obj_length): see next entry.
7386
7387 * gscm.h (gscm_obj_length): A way to get an integer
7388 length for lists, strings, symbols (treated as strings),
7389 and vectors. Returns -1 on error.
7390
7391 * eq.c (scm_equal_p): fixed smob case.
7392 (William Gribble <grib@arlut.utexas.edu>)
7393
7394 * Makefile.in (X_CFLAGS): defined.
7395 (William Gribble <grib@arlut.utexas.edu>)
7396
7397 * gscm.h (gscm_2_double): provided now
7398 (reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
7399
7400 Tue Jun 13 01:04:09 1995 gnu
7401 * Vrooom!
7402
7403