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