*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
ef0615e4
JB
11999-04-17 Jim Blandy <jimb@savonarola.red-bean.com>
2
cceae55d
JB
3 * Makefile.in: Regenerated.
4
ef0615e4 5 Remove readline support, to avoid copyright confusion.
cceae55d 6 * Makefile.am: Remove readline files from lists.
ef0615e4
JB
7 * init.c: Don't initialize readline.
8 * scmconfig.h.in: Regenerated.
9
10 * numbers.c (s_bignum): Renamed to s_bignum, and made static.
11 Libguile should not be exporting random little strings.
12 * numbers.h (s_bignum): Extern declaration removed.
13
14 More const changes from Ken Raeburn.
15 * numbers.c (scm_s_bignum, fx): Now const.
16 (scm_logtab, scm_ilentab, s_adjbig): Now static and const.
17 * numbers.h (scm_s_bignum): Update declaration.
18 * eval.c (bodycheck): Argument WHAT now points to const.
19 * snarf.h (SCM_SYNTAX): Name is const.
20
21 * eval.c (scm_i_let): Make this globally visible, to avoid dynamic
22 linking crashes on NetBSD. (Thanks to Ken Raeburn.)
23
488325ae
MD
241999-03-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
25
26 * numbers.c (isfinite): Define this macro if not defined: Return a
27 non-zero value if X is finite. (From ISO C 9x standard.)
28 (scm_inexact_to_exact): Bugfix: Don't pass NaNs to scm_dbl2big.
29 (Thanks to Jon Trowbridge and Greg Harvey.)
30
e7367a17
MD
311999-03-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
32
33 * keywords.c (scm_tc16_kw): Added for backward compatibility.
34 Will be removed in next release.
35
36 * Makefile.am (modinclude_HEADERS): Added kw.h;
37
38 * kw.h: New file.
39
40 * libguile.h: #include "libguile/kw.h"
41
46d83025
MD
421999-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
43
44 * pairs.c (scm_set_car_x, scm_set_cdr_x): Return SCM_UNSPECIFIED.
45
e059c0b7
MD
461999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
47
437bc84d
MD
48 * print.c (scm_isymnames): Added #@dispatch and #@hash-dispatch.
49
e059c0b7
MD
50 * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):
51 Place the table argument last.
52
7e68f448
MD
531999-03-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
54
55 * modules.c: #include "procprop.h"
56 (scm_system_module_env_p): Assume root environment is no lookup
57 closure is found.
58
4177648e
MD
59 * debug.c, eval.c, evalext.c, gdbint.c stacks.c:
60 #include "modules.h".
7e68f448
MD
61
62 * modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
63 scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
64
65 * eval.c, eval.h (scm_top_level_lookup_closure): Removed.
66
cd713a06
MD
671999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
68
69 * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to
70 scm_misc_error when pos is a string. This allows for dispatching
71 arbitrary error messages with one argument via SCM_ASSERT:
72 SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
73
64af44a3
MD
741999-03-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
75
76 * list.c (scm_reverse): Report an error if given a circular list
77 instead of filling memory.
78 * list.c (scm_reverse_x): Check args.
79
6ee350ad
MD
801999-03-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
81
82 Most of this batch of changes is about how to deal with extended
83 types when an object system is loaded into Guile. A nice object
84 system is capable of representing Guile's types as class objects.
85
86 For example, we want a regular expression to be of class <regex>.
87 But regular expressions are smobs which aren't under direct
88 control of the object system, so there has to be some mechanism
89 which informs the object system that a new class should be created
90 which can represent the smob type. I call this a "wrapper class".
91
92 * objects.c: #include "smob.h";
93 (scm_class_keyword): Removed. (Class is automatically created by
94 make_smob_classes.)
95 (scm_smob_class): Array of smob classes indexed by smobnum.
96 (scm_make_extended_class): "Plugin" function pointer for creation
97 of wrapper classes for smob and struct types.
98 (scm_class_of): Handle compiled closures. (Currently regarded as
99 <procedure>.);
100 Use scm_smob_class to handle smob types;
101 Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
102 through scm_smob_class;
103 Handle structs.
104
105 * smob.c (scm_newsmob): Also create a wrapper class if
106 scm_smob_class has been initialized.
107
108 * smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
109 type code and smobnum.
110
111 * struct.c: #include "alist.h", "weaks.h", "hashtab.h";
112 (scm_struct_table): Weak key table with auxilliary information for
113 struct types. Currently used for names and wrapper classes.
114 (scm_struct_ihashq): Hash function for structs.
115 (scm_struct_create_handle): Get/create entry in scm_struct_table.
116 (scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures
117 for accessing names of vtables. The record implementation in
118 boot-9.scm currently uses the setter to record the name of record
119 types. When the object system is initialized, it can use this
120 information to create wrapper classes with suitable names.
121 (scm_init_struct): Allocate scm_struct_table.
122 (scm_alloc_struct): Don't initialize scm_struct_i_tag here.
123 (struct tags are a finite resource and we might want to restrict
124 the use of tags to vtables only. E.g., Goops only uses tags for
125 classes.)
126 (scm_make_struct): Use scm_struct_entity_n_extra_words instead of
127 magic number 5.
128 (scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic
129 number -1.
130
131 * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME,
132 SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros.
133 Used for access of struct table entries.
134
135 * hashtab.c, hashtab.h (scm_internal_hash_fold): New function.
136 (scm_hash_fold): New procedure. Used to process all entries in a
137 hash table (in no particular order).
138
139 Argh! For the umpteenth time I got compilation errors because of
140 the "intuitive" name `kw'. This has to have an end:
141
142 * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
143 "kw" --> "keywords" everywhere.
144 (I doubt that this will cause big compatibility problems since the
145 application interface is unaffected.)
146
147 * keywords.c, keywords.h: Files renamed from kw.c, kw.h.
148
71c7d7d6
MD
1491999-03-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
150
efdfceea
MD
151 * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and
152 column inums to native form.
153
71c7d7d6
MD
154 Improvement of backtraces: Introduces a new stack narrowing
155 specifier, #t, for the inner cut. (See further in the comments in
156 stacks.c:narrow_stack ().)
157
158 * procprop.c, procprop.h (scm_sym_system_procedure): New symbol.
159 (Used to flag certain system procedures which shouldn't turn up in
160 backtraces.)
161
162 * eval.c (scm_sym_system_module): New symbol. (Used to flag
163 modules which aren't "user" modules and the code of which
164 shouldn't turn up in backtraces.)
165
166 * eval.c, eval.h (scm_top_level_lookup_closure): New function:
167 Extract the lookup closure from an environment.
168 (scm_system_module_env_p): New function: Return non-#f if MODULE
169 is a system module.
170
171 * stacks.c: #include "eval.h"; #include "procprop.h";
172 (narrow_stack): Handle new narrowing specifier #t.
173
174 * debug.c (scm_procedure_name): Use name property in the default
175 case.
fde61308
MD
176
177 * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr ().
178
179 * objects.h (scm_si_redefined, scm_si_hashsets): Shifted.
180
181 * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
182 procedure throughout.
183
184 * print.c (scm_iprin1): Removed extraneous space when printing
185 procedure-with-setters.
186
187 Entity and operator setter slots were introduced as a complement
188 to the <procedure-with-setter> type in order to support entities
189 and operators with setters in a reasonable and efficient way.
190 * procs.c (scm_procedure, scm_setter): Handle entity and operator
191 setter slots.
192
193 * objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros.
194 (struct scm_metaclass_operator): New setter slot.
195
196 * gc.c (scm_gc_mark): Mark struct setter slot.
197
198 * struct.c (scm_make_struct): Allocate one word more for
199 entities and initialize the new slot.
200
201 * struct.h (scm_struct_i_setter): New constant.
202
963561f7
MD
2031999-03-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
204
fde61308
MD
205 * objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots
206 directly through the instance.
207
208 * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.
209
210 * gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at
211 scm_struct_i_flags instead of scm_vtable_index_layout!
212
213 * list.c (scm_list_star): New procedure.
214
963561f7
MD
2151999-02-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
216
fde61308
MD
217 * debug.c (scm_init_debug): Added scheme level constant
218 SCM_IM_DISPATCH.
219
963561f7
MD
2201999-02-12 Jim Blandy <jimb@savonarola.red-bean.com>
221
222 * __scm.h (SCM_FENCE): Fix `asm volatile' warnings for EGCS.
223
224 * gc.c (scm_gc_sweep): Properly properly record the size of a
225 freed structure. (Thanks to Greg Harvey.)
226
2271999-02-07 Jim Blandy <jimb@savonarola.red-bean.com>
228
229 * gc.c (scm_gc_sweep): Properly record the size of a freed
230 structure. (Thanks to Michael Livshin.)
231
2321999-02-06 Jim Blandy <jimb@savonarola.red-bean.com>
233
234 Readline paren matching from Greg Harvey, with modifications from
235 Mikael Djurfeldt:
236
237 * readline.c (in_readline, reentry_barrier_mutex): Make these
238 static.
239
240 * readline.c: #include <sys/time.h> and "iselect.h", so we can
241 control how long we're paused, and threads will run while we're
242 paused.
243 (match_paren, find_matching_paren, init_bouncing_parens): New
244 functions.
245 (scm_init_readline): Call init_bouncing_parens.
246 (scm_readline_opts): Add the bounce-parens option.
247 * readline.h (SCM_READLINE_BOUNCE_PARENS): New readline option.
248 (SCM_N_READLINE_OPTIONS): Adjust.
249
2501999-02-06 Jim Blandy <jimb@zwingli.cygnus.com>
251
252 All the below are changes from Ken Raeburn, to get Guile to use
253 const where it can.
254
255 * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),
256 eval.c (s_expression, s_test, s_body, s_bindings, s_variable,
257 s_clauses, s_formals): Variables now const.
258
259 * eval.c (promsmob): Now const.
260 * macros.c (macrosmob): Now const.
261 * smob.c (scm_newsmob): Smobfuns argument now points to const.
262 (freecell, flob, bigob): Now const.
263
264 * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring),
265 error.c (scm_error, scm_syserror, scm_syserror_msg,
266 scm_num_overflow, scm_out_of_range, scm_wrong_type_arg,
267 scm_memory_error, scm_misc_error, scm_wta), macros.c
268 (scm_make_synt), feature.c (scm_add_feature), filesys.c
269 (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc,
270 scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr),
271 numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long,
272 scm_num2long_long, scm_num2ulong),
273 options.c (scm_options), posix.c (scm_convert_exec_args,
274 environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr),
275 ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c
276 (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c
277 (setzone, restorezone, bdtime2c), strop.c (scm_i_index),
278 strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft,
279 scm_intern_obarray, scm_intern, scm_intern0,
280 scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0,
281 scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument
282 indicating calling subr, error message text, reason for error,
283 symbol name or feature name are now pointer to const.
284 * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const.
285
286 * procs.c (scm_init_iprocs): iproc argument now points to const.
287 * pairs.c (cxrs): Now const.
288
289 * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h,
290 numbers.h, options.h, procs.h, ramap.h, read.h, smob.h,
291 strports.h, symbols.h, unif.h: Update variable declarations and
292 function prototypes for above changes.
293
294 * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link,
295 sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and
296 SYMB now point to const.
297
2981999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
299
fde61308
MD
300 * print.c (scm_iprin1): Use scm_procedure_name instead of
301 scm_procedure_property for compiled closures.
302
303 * tags.h (scm_tc7_pws): New procedure type. Four representations
304 for procedure-with-setters were considered before selecting this
305 one:
306
307 1. A closure where the CODE and ENV slots are used to represent
308 the getter and a new SETTER slot is used for the setter. The
309 original getter is stored as a `getter' procedure property. For
310 closure getters, the CODE and ENV slots contains a copy of the
311 getter's CODE and ENV slots. For subr getters, the CODE contains
312 a call to the subr.
313
314 2. A compiled closure with a call to the getter in the cclo
315 procedure. The getter and setter are stored in slots 1 and 2.
316
317 3. An entity (i.e. a struct with an associated procedure) with a
318 call to the getter in the entity procedure and the setter stored
319 in slot 0. The original getter is stored in slot 1.
320
321 4. A new primitive procedure type supported in the evaluator. The
322 getter and setter are stored in a GETTER and SETTER slot. A call
323 to this procedure type results in a retrieval of the getter and a
324 jump back to the correct eval dispatcher.
325
326 Representation 4 was selected because of efficiency and
327 simplicity.
328
329 Rep 1 has the advantage that there is zero penalty for closure
330 getters, but primitive getters will get considerable overhead
331 because the procedure-with-getter will be a closure which calls
332 the getter.
333
334 Rep 3 has the advantage that a GOOPS accessor can be a subclass of
335 <procedure-with-setter>, but together with rep 2 it suffers from a
336 three level dispatch for non-GOOPS getters:
337
338 cclo/struct --> dispatch proc --> getter
339
340 This is because the dispatch procedure must take an extra initial
341 argument (cclo for rep 2, struct for rep 3).
342
343 Rep 4 has the single disadvantage that it uses up one tc7 type
344 code, but the plan for uniform vectors will very likely free tc7
345 codes, so this is probably no big problem. Also note that the
346 GETTER and SETTER slots can live directly on the heap, using the
347 new four-word cells.
348
349 * procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
350 SCM_SETTER): New macros.
351 (scm_procedure_with_setter_p, scm_make_procedure_with_setter,
352 scm_getter, scm_setter): New procedures.
353
354 * eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
355
356 * gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for
357 scm_tc7_pws.
358
359 * objects.c, objects.h (scm_class_of,
360 scm_class_procedure_with_setter): Added.
361
362 * procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
363 entry for scm_tc7_pws.
364
365 * procs.c (scm_procedure_p): Added case label for scm_tc7_pws.
366
963561f7
MD
3671999-01-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
368
fde61308
MD
369 * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing
370 macro.
371 (scm_init_evalext): Call scm_make_gsubr for
372 scm_m_generalized_set_x.
373
374 * eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
375
376 * eval.h: Declare scm_s_set_x, scm_sym_set_x;
377
378 * eval.c: Renamed "set" --> "set_x" in various names for
379 consistency of name correspondence between Scheme and C;
380 Renamed scm_i_set_x --> scm_sym_set_x and made global.
381 Renamed s_set_x --> scm_s_set_x and made global.
382
963561f7
MD
3831999-01-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
384
fde61308
MD
385 * random.c (scm_i_random_bignum): Made independent of endianness.
386
963561f7
MD
3871999-01-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
388
fde61308
MD
389 * eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY.
390 (Thanks to Eric Hanchrow.)
391
963561f7
MD
3921999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
393
fde61308
MD
394 * objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
395
396 * random.c: Bugfix: Retrieve and store most significant 32 bits in
397 different order if the machine is bigendian.
398 (scm_init_random): Added safety check for bignum digit size.
399
ec1bbf39
MD
4001999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
401
402 * random.c, random.h (scm_i_make_rstate): New function: Makes
403 scm_rstate from seed.
404 (scm_copy_random_state, scm_seed_to_random_state): New functions.
405 (scm_make_random_state): Removed.
406
407 * random.c (scm_make_random_state): Use scm_i_make_rstate().
408
efe5e0ef
MD
4091999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
410
411 * random.c: Bugfix: Retrieve and store most significant 32 bits in
412 different order if the machine is bigendian.
413 (scm_init_random): Added safety check for bignum digit size.
414
a40bd532
MD
4151999-01-11 Roland Orre <mdj@mdj.nada.kth.se>
416
417 * sort.c (scm_merge, scm_merge_list_x): Bugfix: Place elements
418 from first arg before equal elements in second arg in result.
419 (scm_merge_list_step): Bugfix: Don't presume that arguments in a C
420 function call are executed in a well defined order.
421
94baa3b2
JB
4221999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
423
424 * alloca.c (alloca): Cast value returned by malloc. (Thanks to
425 Christian Lynbech.)
426
922363f5
MD
4271999-01-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
428
429 * random.c: Removed alloca includes.
430
f7677ff2
JB
4311999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
432
433 * Makefile.in: This changed, for some reason I don't really
434 understand, when I ran automake in the top level directory. This
435 may be contamination by Cygnus internal releases. If you re-run
436 automake and this change gets reverted, don't worry about it.
437
7a5bee23
MD
4381999-01-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
439
440 * sort.c, sort.h: New files: Implement slib's and scsh's sort
f7677ff2 441 interfaces. Author: Roland Orre.
7a5bee23
MD
442
443 * Makefile.am: Added sort.c, sort.h, sort.x.
444
445 * init.c: #include "sort.h";
446 (scm_boot_guile_1): Call scm_init_sort ().
447
448 * numbers.h: Added #include "libguile/print.h".
449
450 * numbers.c: Formatted according to Guile conventions;
451 Renamed s_bignum --> scm_s_bignum.
452
453 * random.c, random.h: New files: Random number support.
454 Interface same as slib's.
455
456 * Makefile.am: Added random.c, random.h, random.x.
457
458 * init.c: #include "random.h";
459 (scm_boot_guile_1): Call scm_init_random ().
460
0c03eafd
MD
4611998-12-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
462
463 * Makefile.am: New files: guardians.c, guardians.x, guardians.h
464
465 * guardians.c, guardians.h (scm_make_guardian,
466 scm_guardian_gc_init, scm_guardian_zombify, scm_guard,
467 scm_get_one_zombie, scm_init_guardian): This is an implementation
468 of guardians as described in R. Kent Dybvig, Carl Bruggeman, and
469 David Eby (1993) "Guardians in a Generation-Based Garbage
470 Collector" ACM SIGPLAN Conference on Programming Language Design
471 and Implementation, June 1993 ftp://ftp.cs.indiana.edu
472 /pub/scheme-repository/doc/pubs/guardians.ps.gz
473 Author: Michael N. Livshin.
474
475 * gc.h (SCM_MARKEDP, SCM_NMARKEDP): New macros.
476
477 * gc.c (scm_igc): Call scm_guardian_gc_init and
478 scm_guardian_zombify.
479
480 * init.c (scm_boot_guile_1): Call scm_init_guardian.
481
d0c2c0c0
MD
4821998-12-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
483
484 * macros.c (scm_makacro, scm_makmacro, scm_makmmacro): Added
485 argument checking.
486
7f0a6a69
MD
4871998-12-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
488
489 Move the procedure slots of entities to invisible slots (so that
490 we can have operator class objects which themselves are entities).
491 * struct.h (scm_struct_i_proc, scm_struct_i_flags,
492 SCM_STRUCTF_ENTITY): New constants.
493
494 * struct.c (scm_make_struct): Allocate "invisible" room for
495 procedures if SCM_STRUCTF_ENTITY is set in vtable.
496
497 * gc.c (scm_gc_mark): Mark entity procedures.
498
499 * struct.c, struct.h (scm_alloc_struct): Renamed from alloc_struct
500 and made global.
501 (scm_struct_init): Renamed from init_struct and made global.
502
503 * objects.h (SCM_ENTITY, scm_entity): Removed.
504 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0,
505 SCM_ENTITY_PROC_3): Adjusted for new location of procedure slots.
506
b8229a3b
MS
507Mon Dec 14 18:10:12 1998 Maciej Stachowiak <mstachow@mit.edu>
508
509 * snarf.h (SCM_SYNTAX): New macro to allow convenient declaration
510 of syntactic forms, similar to SCM_PROC.
511 * debug.c, eval.c, evalext.c: use SCM_SYNTAX to declare all special
512 forms, and SCM_SYMBOL or SCM_GLOBAL_SYMBOL to delcare C variables
513 for the name symbols when needed.
514
333a4791
JB
5151998-12-14 Jim Blandy <jimb@zwingli.cygnus.com>
516
517 * Makefile.in: Regenerated.
518
715fad68
JB
5191998-12-05 Jim Blandy <jimb@zwingli.cygnus.com>
520
521 * pairs.h (SCM_NEWCELL): When DEBUG_FREELIST is defined, don't
522 take the address of _into; it might be a register. Just have
523 scm_debug_newcell return the new cell.
524 * gc.c (scm_debug_newcell): Just return the new cell, instead of
525 taking the address of a place to store it as an argument.
526 * gc.h (scm_debug_newcell): Change declaration.
527 (Thanks to Greg Harvey.)
528
67ad463a
MD
5291998-12-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
530
531 * ramap.c (array-copy-in-order!, array-map-in-order): New names.
532 Replaces old names serial-array-copy! and serial-array-map!.
533
534 * evalext.c (map-in-order): New name. Replaces serial-map.
535
67ea079d
JB
5361998-12-05 Jim Blandy <jimb@totoro.red-bean.com>
537
538 * smob.c (freeprint): New function.
539 (freecell): Use it to print freed objects, for slightly easier
540 debugging.
541
6ab397f4
MD
5421998-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
543
544 * backtrace.c (display_frame): Made more robust. Doesn't throw an
545 error if no source properties can be found for a frame. (Thanks
546 to Christian Lynbech.)
547
afae5cbd
MD
5481998-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
549
550 * objects.h: Removed slots direct_supers and direct_slots from the
551 definitions of the rudimentary classes described by objects.h.
552
553 * objects.c, objects.h (scm_entity_p): New procedure. Together
554 with the predicates scm_procedure_p and scm_struct_p, this
555 predicate makes it possible to differ between structs, entities
556 and operators.
557
558 * modules.c, modules.h (scm_resolve_module): New function.
559
3763ac3c
MD
5601998-11-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
561
afae5cbd
MD
562 * objects.h (SCM_METACLASS_STANDARD_LAYOUT,
563 SCM_METACLASS_OPERATOR_LAYOUT): Removed slots `direct_supers' and
564 `direct_slots'.
565
566 * objects.c (scm_entity_p): New procedure.
567
3763ac3c
MD
568 * procprop.c (scm_i_procedure_arity): Bugfix: Return correct value
569 for asubrs, rpsubrs, lsubrs and lsubr_2s.
570
0d2e4c1b
MD
5711998-11-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
572
573 * procprop.h (scm_i_procedure_arity): Added declaration.
574
575 * procprop.c (scm_i_procedure_arity): Made global; New code to
576 handle operators and entities.
577 (scm_procedure_property): No need to call scm_procedure_p since
578 scm_i_procedure_arity now does all necessary type checking.
579 Added #include "objects.h".
580
581 * feature.c (scm_remove_hook_x): Bugfix: Changed reference to
582 s_add_hook_x --> s_remove_hook_x.
583 (scm_add_hook_x, scm_remove_hook_x): Hooks now takes arguments.
584 Added #include "procprop.h"
585
586 * feature.c, feature.h (scm_reset_hook_x): New procedure.
587 (scm_make_hook): Optional argument defines number of arguments to
588 the hook.
589 (scm_make_named_hook): Take number of args as second arg.
3763ac3c
MD
590 (scm_run_hook): Renamed from scm_run_hooks (old name defined in
591 boot-9.scm for a while); First arg is the hook. The rest are
592 arguments passed on to the hook procedures.
0d2e4c1b 593
69c6acbb
JB
5941998-11-23 Jim Blandy <jimb@zwingli.cygnus.com>
595
596 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest,
597 scm_logbit_p): Do the computation in ulongs. This is not as nice
598 as doing it in bignums, but at least it's good enough for
599 manipulating flags in 32-bit words. (Thanks to Jim Wilson.)
600
601 * regex-posix.c (scm_regexp_exec): Reliably mark unmatched
602 subexpressions. (Thanks to Charbel Jacquin.)
603
a56eeb46
MD
6041998-11-23 Mikael Djurfeldt <mdj@kenneth>
605
606 * feature.c, feature.h (scm_make_hook, scm_add_hook_x,
607 scm_remove_hook_x, scm_run_hooks): Moved from ice-9/boot-9.scm.
608 (scm_make_named_hook): New function.
609
610 * feature.c: Added #include "eval.h".
611
612 * modules.c (scm_make_module): Beautify the module.
613
7e414627
MD
6141998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
615
616 * modules.c, modules.h: New files: C interface to modules. (This
617 is necessary in order to interface the object system to Guile
618 properly. The guts of these modules will be replaced by the new
619 module system in the future.)
620
621 * init.c: Added #include "modules.h"
622 (scm_boot_guile_1): Call scm_init_modules.
623 (invoke_main_func): Call scm_post_boot_init_modules.
624
625 * Makefile.am: Added modules.c, modules.x, modules.h.
626
17621f3e
MD
6271998-11-22 Mikael Djurfeldt <mdj@kenneth>
628
629 * procs.c: #include "objects.h"
630 (scm_procedure_p): Return #t also on structs which are operators.
631
632 * objects.c (scm_init_objects): Renamed <standard-metaclass>,
633 <operator-metaclass> and <entity-class> to <standard-class>,
634 <operator-class> and <entity> in order to conform with STKlos
635 naming conventions.
636
637 * eval.c (SCM_CEVAL): Jump to badfun if trying to apply a struct
638 which isn't an operator.
639 (SCM_APPLY): Ditto, but jump to badproc.
640
aa00bd1e
MD
6411998-11-21 Mikael Djurfeldt <mdj@kenneth>
642
643 * eval.c (SCM_CEVAL): Allow structs implanted in code.
644 Previously, structs implanted in code were interpreted as forms
645 the operator of which was a gloc. We solve this by checking for
646 the zero in the emulated vcell in the struct vtable. Since
647 implanted structs always will look like forms with a gloc
648 operator, execution will only be slowed down by maximally one
649 extra test-and-branch per application.
650
651 * evalext.c (scm_definedp): Removed check for isyms; Added a
652 second optional argument: It is now possible to supply an
653 evaluation environment in which to look for the symbol.
654
b322f09a
MD
6551998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
656
657 * readline.c (scm_init_readline): Set
658 rl_basic_word_break_characters. (Thanks to Ian Grant.)
659
660 * coop.c (coop_condition_variable_wait): Removed
661 (coop_condition_variable_wait_mutex): Folded logic of
662 coop_mutex_unlock into coop_condition_variable_wait_mutex to
663 prevent condvar signal lossage. Previously, another thread could
664 start to run after unlocking the mutex but before putting the
665 current thread on the wait queue. If that thread then would
666 signal the first, the signal would be lost. (Thanks to Christian
667 Lynbech.)
668
224822be
MD
6691998-11-17 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
670
671 * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to
672 Christian Lynbech.)
673
036737fc
MD
6741998-11-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
675
676 * objects.c (scm_i_make_class_object): Renamed from
677 make_class_object; exported; error checking moved to
678 scm_make_class_object and scm_make_subclass_object.
679 (scm_make_class_object, scm_make_subclass_object): Use
680 scm_i_make_class_object.
681 (scm_make_subclass_object): Let the subclass have same metaclass
682 as the superclass.
683
a6e350dd
MD
6841998-11-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
685
686 * debug.c (scm_debug_options): Bugfix: Set the value of
687 scm_stack_checking_enabled_p after setting debug options;
688 #include "stackchk.h". (Thanks to Richard Polton.)
689
9879d0f1
RS
6901998-11-13 Radey Shouman <rshouman@metro2000.com>
691
692 * unif.c (scm_array_contents): removed unnecessary test for 0
693 base.
694
88be72ac
MD
6951998-11-13 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
696
697 * evalext.c, evalext.h (scm_m_sequence_to_list): Removed.
698 Replaced by macro `collect' in boot-9.scm.
699
ad3ff75b
MD
7001998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
701
702 * eval.c (scm_copy_tree): Copy source properties if existent.
703
704 * debug.c (scm_start_stack): Copy source when evaluating. (If we
705 don't, we may end up passing memoized source to a transformer.)
706
29672a5c
MD
7071998-11-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
708
7a13c3ae
MD
709 * stack.c (get_applybody): Help function which lookups the first
710 body form of the apply closure.
711 (read_frames): Prevent the source of the first form of the apply
712 closure from being recorded. This would only be confusing.
e40a5fc8 713
29672a5c
MD
714 * debug.h (SCM_SET_MACROEXP, SCM_CLEAR_MACROEXP, SCM_MACROEXPP):
715 Replaces SCM_MACROFRAME, SCM_MACROFRAMEP.
716
717 * eval.c (SCM_CEVAL): Use SCM_SET/CLEAR_MACROEXP.
718
719 * stacks.c (read_frame): Bugfix: Removed lingering `else'
720 statement.
721 (read_frames): Use SCM_MACROEXPP.
722
56977059 7231998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
7c939801
MD
724
725 * stacks.c (read_frames): Skip gsubr frames in backtraces. (They
726 don't contain interesting information since all arguments are
727 present in the frame which applies the compiled closure anyway.);
728 Skip the transformer application frames.
56977059
MD
729
730 * print.c (scm_iprin1): Print gsubrs as primitives.
731
fc4c5795
MD
7321998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
733
734 * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type.
735
736 * eval.c (SCM_CEVAL): Mark macro frames at `handle_a_macro' so
737 that we can identify these in a backtrace. (This change doesn't
738 introduce any significant speed penalty.)
739
740 * eval.c: Added note about `serial-map' using scm_map.
741
742 * read.c, read.h (scm_read_options, scm_read_opts): Removed
743 readline options. They should reside in their own options array.
744
745 * readline.c, readline.h (scm_readline_options,
746 scm_readline_opts): Moved readline options here.
747
68d15e3e
MD
7481998-11-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
749
750 * readline.c (scm_read_history, scm_write_history): Bugfix: Use
751 SCM_ROCHARS instead of SCM_CHARS.
752
753 * ports.c (scm_unread_string): Bugfixes: Check for SCM_STRINGP,
754 not SCM_ROSTRINGP; use SCM_ROUCHARS instead of SCM_UCHARS.
755
44e0a162
MD
7561998-11-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
757
758 * ports.h (SCM_CUC): #define as ~SCM_CRDY instead of 0x001fffffL.
759 This is quite important since the latter clears the
760 FPORT_READ_SAFE and FPORT_WRITE_SAFE flags causing flushes at
761 every single character read...
762
99317654
MD
7631998-11-03 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
764
765 * print.c (scm_iprin1): Removed suspect looking (and indeed
766 malevolent) semicolon after test for user supplied closure print
767 procedure. (Thanks to Telford Tendys.)
768
769 * list.c (scm_sloppy_memq): Removed sloppy_mem_check.
770 (scm_memq, scm_memv, scm_member): Do argument checking *before*
771 starting to search the list. Removed call to sloppy_mem_check.
772
773 * list.c, list.h (scm_delq1_x, scm_delv1_x, scm_delete1_x): New
774 procedures: Same as scm_delq_x et al, but delete maximally one
775 element.
776
777 * options.c (scm_options, scm_init_options): GC-protect option
778 values of type SCM. (Thanks to Telford Tendys.)
779
d0b7bad7
MD
7801998-11-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
781
782 * eval.c: Don't #define scm_lookupcar to scm_lookupcar1. Instead
783 make sure that there always is a "real" scm_lookupcar.
784
9cb84fbb
MD
7851998-11-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
786
69c6acbb
JB
787 * read.c, read.h (scm_read_opts): New read options
788 "history-length" and "history-file".
9cb84fbb
MD
789 (scm_read_options): Stifle history to history length.
790
69c6acbb 791 * readline.c (scm_read_history, scm_write_history): New procedures.
9cb84fbb 792
4ecb8428
MD
7931998-10-31 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
794
795 * eval.h (scm_macro_eval_x): Removed declaration.
796
797 * eval.c (scm_s_expression, scm_s_test, scm_s_body,
798 scm_s_bindings, scm_s_variable, scm_s_clauses, scm_s_formals):
799 Renamed and made global.
800
801 * eval.c, eval.h (SCM_EVALIM): Renamed from EVALIM.
802 (SCM_XEVAL, SCM_XEVALCAR): Renamed from XEVAL, XEVALCAR.
803
804 * evalext.c, evalext.h: New files. Contain non-R5RS things
805 having to do with evaluation.
806
fc4c5795
MD
807 * evalext.c (scm_serial_map): New procedure: Version of `map'
808 which guarantees that the procedure is applied to the lists in
809 serial order.
810 (scm_m_sequence_to_list): New syntax: Version of `begin' which
811 returns a list of the results of the body forms instead of the
812 result of the last body form.
4ecb8428
MD
813 (scm_definedp, scm_m_undefine): Moved from eval.c
814
815 * evalext.h (scm_m_sequence_to_list): Added declaration.
816
817 * macros.c, macros.h: New files.
fc4c5795
MD
818 (scm_procedure_to_syntax, scm_procedure_to_macro,
819 scm_procedure_to_memoizing_macro, scm_macro_p, scm_macro_type,
820 scm_macro_name, scm_macro_transformer): Moved from eval.c
4ecb8428
MD
821 (scm_make_synt): Moved from eval.c
822
69c6acbb 823 * procs.c, procs.h (scm_procedure_documentation): Moved from eval.c.
4ecb8428
MD
824
825 * init.c (scm_boot_guile_1): Added calls to scm_init_macros and
826 scm_init_evalext.
827
828 * Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h.
829
35c96965
MD
830 * debug.c, print.c: Added #include "macros.h".
831
4d362308
MD
8321998-10-29 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
833
834 This change adds the ability to use `unread-char' multiple times
835 without interspersed reads and adds the new procedure
836 `unread-string'. The change is optimized for the common case of
837 unreading a single character. This is also the reason behind the
838 choice to store characters in the port itself: in most cases no
839 extra malloc is required.
840
841 The amount of code in some macros in ports.h has been increased to
842 the extent that they would fit better as C functions, but, since
843 this code belongs to the port representation, such functions
844 should be placed in ports.c which would cause calls back and forth
845 between ports.c and genio.c. That is not good for performance.
846 Also, keeping them as macros allows the compiler to do some
847 optimizations which are needed to make the current interface
848 (SCM_CRDYP, SCM_CGETUN, SCM_TRY_CLRDY) efficient.
849
850 One benchmark (Guile startup time) indicates an increase of
851 loading speed of 1%. Another (reading (using `read') boot-9.scm
852 10 times) shows no change in performance.
853
854 (Caveat: Since Gary is redesigning I/O anyway, no big efforts were
855 made to find a beautiful solution.)
856
857 * ports.h (SCM_CLRDY, SCM_CUNGET, SCM_CGETUN): Rewritten.
858 (SCM_TRY_CLRDY): New macro: Only clear the first unread
859 character. (SCM_CLRDY clears all.)
860 (SCM_N_READY_CHARS): New macro: Returns number of unread
861 characters in a port. Returns wrong answer if SCM_CRDYP is false.
862 (struct scm_port_table): New fields: `entry' contains port table
863 index, `cp' points to last unread char, `cbuf' is the buffer for
864 unread chars, `cbufend' points after end of the character buffer.
865
866 * ports.h, ports.c (scm_unread_string): New procedure.
867 (scm_grow_port_cbuf): New function.
868
869 * ports.c (scm_add_to_port_table, scm_remove_from_port_table):
870 Handle new fields.
871 (scm_generic_fgets), fports.c (local_fgets): Use a loop
872 to read unread characters. Use SCM_TRY_CLRDY instead of
873 SCM_CLRDY.
874
875 * ioext.c (scm_ftell): Use SCM_N_READY_CHARS to correct position.
876
877 * genio.c (scm_getc): Use SCM_TRY_CLRDY instead of SCM_CLRDY.
878
879 * genio.c, genio.h (scm_ungets): New function.
880
881 * genio.c (scm_puts): Removed mysterious TRANSCRIPT_SUPPORT code
882 sections.
883
22c88b3f
MD
8841998-10-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
885
886 * threads.h (scm_thread_sleep, scm_thread_usleep): Fixed
887 declarations. (Thanks to Russ McManus.)
888
3ffc7a36
MD
8891998-10-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
890
891 * numbers.c (num2long): As a software archeologist, I'm proud of
892 this finding! :) Preliminary dating suggests an almost 4 year old
893 remnant from the SCM ancestor. The sample has been removed from
894 the finding site and is now safely stored in the repository.
895
896 * numbers.h: Removed prototype for num2long.
897
898 * unif.c (scm_array_set_x): Use scm_num2long instead of num2long.
899
900 * gh_data.c (gh_scm2doubles): Make it possible to pass result
901 array as second arg.
902 (gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
903 gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions.
904 * gh.h: Updated and added prototypes.
905
906 * gh_data.c (gh_ints2scm): Handle integers outside INUM limits.
907
cc720f64
JB
9081998-10-24 Jim Blandy <jimb@zwingli.cygnus.com>
909
910 * gc.h: Remove all uses of SCM_P. (Thanks to Richard Polton.)
911
912 * guile-snarf.in: Never generate an empty file. (Thanks to
913 Richard Polton.)
914
915 * gh.h (gh_enter, gh_new_procedure0_0, gh_new_procedure0_1,
916 gh_new_procedure0_2, gh_new_procedure1_0, gh_new_procedure1_1,
917 gh_new_procedure1_2, gh_new_procedure2_0, gh_new_procedure2_1,
918 gh_new_procedure2_2, gh_new_procedure3_0, gh_new_procedure4_0,
919 gh_new_procedure5_0): Specify argument types, to appease C++
920 compilers. (Thanks to Brad Bowman.)
921
922 Bug reports from Russ McManus:
923 * guile-snarf.in: If the CPP environment variable is set, use that
924 as the C preprocessor, instead of the preprocessor autoconf
925 found.
926 * snarf.h (SCM_PROC): Cast the function pointer passed to
927 scm_make_gsubr, to satisfy C++.
928
929 * gh_eval.c (gh_eval_str_with_catch, gh_eval_file_with_catch):
930 Use the handler passed, instead of ignoring it and using
931 gh_standard_handler. (Thanks to Etienne Bernard.)
932
5469b4a1
JB
9331998-10-20 Jim Blandy <jimb@zwingli.cygnus.com>
934
935 * ports.h: Put text after #endif in comment. (Thanks to Nicolas
936 Neuss.)
937
f4be1689
JB
9381998-10-19 Jim Blandy <jimb@zwingli.cygnus.com>
939
1f6fe22a
JB
940 * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
941 continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
942 dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
943 feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
944 genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
945 hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
946 list.c, list.h, load.c, load.h, mallocs.c, markers.c,
947 mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
948 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
949 procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
950 regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
951 script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
952 srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
953 strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
954 symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
955 vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
956 copyright years.
957
f4be1689
JB
958 * script.c (scm_compile_shell_switches): Define
959 use-emacs-interface in the root module, so the repl code can see
960 it. See today's change to top-repl in ice-9/boot-9.scm.
961
962 * filesys.c (set_element, get_element): Make sure that `element'
963 is a cell before applying SCM_FPORTP to it. (Thanks to Jost
964 Boekemeier and Jorgen "forcer" Schaefer.)
965
9661998-10-18 Jim Blandy <jimb@zwingli.cygnus.com>
967
968 * chars.c (scm_charnames): In ASCII character name table, make
969 newlines print as #\newline by default, not #\nl.
970
971 * Makefile.am (libguile_la_SOURCES, BUILT_SOURCES): Put these in
972 alphabetical order. Oh thrills. But it helps me know how far
973 along in the compilation I am.
974 * Makefile.in: Regenerated.
975
05c33d09
MD
9761998-10-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
977
978 * unif.c (scm_raprin1): Changed print syntax for byte vectors from
979 #bytes(...) to #y(...), and syntax for short vectors from
980 #short(...) to #h(...). This may seem nutty, but, like the other
981 uniform vectors, byte vectors and short vectors want to have the
982 same print and read syntax (and, more basic, want to have read
983 syntax!). Changing the read syntax to use multiple characters
984 after the hash sign breaks with the conventions used in R5RS and
985 the conventions used for the other uniform vectors. It also
986 introduces complexity in the current reader, both on the C and
987 Scheme levels. (The Right solution is probably to change the
988 syntax and prototypes for uniform vectors entirely.)
989
1aab20ac
JB
9901998-10-17 Jim Blandy <jimb@savonarola.red-bean.com>
991
992 Don't use local_fgets on sockets; ftell doesn't work on sockets.
993 (Thanks to Jorgen "forcer" Schaefer.)
994 * ports.h (SCM_NOFTELL): New flag.
995 * fports.c (local_fgets): If it's set, use the generic fgets.
996 * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce.
997
97c524bd
MD
9981998-10-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
999
1000 * script.c (scm_compile_shell_switches): Add handling of -q switch
1001 (inhibit loading of user init file).
1002 (scm_shell_usage): Add usage text for -q switch.
1003 (scm_compile_shell_switches): Always load user init file first if
1004 it is loaded at all.
1005
70445040
JB
10061998-10-16 Jim Blandy <jimb@zwingli.cygnus.com>
1007
1008 * stime.c: The CPP hair to determine a value for CLKTCK is weird,
1009 and is now broken under NetBSD. I can't fathom what it's trying
1010 to do, so I've replaced it with something that I do understand,
1011 which seems to work, and which isn't broken on NetBSD. "Progress?
1012 You Decide." (Thanks to Perry Metzger.)
1013
1014 * regex-posix.c (scm_regexp_exec): Add a cast to remove a
1015 signed/unsigned comparison.
1016
6e6e2bbc
JB
10171998-10-15 Jim Blandy <jimb@zwingli.cygnus.com>
1018
1019 Warning fixes from Greg Harvey:
1020 * unif.c (scm_array_set_x): initializer for pos
1021 * throw.c (scm_ithrow): added initializer for jmpbuf (SCM_UNDEFINED)
1022 * struct.c (scm_struct_ref, scm_struct_set_x): Added
1023 initializers for field_type, since EGCS so desparately wants to
1024 play dumb
1025 * debug.h (scm_make_gloc, scm_gloc_p, scm_make_iloc, scm_memcons,
1026 scm_mem_to_proc, scm_proc_to_mem, scm_debug_hang): Added prototypes
1027 when GUILE_DEBUG is defined.
1028 * dynwind.h (scm_wind_chain): Same.
1029 * ports.h (scm_pt_size, scm_pt_member): Same.
1030 * print.h (scm_current_pstate): Same.
1031 * procs.h (scm_make_cclo): Same.
1032
eebc12c6
JB
10331998-10-14 Jim Blandy <jimb@zwingli.cygnus.com>
1034
a437d8a2
JB
1035 Handle short and long long uniform arrays properly. (Thanks to
1036 Clark McGrew.)
1037 * ramap.c (scm_ra_matchp, scm_array_fill_int, scm_array_index_map_x,
1038 raeql_1): Add cases for scm_tc7_svect (short vectors) and
1039 scm_tc7_llvect (long long vectors).
1040
1041 Change the way libguile and boot-9.scm are timestamped, to try to
1042 get rid of these spurious mismatch warnings. Now both
1043 libguile/versiondat.h and ice-9/version.scm are generated directly
1044 by the configuration process, rather than having version.scm
1045 generated directly, and libguile/versiondat.h generated by the
1046 Makefile, which is generated by configure. It seems that
1047 sometimes the Makefile would change, but versiondat.h depends on
1048 Makefile.in, not Makefile, so it wouldn't get rebuilt.
1049 * Makefile.am (versiondat.h): Target removed; this is generated
1050 directly by the configure script now.
1051 (BUILT_SOURCES): Remove versiondat.h.
1052 * versiondat.h.in: New file, transformed by the configure script
1053 into versiondat.h.
1054 * Makefile.in: Regenerated.
1055
731a0a68
JB
1056 * (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c,
1057 options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS ->
1058 SCM_CAUTIOUS; this way, 1) there's only one version of each flag
1059 to define (we used to have both RECKLESS and SCM_RECKLESS), and 2)
1060 if we want to use them in a header file some day, we can. (Thanks
1061 to Michael Livshin.)
1062
ae6f9e24
JB
1063 * stime.c (scm_get_internal_real_time): Do the arithmetic using
1064 SCM numbers, so we won't have rollover problems; the range of a
1065 signed long in milliseconds is about 25 days. (Thanks to Karl
1066 Hegbloom.)
1067
70445040 1068 Don't redefine sleep and usleep; fix this problem now.
eebc12c6
JB
1069 * coop.c (sleep, usleep): Remove declarations; we don't use or
1070 redefine these any more.
1071 (scm_thread_usleep, scm_thread_sleep): New functions which do the
1072 job of usleep and sleep in a thread-friendly way. We can use
1073 these in the rest of Guile. Define versions for systems both with
1074 and without iselect.
1075 * threads.h (scm_thread_usleep, scm_thread_sleep): New declarations.
1076 * scmsigs.c (usleep): Clean up oddities declaring usleep; since
1077 we're just using it, not redefining it, we can use a K&R style
1078 declaration here.
1079 (sleep): Declare this, too, if the system hasn't.
1080 (scm_sleep, scm_usleep): Use scm_thread_sleep and
1081 scm_uthread_sleep if they're available; otherwise, just call the
1082 system functions.
1083 * scmconfig.h.in: Regenerated.
1084
1085 * coop.c (scm_thread_sleep): Make `slept' an unsigned long.
1086
1087 * coop.c (coop_sleephelp): Remove ANSI #ifdef hair.
1088
94e3e95e
JB
10891998-10-12 Jim Blandy <jimb@zwingli.cygnus.com>
1090
cb9728ed
JB
1091 * threads.c: Doc fix.
1092
1093 The argument type of usleep varies from system to system,
1094 as does the return type. We really shouldn't be redefining usleep
1095 at all, but I don't have time to clean that up before the 1.3.
1096 release. It's on the schedule for afterwards. (Thanks to Julian
1097 Satchell.)
1098 * coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and
1099 definition.
1100 * scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype.
1101 * scmconfig.h: Regenerated.
1102
94e3e95e
JB
1103 * simpos.c (scm_software_type): Procedure deleted. This isn't the
1104 right way to handle system variation. Autoconf's approach is the
1105 way and the light.
1106 * simpos.h (scm_software_type): Declaration deleted.
1107
1108 * script.c (scm_find_executable): Don't test if unix is #defined
1109 here; first, NetBSD doesn't #define it, and second, it's the wrong
b1d6e336 1110 way to go about these things. (Thanks to Perry Metzger.)
94e3e95e
JB
1111 (dld_find_executable): Delete this MSDOS support code. This isn't
1112 the way we want to support this; it needs to be rethunk at a
1113 larger scale.
1114
1115 * genio.c (scm_do_read_line): Don't just politely check that the
1116 line was either non-empty or EOF. Abort if it's empty and not
1117 EOF.
1118
5f964025
JB
11191998-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
1120
81aef0ba
JB
1121 * scmconfig.h.in: Regenerated.
1122
335df0e8
JB
1123 * libguile.h: Don't omit the dynamic linking functions. (Thanks
1124 to Greg Badros.)
1125
5f964025
JB
1126 * genio.c (scm_do_read_line): Count lines correctly when the file
1127 doesn't end in a newline.
1128
17f8d40c
JB
11291998-10-10 Jim Blandy <jimb@zwingli.cygnus.com>
1130
216d3a1e
JB
1131 * genio.c (scm_do_read_line): Maintain the line count correctly.
1132 (Thanks to Harvey J. Stein and Greg Harvey.)
1133
17f8d40c
JB
1134 * gc.c (scm_return_first): Remove #ifdef __STDC__ garbage; Guile
1135 requires ANSI now.
1136
1137 * numbers.c (big2str): Protect t from garbage collection until
1138 we're done. (Thanks to Gary Houston.)
1139
31b9e767
JB
11401998-10-09 Jim Blandy <jimb@zwingli.cygnus.com>
1141
c6ff295e
JB
1142 * Makefile.am (libguile_la_LDFLAGS): Increment shared library
1143 version number.
1144 * Makefile.in: Regenerated.
1145
31b9e767
JB
1146 * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno,
1147 scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of
1148 SCM_P macro.
1149
1150 Do magic to mix reads and writes on stdio FILE-based ports.
0445f9f2 1151 (Thanks to Christian Lynbech.)
31b9e767
JB
1152 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY):
1153 New macros.
1154 (pre_read, pre_write): New functions.
1155 (local_fgetc, local_fgets, local_ffwrite, local_fputc,
1156 local_fputs): Call them.
1157 (local_fflush): Mark the port as ready for reading and writing.
1158 (scm_stdio_to_port): Set the FPORT_READ_SAFE, FPORT_WRITE_SAFE
1159 flags on new port objects. This might not be accurate --- who
1160 knows what state the FILE * is in when we get it --- but it won't
1161 do extraneous calls to fflush or fseek, so it's no worse than the
1162 behavior before this change.
1163 * ports.h: Add comment.
1164
1165 Centralize the creation of port objects based on stdio FILE * in
1166 fports.c; don't just throw them together anywhere.
1167 * fports.c (scm_stdio_to_port): Make NAME a SCM value, which is
1168 what the rest of Guile wants. Don't set the revealed count;
1169 that's only appropriate for stdin, stdout, stderr.
1170 (scm_standard_stream_to_port): This function does set the revealed
1171 count.
1172 * init.c (scm_init_standard_ports): Use scm_standard_stream_to_port,
1173 not scm_stdio_to_port.
1174 * filesys.c (scm_open): Call scm_stdio_to_port; don't write it out.
1175 * fports.c (scm_open_file): Same.
1176 * posix.c (scm_pipe): Same.
1177 * socket.c (scm_sock_fd_to_port): Same.
1178 * ioext.c (scm_fdopen): Same.
1179 (scm_freopen): Moved from here to...
1180 * fports.c (scm_freopen): ... here. This is really something that
1181 munges the internals of an fport, so it should go here.
1182 * fports.h (scm_stdio_to_port): Adjust prototype.
1183 (scm_standard_stream_to_port, scm_freopen): New protoypes.
1184 * ioext.h (scm_freopen): Prototype removed.
1185
1186 * filesys.c (set_element, get_element): This can work on both pipe
1187 and file ports, so use SCM_FPORTP to typecheck, instead of testing
1188 for scm_tc16_fport.
1189
1190 * scmconfig.h.in: Regenerated.
1191
1192 Change the definition of the functions in scm_ptobfuns so that
1193 they get passed the port object, not the port's stream.
1194 * ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
1195 * gc.c (scm_gc_sweep): Pass the port itself to the free function.
1196 * genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
1197 Pass the port itself to the scm_ptobs function.
1198 * ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
1199 scm_generic_fgets): Same.
1200 (putc_void_port, puts_void_port, write_void_port, flush_void_port,
1201 getc_void_port, fgets_void_port, close_void_port): Just change the
1202 argument names; these functions don't really do anything.
1203 * fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
1204 local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
1205 port as an argument, and use SCM_STREAM to get the stdio FILE *.
1206 Also, use prototyped definitions, and get rid of the extra
1207 declarations.
1208 (scm_fptob, scm_pipob): We don't need casts here any more.
1209 * strports.c (prinstpt): Use prototype declarations.
1210 (stputc, stwrite, stputs, stgetc): Take the port as an argument,
1211 and use SCM_STREAM to get the string info. Also, use prototyped
1212 definitions, and get rid of the extra declarations.
1213 * vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
1214 noop0): Same.
1215
1216 * ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight
1217 prototype; it's okay (preferred, even!) to use ANSI C in Guile.
1218
1219 * fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and
1220 scm_fgets, for consistency.
1221 (scm_fptop, scm_pipob): References updated.
1222
6d921cd6
JB
12231998-10-08 Jim Blandy <jimb@zwingli.cygnus.com>
1224
1225 Include the source location in error messages for scripts.
1226 * init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the
1227 stack is still there when we catch the error.
1228 * throw.c (handler_message): If we are handling an error with a
1229 message, then put together the proper arguments and call
1230 scm_display_error, instead of scm_display_error_message. That
1231 displays source location, if it can find it.
1232
13af3048
JB
12331998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
1234
a8e05009
JB
1235 * gc.c (scm_unprotect_object): Change this so that calls to
1236 scm_protect_object and scm_unprotect_object nest properly.
1237 (scm_protect_object): Doc fixes.
1238
3c0a54bd
JB
1239 * strings.c (scm_string_set_x): Require the argument to be a
1240 writable string, not a substring or a symbol.
1241 * strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.
74f87516
JB
1242 (Thanks to John Redford and Charbel Jacquin.)
1243
13af3048
JB
1244 * scmconfig.h.in: Regenerated; ../acconfig.h has changed.
1245
6ea669d7
JB
12461998-10-07 Jim Blandy <jimb@totoro.red-bean.com>
1247
1248 * eval.c (safe_setjmp): Remove this misunderstanding.
1249 (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to
1250 ordinary setjmp.
1251
2d0937bc
JB
12521998-10-06 Jim Blandy <jimb@zwingli.cygnus.com>
1253
1254 * libguile.h: Mark these as C declarations, for compilation by C++
1255 compilers.
1256
1257 * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef
1258 __cplusplus clause. I seriously doubt this ever worked the way
1259 the author seems to have intended.
1260
12611998-10-05 Jim Blandy <jimb@zwingli.cygnus.com>
1262
1263 Utterly needless cleanups to hopelessly messy code.
1264 * ports.c: Doc fixes.
1265 (scm_fflush): Moved to ...
1266 * genio.c (scm_fflush): ... here, amongst all the other port
1267 method invocation functions.
1268 * genio.h, ports.h: The prototype moves too.
1269
53314947
JB
12701998-10-04 Jim Blandy <jimb@zwingli.cygnus.com>
1271
8b49142f
JB
1272 * backtrace.c (display_error_body): The current frame does not
1273 always have a parent frame; consider a function called directly
1274 from the MAIN_FUNC passed to scm_boot_guile. (Thanks to Maciej
1275 Stachowiak.)
1276
53314947
JB
1277 * alloca.c (alloca): Undo yesterday's changes, and simply call
1278 malloc directly for storage, and abort if we don't get what we
1279 want. The situation is much simpler --- just call malloc. Emacs
1280 has bizarre/evil requirements (signal handlers might malloc unless
1281 you set this global flag, so you have to set the flag around all
1282 calls to malloc) which we are certainly not going to conform to,
1283 so we can do the simple and obvious thing.
1284
1285 * coop.c (coop_condition_variable_wait): Make this function
1286 static. It's only useful internally --- you should never just
1287 wait on a condition variable.
1288 * coop-defs.h (coop_condition_variable_wait): Delete prototype.
1289
026065b7
JB
12901998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
1291
7265de70
JB
1292 * unif.c (scm_array_set_x): Accept any kind of number as an
1293 element for a uniform vector of doubles. This is more consistent
1294 with Scheme's view of numbers. (Thanks to Miroslav Silovic.)
1295
a9fe62cb
JB
1296 * alloca.c: Use scm_must_malloc to obtain storage. Hopefully this
1297 works; I can't conveniently test it myself. (Thanks to Dvid
1298 Tillman for the bug report.)
1299
026065b7
JB
1300 * init.c: Doc fixes.
1301
1302 * init.c (invoke_main_func): Load the startup files (boot-9.scm)
1303 from here, not from scm_compile_shell_switches (which is a pretty
1304 dumb place to do it).
1305 (scm_load_startup_files): New function.
1306 (scm_ice_9_already_loaded): Variable moved to here from script.c.
1307 * script.c (scm_compile_shell_switches): Don't load the startup
1308 files here.
1309 (scm_ice_9_already_loaded): Variable moved.
1310 * init.c (scm_load_startup_files): Prototype for new function.
1311 * gh_init.c (gh_enter): Doc fix.
1312
1aab20ac 13131998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
541716d1
JB
1314
1315 Some anti-warning changes from Greg Harvey.
1316 * gh_data.c (gh_scm2doubles): Initialize m, to avoid compiler
1317 warnings when it doesn't understand our NORETURN declarations in
1318 error.h.
1319 * posix.c (scm_mknod): Similar.
1320
f9d12ce8
JB
13211998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
1322
1323 * posix.c (scm_getpwuid): If we can't find an entry, return our
1324 own message, instead of using scm_syserror --- the getpwMUMBLE
1325 functions don't set `errno' to anything interesting.
1326
1aab20ac 13271998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
0553d3a2
JB
1328
1329 Get rid of warnings from the cooperative threading system.
1330 * threads.h (scm_single_thread_p, scm_yield,
1331 scm_call_with_new_thread, scm_join_thread, scm_make_mutex,
1332 scm_lock_mutex, scm_unlock_mutex, scm_make_condition_variable,
1333 scm_wait_condition_variable, scm_signal_condition_variable): Add
1334 prototypes for these Scheme-visible functions.
1335 * coop-defs.h (coop_next_runnable_thread,
1336 coop_wait_for_runnable_thread_now, coop_wait_for_runnable_thread):
1337 Prototypes for these here, even though they're from iselect.c.
1338 (coop_condition_variable_wait, coop_join): Add prototypes.
1339 * coop-threads.c (scm_threads_free_thread, scm_threads_free_mutex,
1340 scm_threads_free_condvar): Make these smob functions static.
1341 * coop-threads.h (coop_init): Give this a real prototype.
1342 * coop.c: #include <unistd.h>, if we have it, for `usleep' and `sleep'.
1343 (coop_next_runnable_thread): No need to provide prototype; it's in
1344 coop-defs.h.
1345
1346 * scmconfig.h.in: .detarenegeR
1347
1348 * iselect.c, threads.c: Doc fixes.
1349
235bb3fe
JB
13501998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
1351
1352 * Makefile.in: Regenerated with a patched automake, to get
1353 dependency generation right when using EGCS.
1354
1355 * inet_aton.c (inet_aton): Add prototype, to remove compiler
1356 warning. (Thanks to Robert Pluim.)
1357
1358 * inet_aton.c (inet_aton): Reassure the compiler that the
1359 arguments to the <ctype.h> macros are all unsigned characters, not
1360 signed characters.
1361
1aab20ac 13621998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
83d1c666
JB
1363
1364 Getting rid of more warnings...
1365 * iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see
1366 today's change to ../configure.in.
1367 * scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP.
1368 * scmconfig.h.in: Regenertaded.de.,.__
1369 * stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL.
1370 (scm_localtime, scm_mktime): Use a const char * to manipulate the
1371 time zone name.
1372
1373 * readline.c: Doc fix.
1374 (rl_cleanup_after_signal, rl_free_line_state): Make these static.
1375 * readline.h (scm_filename_completion_function): Add prototype.
1376 (scm_init_readline): Make this into a prototype.
1377
1378 * readline.c (scm_filename_completion_function): Use SCM_PROC to
1379 declare this, instead of calling scm_make_subr manually.
1380
1aab20ac 13811998-10-02 Jim Blandy <jimb@savonarola.red-bean.com>
83d1c666
JB
1382
1383 * readline.h (scm_init_readline): Add prototype for this.
1384 (scm_init_readline): Make this a real prototype.
1385
94c0b3b8
JB
13861998-09-30 Jim Blandy <jimb@zwingli.cygnus.com>
1387
1388 Warning fixes from Maciej Stachowiak:
1389 * backtrace.h (scm_display_application, scm_backtrace): Add
1390 prototypes.
1391 * debug.c (scm_m_start_stack): Make this function static.
1392 * fluids.h (scm_fluid_p): Add prototype.
1393 * procprop.c (scm_i_procedure_arity): Make this function static.
1394 * regex-posix.c (scm_regexp_error_msg): Make this function static.
1395 * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl.
1396 * root.h (scm_dynamic_root): Add external prototype.
1397 * scmsigs.h (scm_usleep): Add external prototype.
1398 * script.h (scm_init_script): Use prototype, not K&R decl.
1399 * stacks.h (scm_stack_id): Add external prototype.
1400 * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype.
1401
dc9f6d6a
MG
14021998-09-30 Mark Galassi <rosalia@cygnus.com>
1403
1404 * gh.h: took out the definitions of vset and vref, since they are
1405 replaced by the proper vector routines that correspond to the R4RS
1406 procedures.
1407
61a9ba48
JB
14081998-09-29 Jim Blandy <jimb@totoro.red-bean.com>
1409
94c0b3b8 1410 * snarf.h (SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): New macros;
61a9ba48
JB
1411 these are analogous to SCM_VCELL and SCM_GLOBAL_VCELL but take a
1412 third argument, a C expression that should result in a SCM value,
1413 which is used to initialize the variable. Reimplemented
1414 SCM_CONST_LONG in terms of SCM_VCELL_INIT. (Thanks to Maciej
1415 Stachowiak.)
1416
1417 * version.h (scm_libguile_config_stamp): Add prototype.
1418 (From Maciej Stachowiak.)
1419
9a3c1149
JB
14201998-09-26 Jim Blandy <jimb@zwingli.cygnus.com>
1421
1422 * eval.c (scm_force): Assert that x is SCM_NIMP to fix segv when
1423 (force 9) is tried. (Thanks to Karl M. Hegbloom.)
1424
52591c80
JB
14251998-09-06 Jim Blandy <jimb@zwingli.cygnus.com>
1426
6925bc4e
JB
1427 * print.c (scm_iprin1): Rather than having one i, and using it in
1428 several places, declare a fresh i local to each block where it is
1429 used, and give it a signedness appropriate to its use in each case.
1430 (scm_iprlist): Same.
1431
1432 * print.c (scm_iprin1): Add cast to avoid unsigned/signed
1433 comparison warnings.
1434
1435 * print.c (ENTER_NESTED_DATA): Make i an unsigned long, to avoid
1436 signed/unsigned clashes.
1437
1438 * posix.h (scm_tmpnam): Added prototype.
1439
52591c80
JB
1440 * objects.h (scm_set_object_procedure_x, scm_make_class_object,
1441 scm_make_subclass_object): Add external prototypes.
1442
1443 * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned
1444 comparison is okay here.
1445
1446 * numbers.c (scm_istr2int): Add cast; len is known to be positive.
1447
1448 * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the
1449 (true, but confusing) fact that -1 == ((unsigned) 0 - 1).
1450
1451 * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing
1452 signed/unsigned.
1453
1454 * load.c (swap_port): Make this function static.
1455
1456 * load.c (scm_search_path): Make max_path_len and max_ext_len
1457 unsigned, since they're compared against string sizes.
1458
1459 * load.c (init_build_info): Make i unsigned.
1460
1461 * ioext.h (scm_read_line): Add prototype.
1462
1463 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
1464 scm_hash_fn_remove_x): Make hash bucket index local variable k
1465 unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as
1466 accurately as possible.
1467
1468 * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned
1469 comparisons, and range checking to make sure those casts are
1470 harmless.
2d2c87e1
JB
1471
1472 * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid
1473 signed/unsigned comparisons.
1474
1475 * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to
1476 avoid signed/unsigned comparisons.
1477 * smob.h (scm_numsmob): Change extern declaration to match.
1478
1479 * ports.c (scm_numptob): Make this an int, not an scm_sizet, to
1480 avoid signed/unsigned comparisons.
1481 * ports.h (scm_numptob): Change extern declaration to match.
1482 (scm_current_load_port, scm_set_port_line_x,
1483 scm_set_port_column_x): New prototypes.
1484
1485 * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the
1486 test code, and it causes warnings.
1487
1488 * gh.h (gh_int2scmb, gh_uniform_vector_length,
1489 gh_uniform_vector_ref): Added prototypes.
1490
1491 * Makefile.am (libguile_la_SOURCES): Include Scheme-level
1492 debugging support unconditionally. That's backtrace.c, stack.c,
1493 debug.c, and srcprop.c.
1494 (EXTRA_libguile_la_SOURCES): Omit those from here.
1495 * Makefile.in: Regenerated.
1496
a9b70caf
MD
14971998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1498
1499 * options.c (scm_options): Bugfix: Allow empty list of options!
1500
1501 * debug.c, debug.h (scm_single_step): Removed.
1502 (scm_with_traps): New procedure. This procedure could easily be
1503 written in Scheme but needs to be highly optimized.
1504
1505 * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P.
1506
1507 * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags.
1508 Check SCM_TRAPS_P before trapping.
1509
6dd78771
JB
15101998-07-30 Jim Blandy <jimb@zwingli.cygnus.com>
1511
1512 Changes to avoid signed/unsigned comparison warnings.
1513 * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs.
1514 (scm_gc_sweep): Make n and j local to the blocks they're used in,
1515 so they can have appropriate types for each application. Make i
1516 signed. Use initializers in some spots. I'll probably pay for
1517 all this tweaking.
1518 (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args.
1519 (scm_must_realloc): Make nm unsigned.
1520 (init_heap_seg): Make new_seg_index and n_new_objects signed.
1521 (scm_init_storage): Use prototype-style definition, and make the
1522 argument unsigned.
1523 * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc,
1524 scm_must_realloc, scm_init_storage): Adjust prototype accordingly.
1525
1526 * filesys.c (scm_readlink): Make local vars rv and size ints, to
1527 avoid signed/unsigned comparison warnings, and because the return
1528 value of readlink may be -1. Don't bother casting the third
1529 argument to readlink.
1530
1531 * filesys.c (scm_dirname, scm_basename): Move these to their own
1532 page, at the end of the file.
1533 * filesys.h (scm_dirname, scm_basename): Add prototypes for these.
1534
1535 * eval.h (scm_eval_options_interface): Add external prototype for this.
1536 * eval.c (scm_eval_options_interface): Use prototype-style def'n.
1537
1538 * eval.c (scm_lookupcar1): Make this static.
1539
1540 * dynl.h (scm_registered_modules, scm_clear_registered_modules):
1541 Make these prototype declarations, not K&R-style.
1542
1543 * chars.c (scm_tables_prehistory): Add cast, to remove signed/
1544 unsigned comparison warning.
1545
1546 * appinit.c: File removed. It had a single function in it, empty,
1547 whose reason for existence is explained in no documentation or
1548 comment. I think it's there as a default for some Tcl-style
1549 initialization, but Tcl abandoned that approach a while ago.
1550 * Makefile.am (libguile_la_SOURCES): Remove appinit.c.
1551 (BUILT_SOURCES): Remove appinit.x.
1552 * Makefile.in: Regenerated.
1553
0dcbc17a
JB
15541998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
1555
1556 * Makefile.in: Regenerated using the last public version of
1557 automake, not the hacked Cygnus version.
1558
1f5ae2fd
JB
15591998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
1560
1561 Remove Totoro kludge.
1562 * Makefile.in, scmconfig.h.in: Regenerated.
1563 * init.c, readline.c: Don't check if TOTORO is #defined.
1564
e99cbcd6
JB
15651998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
1566
1567 * Makefile.am: Adjust for new thread configuration system.
1568 (INCLUDES): Include the value of THREAD_CPPFLAGS.
1569 (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from
1570 THREAD_LIBS.
1571 (THREAD_LIBS): Definition deleted; automake will generate such
1572 things automatically.
1573 * Makefile.in: Regenerated.
1574
87148d9e
JB
15751998-07-23 Jim Blandy <jimb@zwingli.cygnus.com>
1576
1577 Simplify smob and port marking; set the mark bit in the generic
1578 marking code, and make marker routines only responsible for
1579 turning up outgoing pointers.
1580 * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
1581 before calling the marking function. Don't call the marking
1582 function if it's zero.
1583 * markers.c (scm_mark0): Just return #f. This function isn't
1584 necessary at all now, but it's harmless to call it. We'll leave
1585 it in so other folks' code doesn't croak at link time.
1586 (scm_markcdr): Don't call SCM_SETGC8MARK.
1587 * async.c (mark_async): Don't call SCM_SETGC8MARK.
1588 * dynl.c (mark_dynl_obj): Same.
1589 * root.c (mark_root): Same.
1590 * srcprop.c (marksrcprops): Same.
1591 * unif.c (markra): Same.
1592 * variable.c (scm_markvar): Same.
1593 * ports.c (scm_markstream): Same.
1594 (void_port_ptob): Specify zero for our marking function.
1595 * debug.c (debugobjsmob): Same.
1596 * dynwind.c (guardsmob): Same.
1597 * filesys.c (dir_smob): Same.
1598 * fluids.c (fluid_smob): Same.
1599 * fports.c (scm_fptob, scm_pipob): Same.
1600 * mallocs.c (mallocsmob): Same.
1601 * regex-posix.c (regex_t_smob): Same.
1602 * smob.c (freecell, flob, bigob): Same.
1603 * threads.c (thread_smob, mutex_smob, condvar_smob): Same.
1604 * throw.c (jbsmob, lazy_catch_funs): Same.
1605
3910272e
MD
16061998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1607
1608 * eval.c (scm_copy_tree): Reverted last change: `eval' uses
1609 scm_copy_tree on code in order not to let memoized code to leak
1610 out. Thus, scm_copy_tree needs to copy vectors as well since
1611 quasiquote can introduce evaluated code also inside vector
1612 constants.
1613
240ed1e5
MD
16141998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1615
1616 * eval.c (scm_copy_tree): Removed ability to copy vectors.
1617
1618 * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect,
1619 gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and
1620 gh_doubles2dvect.)
1621
1622 * unif.c: Say that ivect and uvect are of type signed and unsigned
1623 long instead of int in commentary so that it correctly describes
1624 the implementation.
1625
5ef81022
MD
16261998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1627
1628 * stime.c: Removed declaration of strptime. (It should be
1629 declared by the system headers. If it turns out that some systems
1630 don't, we'll handle that then.) (Thanks to Greg Troxel.)
1631
1632 * stime.h: Renamed TIMEH --> STIMEH
1633
1634 * backtrace.c (scm_display_error, scm_display_backtrace): In order
1635 to increase portability, don't use structure assignment.
1636 (Thanks to Nicolas Neuss.)
1637
1638 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
1639 portability.
1640 (finalize_fd_sets): Added empty statement after last case label.
1641 (Thanks to Nicolas Neuss.)
1642
1643 * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to
1644 Nicolas Neuss.)
1645
212d45b8
MD
1646Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com>
1647
1648 * init.c, readline.c: OK, I won't have these readline.x bug
1649 reports anymore. We've had them since April. The current reason
1650 is a completely unintelligible failure of totoro.red-bean.com to
1651 do the test for rl_getc_function in libreadline correctly. This
1652 kludge overrides the test if we're on totoro so that the snapshot
1653 generation process can work.
1654
1655 * readline.c: Define a strdup replacement if not existent on system.
1656
43eeb5a6
MD
16571998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1658
1659 * vectors.c, vectors.h (scm_make_vector): Removed third argument.
1660 This change makes scm_make_vector R5RS compatible. We cannot keep
1661 the third argument since people want to be able to deduce the form
1662 of the C function call only by looking at R5RS. (At the same time
1663 we have removed some unnecessary complexity!)
1664
1665 * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
1666 net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
1667 stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
1668 argument in call to scm_make_vector.
1669
9d0b279f
MD
16701998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1671
1672 * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP.
1673 This macro is useful in applications.
1674
dbb25e7f
MD
16751998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1676
1677 * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
1678 (scm_parse_path, scm_search_path): New Scheme level procedures.
1679
1680 * load.h (scm_internal_parse_path, scm_parse_path,
1681 scm_search_path): Declared.
1682
74d6650d
MD
16831998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1684
1685 * filesys.c (dirname, basename): New procedures.
1686
1687 * init.c (scm_boot_guile_1): Removed condition around
1688 scm_init_options.
1689
1690 * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a
1691 new data type (guards) for representation of C level guards and
1692 data on the wind chain.
1693 (scm_internal_dynamic_wind): New function.
1694
1695 * dynwind.h: Declare scm_internal_dynamic_wind.
1696
1697 * root.h (scm_root_state): Added scm_cur_loadp.
1698
1699 * root.c (mark_root): Added comment about cur_loadp.
1700
1701 * load.c: #include "dynwind.h";
1702 (scm_primitive_load): Use scm_inner_dynamic_wind to update
1703 scm_cur_loadp.
1704
1705 * init.c (scm_init_standard_ports): Initialize scm_def_loadp.
1706
1707 * ports.c (current-load-port): New procedure.
1708
391aebfc
MD
17091998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1710
10ccfad7
MD
1711 * ioext.c (scm_isatty_p): Accept any kind of data as argument. If
1712 not a tty, return #f.
1713
391aebfc
MD
1714 * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
1715 to Julian Satchell and Roland Kaufmann.)
1716
1717 * gh.h (gh_memv, gh_member): Fixed typos in macro definitions.
1718 (gh_write): Added declaration. (Thanks to Eiichi Takamori.)
1719
6dabf6a9
MD
17201998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1721
1722 * debug.h, debug.c (scm_start_stack): New function. Implements
1723 the guts of old scm_m_start_stack.
1724
1725 * debug.c (scm_m_start_stack): Use scm_start_stack.
1726
1727 * init.c (scm_start_stack, scm_restart_stack): Renamed to
1728 start_stack and restart_stack. (These have static scope.)
1729
daca2816
MD
17301998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1731
1732 * readline.c (rl_cleanup_after_signals, rl_free_line_state): New
1733 readline functions to come in release 2.3. (Thanks to Chet
1734 Ramey.)
1735 (handle_errors): Use the above functions.
1736
be0ea988
MD
17371998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1738
1739 * readline.c: Improvements for readline support: Handle errors
1740 better; Implement before-read-hook.
1741
17421998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1743
1744 * init.c (scm_boot_guile_1), readline.c: Test for
1745 HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to
1746 assure that we have version >= 2.1.)
1747
e158e4f4
MD
17481998-05-11 Mikael Djurfeldt <mdj@kenneth>
1749
83d1c666
JB
1750 * readline.c (scm_readline): Defer interrupts while we're calling
1751 readline.
1752
e158e4f4
MD
1753 * readline.c (scm_add_history): Bugfix: Do strdup before giving
1754 away the string to add_history.
56600c45
MD
1755 (completion_function): Do completion for readline. (Thanks to
1756 Andrew Archibald.)
e158e4f4
MD
1757 (scm_filename_completion_function): New procedure: Filename
1758 completer.
1759 (current_input_getc): New function. Use this one instead of
1760 standard getc from readline.
1761
1762 * throw.c, throw.h (scm_handle_by_throw): New function: This
1763 handler throws errors to next handler on the dynwind chain.
1764
17651998-05-09 Mikael Djurfeldt <mdj@kenneth>
1766
1767 * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't
1768 used.
1769
8bb51def
MD
17701998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1771
1772 * procprop.c (scm_i_procedure_arity): New function. Returns arity
1773 of procedure.
1774 (scm_procedure_properties): Modified to return arity together with
1775 other properties.
1776 (scm_procedure_property): Added the read-only property `arity'.
1777 (scm_set_procedure_property_x): It is an error to set the `arity'
1778 property.
1779
1780 * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
1781 prefix SCM_; Made f_gsubr_apply global and added prefix scm_.
1782
1783 * procprop.h (scm_sym_arity): New symbol.
1784
1785 * objects.c (scm_set_object_procedure_x): New procedure: Use this
1786 to set the dispatch procedure of an operator or entity object.
1787
1788 * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
1789 Made procedure slots read-only.
1790
1791 * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
1792 scm_tcs_cons_gloc case in zero args switch; Fixed args
1793 construction for operators in scm_tcs_cons_gloc case in two args
1794 switch.
1795
680ed4a8
MD
17961998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1797
104d4533
MD
1798 * fluids.c: Removed use of assert.h (in order to avoid
1799 __eprintf).
1800
1801 * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
1802
1803 * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
1804
680ed4a8
MD
1805 * eval.c (SCM_CEVAL): Do more thorough argument checking. This
1806 change makes the evaluator safer at the cost of evaluation speed.
1807 It handles the case when the user has added a non-immediate
1808 improper end of the application form, e.g., `(+ 0 . x)'.
1809 (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
1810 minimize the extra cost as much as possible. The new code is
1811 enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
1812 problem with structs planted directly in the code (e.g. by a
1813 macro). This no longer causes segmentation fault. (Thanks to
1814 Eric Hanchrow.)
1815
1816 * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
1817 arg `proc' in order to be able to throw errors; New argument
1818 checking code.
1819
1820 * Removed extra #include "debug.h"
1821
0935d604
MD
18221998-04-25 Mikael Djurfeldt <mdj@kenneth>
1823
1824 * scmsigs.c: Declare usleep as returning void on some systems.
2c36126d
MD
1825 (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
1826 Satchell.)
0935d604
MD
1827
1828 * coop.c (usleep): Return void on some systems.
1829
f1a5fa3c
MD
18301998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1831
1832 * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
1833
1834 * coop.c: Changed return type of usleep to int.
1835
1836 * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
1837 isn't found in the OS.
1838
1839 * iselect.h: #define scm_internal_select select if GUILE_ISELECT
1840 isn't enabled. (Thought that I had made this change ages ago...)
1841
1842 * iselect.c: Declare bzero if not defined by OS.
1843
26c41b99
MD
18441998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1845
c3e09ef9
MD
1846 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
1847 condition. (Thanks to John Tobey.)
1848
1849 * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
1850 scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
1851 A section.
1852
1853 * __scm.h: Start the long-term project of moving to POSIX threads.
1854 Phase 1: Classification of all critical sections.
1855 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
1856 for A sections. (See comments in __scm.h for details.)
1857
26c41b99
MD
1858 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
1859 dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
1860
28795b1f
MD
18611998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1862
1863 * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
1864 cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
1865 (libpath.h, versiondat.h): Replaced dependency on Makefile with
1866 dependencies on $(srcdir)/Makefile.in
1867 $(top_builddir)/config.status in order to avoid circularity.
1868
1869 * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
1870 from argc if argc was 0 initially.
1871
1872 * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
1873 in generation of libpath.h.
1874
f2e5c92c
MD
18751998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
1876
1877 * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
1878 libguile from 2 to 3.
1879
a3365d47
MD
18801998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
1881
1882 * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
1883
fc1d67c4
MD
18841998-04-13 Mikael Djurfeldt <mdj@kenneth>
1885
1886 * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
1887 scm_set_port_column_x, scm_port_filename,
1888 scm_set_port_filename_x): Removed optional arguments. Added
1889 proper argument checking.
1890
1891 * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
1892 stack size in machine words.
1893
1894 * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
1895 rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
1896