a few fixups to primitive functions
[bpt/guile.git] / libguile / ChangeLog
1 Sat Aug 3 01:27:14 1996 Gary Houston <ghouston@actrix.gen.nz>
2
3 * ioext.c (scm_sys_fdopen): fix the port-table assignment.
4
5 * fports.c (scm_open_file): don't return #f, throw error.
6
7 * ioext.c (fileno): renamed from %fileno.
8 (soft-fileno): deleted.
9
10 * ports.c (scm_port_revealed): don't need to check for -1 from
11 scm_revealed_count.
12 (scm_set_port_revealed_x): return unspecified, not #f.
13
14 * ioext.c (primitive-move->fdes): return #t or #f, not 1 or 0.
15
16 * fdsocket.c: getsockopt, setsockopt: use HAVE_STRUCT_LINGER.
17
18 * scmconfig.h.in: add HAVE_STRUCT_LINGER.
19
20 * configure.in: check for struct linger, set HAVE_STRUCT_LINGER.
21
22 Thu Aug 1 02:58:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
23
24 * filesys.c, posix.c: #include <sys/types.h> before <sys/stat.h>.
25 This is necessary on Ultrix, and doesn't hurt portability.
26
27 * Makefile.in (dist-dir): New target, implementing a new dist system.
28 (installed_h_files): Put in alphabetical order.
29 Remove duplicate entries for markers.h and unif.h.
30 (c_files): Remove duplicate entries for markers.c.
31 (ancillary): Renamed from anillery; all uses changed. Remove
32 PLUGIN; it's a directory, and needs special treatment in dist-dir.
33 Remove all the ../doc/* files; doc/Makefile.in handles that.
34
35 * Makefile.in (libobjs): Remove duplicate entry for markers.o.
36
37 * Makefile.in (.c.x): Compensate for Ultrix's broken Bourne shell:
38 every if must have an else, or else the whole command has a
39 non-zero exit code whenever the if's condition is false.
40
41 Thu Aug 1 08:22:24 1996 Gary Houston <ghouston@actrix.gen.nz>
42
43 * posix.c: include string.h.
44
45 Wed Jul 31 23:43:05 1996 Gary Houston <ghouston@actrix.gen.nz>
46
47 * numbers.c: rename %expt -> $expt, %atan2 -> $atan2, as it must
48 have been once.
49
50 * posix.c, ioext.c, socket.c, fdsocket.c, files.c, filesys.c, simpos.c:
51 Remove leading % from scheme names.
52 Do not return error values, call SCM_SYSERROR or similar.
53
54 * __scm.h (SCM_SYSERROR, SCM_SYSMISSING): new macros.
55
56 Wed Jun 12 00:28:31 1996 Tom Lord <lord@beehive>
57
58 * struct.c (scm_init_struct): new file.
59
60 Fri Jun 7 14:02:00 1996 Tom Lord <lord@beehive>
61
62 * list.c (scm_list_tail): list-cdr-ref is the same as list-tail.
63 (scm_list_head): added list-head for rapidly chopping argument
64 lists off of longer lists (and similar).
65
66 Tue Jun 4 09:40:33 1996 Tom Lord <lord@beehive>
67
68 * objprop.c (scm_object_property): assq the cdr of the whash
69 handle for obj, not the handle itself.
70
71 Mon Jun 3 17:19:30 1996 Tom Lord <lord@beehive>
72
73 * gc.c (scm_mark_weak_vector_spines): Mark the spines (alists) of
74 weak hash tables last of all marking to avoid an obscure gc bug.
75 WARNING: circular lists stored in a weak hash table will hose us.
76
77 Fri May 24 09:53:39 1996 Tom Lord <lord@beehive>
78
79 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
80 new functions similar to scm_substring_move_left_x and
81 scm_substring_move_right_x.
82
83 Wed May 22 20:07:01 1996 Tom Lord <lord@beehive>
84
85 * init.c (scm_boot_guile): prevent gc with scm_block_gc not
86 scm_gc_heap_lock!
87
88 Wed May 15 16:13:29 1996 Tom Lord <lord@beehive>
89
90 * ports.c (scm_unread_char): scm_gen_ungetc as a scheme procedure.
91
92 Thu May 9 09:33:17 1996 Tom Lord <lord@beehive>
93
94 * strports.c (scm_strprint_obj): convenience function. C for
95 (lambda (obj) (call-with-output-string (lambda (p) (write obj p))))
96
97 * guile-{tcl,tk}.[ch], events.[ch], keysyms.[ch], tcl-channels.[ch]
98 removed to a separate library
99
100 * init.c (scm_boot_guile): copied from guile-tcl.c.
101 Initialization specific to tcl interpreters removed.
102
103 Wed May 8 15:07:37 1996 Tom Lord <lord@beehive>
104
105 * ports.c (scm_ports_prehistory): size malloced here doesn't
106 matter so long as it is non-0 (got rid of "* 4").
107
108 Tue May 7 11:43:37 1996 Tom Lord <lord@beehive>
109
110 * gscm.h: gscm_mkarray eliminated (presumably was not being used
111 since its definition was bogus).
112
113 Mon May 6 13:02:56 1996 Tom Lord <lord@beehive>
114
115 * mallocs.[ch]: back again (for rx at least).
116
117 Wed Apr 17 08:54:20 1996 Tom Lord <lord@beehive>
118
119 * ports.c: removed functions relating to the mapping between ports
120 and descriptors. (That stuff is unix-specific and should be collected
121 in a separate library).
122
123 * ramap.c (scm_array_copy): return #<unspecified> not #<undefined>.
124 (Tom Mckay@avanticorp.com)
125
126 Mon Apr 15 14:16:55 1996 Tom Lord <lord@beehive>
127
128 * gc.c (scm_gc_sweep): Immediates in weak vectors were not
129 handled correctly (SCM_FREEP was applied to them) -- test for
130 NIMP. Keys in weak hash tables were spuriously (though harmlessly)
131 being overwritten with #f. (brown@grettir.bibliotech.com)
132
133 Tue Apr 2 22:25:00 1996 Tom Lord <lord@beehive>
134
135 * gc.c (scm_unhash_name): new procedure, unhash-name, flushes glocs
136 for a specific symbol or for all symbols.
137
138 Mon Apr 1 10:34:55 1996 Tom Lord <lord@beehive>
139
140 * gc.c (scm_gc_mark): mark weak hash tables correctly (was getting weak
141 keys and weak values confused).
142
143 Thu Mar 14 22:20:20 1996 Tom Lord <lord@beehive>
144
145 * list.c (scm_last_pair): map '()=>'()
146
147 Wed Mar 13 16:43:34 1996 Tom Lord <lord@beehive>
148
149 * pairs.c, hashtab.c, list.c, alist.c append.c, sequences.c:
150 Generalized assoc and hash-table functions.
151 Factored pairs.c into multiple files.
152
153 Fri Mar 8 14:44:39 1996 Tom Lord <lord@beehive>
154
155 * gscm.c (gscm_run_scm): got rid of objprop.
156
157 Fri Mar 1 10:39:52 1996 Tom Lord <lord@beehive>
158
159 * genio.c (scm_getc):
160 NOTE: fgetc may not be interruptable.
161
162 * procprop.c (scm_stand_in_scm_proc):
163 NOTE: don't use a alist here.
164 (scm_set_procedure_properties_x): fix type checking throughout this file.
165
166 * gc.c (scm_gc_sweep): free heap segments with free, not must_free.
167
168 * ports.c (scm_remove_from_port_table): adjust scm_mallocated
169 after freeing part of the port table.
170
171 Thu Feb 29 16:21:17 1996 Tom Lord <lord@beehive>
172
173 * strports.c (scm_mkstrport):
174 * vports.c (scm_make_soft_port): allocate a port table entry
175 (possibly triggering gc) before setting the tag of the corresponding
176 ports handle.
177
178 * pairs.c (scm_delq_x): never throw an error.
179
180 * vectors.c (scm_make_vector): made the default vector fill argument
181 into '() (much more useful than the previous value, "#unspecified")
182
183 Mon Feb 26 17:19:09 1996 Tom Lord <lord@beehive>
184
185 * ports.c (scm_add_to_port_table): Added fields
186 to port table entries: file_name, line_num, col.
187 Update these in open_file, gen_getc and gen_ungetc.
188 Added procedures to access those fields.
189
190 Sun Feb 25 00:10:36 1996 Tom Lord <lord@beehive>
191
192 * procs.c (scm_make_subr_opt): new entry point for making
193 anonymous subrs.
194
195 Sat Feb 24 17:11:31 1996 Tom Lord <lord@beehive>
196
197 * gc.h: SCM_STACK_GROWS_UP is now set by autoconf.
198
199 Fri Feb 23 10:26:29 1996 Tom Lord <lord@beehive>
200
201 * numbers.c (scm_exact_p): This function no longer
202 implements "integer?".
203
204 Thu Feb 22 20:56:16 1996 Tom Lord <lord@beehive>
205
206 * gc.c (scm_gc_end): simulate a signal at the end of each GC.
207 (scm_gc_stats): return an assoc of useful data. Replaces "room"
208 and the stats reporting formerlly built into repl.
209
210 * repl.[ch]: removed.
211 GC statistics keeping moved to gc.c.
212 Other statistics keeping can be done from Scheme.
213 REPLS are now written in Scheme.
214
215 Wed Feb 21 10:28:53 1996 Tom Lord <lord@beehive>
216
217 * cnsvobj.c (gscm_is_gscm_obj): new file for old functions (icky
218 conservatively marked objects).
219
220 * throw.c (scm_ithrow): Unwind up to the right catch during a throw!
221
222 * error.c (scm_init_error): init system_error_sym here, not in repl.c.
223
224 * feature.c (scm_compiled_library_path): moved here from repl.c.
225 This file is for stuff relating specifically to Scheme libraries
226 like slib.
227
228 * eval.c (scm_m_define): don't give warning about redefinition, don't
229 check verbosity.
230
231 NOTE: this should throw a resumable exception with parameters --
232 the name, the top-level env, the variable, the definition, #t/#f: redefining builtin?
233
234 * repl.c (scm_gc_begin/end): don't print a message, don't check verbosity.
235
236 * error.c: scm_warn eliminated.
237
238 * read.c (scm_lreadr): extra right paren gets an error, not a warning.
239
240 * repl.c, marksweep.c, gc.c (various):
241 lose exit_report, growth_mon.
242
243 * gscm.c: got rid of verbosity functions.
244
245 Tue Feb 20 00:19:10 1996 Tom Lord <lord@beehive>
246
247 * throw.c (scm_ithrow): guard against the bad-throw hook changing
248 between the call to procedurep and use.
249
250 * error.c (scm_everr):
251 * gc.c (fixconfig):
252 * gsubr.c (scm_make_gsubr): use exit, not scm_quit. still wrong,
253 but less so.
254
255 * strports.c: don't reveal the port's string to the caller
256 because it changes size.
257
258 (stputc stwrite): check/change the strings length with interrupts
259 blocked.
260
261 * objprop.c (scm_set_object_property_x &c): use the generic
262 hashing functions and be threadsafe.
263
264 * eval.c (scm_unmemocar): do this operation in a thread-safe way.
265 (per suggestion jaffer@gnu.ai.mit.edu).
266
267 * mbstrings.c (scm_multi_byte_string): guard against argument list
268 changing length.
269
270 * strings.c (scm_make_string): loop cleanup
271
272 * unif.c (scm_vector_set_length_x): scm_vector_set_length_x no longer
273 a scheme function.
274
275 * weaks.c (scm_weak_vector): guard against argument list
276 changing length.
277
278 * variable.c (scm_builtin_variable): check for/make a built-in
279 variable automicly.
280
281 * vectors.c (scm_vector): while filling the new array,
282 guard against a list of fill elements that grows after
283 the vector is allocated.
284
285 * hashtab.c -- new file: general hash table
286 functions. hash, hashq, hashv, hashx.
287
288 * tags.h: made wvect an option bit of vector.
289
290 Mon Feb 19 09:38:05 1996 Tom Lord <lord@beehive>
291
292 * symbols.c: made the basic symbol table operations atomic.
293
294 * root.c &c.: collected stack-specific global state.
295 linum/colnum etc *should* be port-specific state.
296
297 * struct.c (scm_init_struct): init the first struct type during
298 initialization to fix a race condition.
299
300 * continuations.c (scm_dynthrow): pass throwval in the 'regs'
301 object, not in a global.
302 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
303
304 * throw.c (_scm_throw): Pass throwval on the stack, not in a global
305 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
306
307 * *.[ch]: namespace cleanup. Changed all (nearly) exported CPP
308 and C symbols to begin with SCM_ or scm_.
309
310 Sun Feb 18 15:55:38 1996 Tom Lord <lord@beehive>
311
312 * gsubr.c (scm_gsubr_apply): statically allocate the
313 array of arguments (bothner@cygnus.com).
314
315 Sat Feb 17 20:20:40 1996 Tom Lord <lord@beehive>
316
317 * scmsigs.c: Simplified to use async rountines.
318
319 * async.c: New support for interrupt handlers.
320
321 Thu Feb 15 11:39:09 1996 Tom Lord <lord@beehive>
322
323 * symbols.c (scm_string_to_symbol et al.): number of tweaky changes to
324 set the multi_byte flag correctly in symbols. This is wrong.
325 intern_obbary_soft and msymbolize should take an extra parameter.
326 Also, weird multibyte symbols don't print correctly.
327 The weird symbol syntax is also a bit bogus (emacs doesn't quite
328 cope).
329
330 Tue Feb 13 11:39:37 1996 Tom Lord <lord@beehive>
331
332 * symbols.c (scm_string_to_obarray_symbol): obarray == #f means
333 use the system symhash. == #t means create an uninterned symbol.
334
335 Wed Feb 7 09:28:02 1996 Tom Lord <lord@beehive>
336
337 * strings.c (scm_make_shared_substring): build'em.
338 It might better to keep a table of these and use one
339 less cons-pair per shared-substring.
340
341 Tue Feb 6 17:45:21 1996 Tom Lord <lord@beehive>
342
343 * strings.c (scm_string_shared_substring): create shared
344 substrings. (Doesn't handle mb strings yet).
345
346 * mbstrings.c (scm_print_mb_string): handle RO strings.
347
348 * print.c (scm_iprin1): print substrings as their non-substring
349 counterparts (dubious).
350
351 * marksweep.c (scm_gc_mark scm_gc_sweep): handle RO and MB
352 strings.
353
354 * hash.c (scm_hasher): hash RO and MB strings as bytestrings.
355
356 * eval.c (SCM_CEVAL): self-evaluate RO and MB strings.
357
358 * eq.c (scm_equal_p): handle RO and MB strings.
359
360 * symbols.c (scm_string_to_symbol):
361 (scm_string_to_obarray_symbol):
362 * strop.c (scm_i_index):
363 (scm_i_rindex):
364 (scm_string_null_p):
365 (scm_string_to_list):
366 * strings.c (scm_string_length):
367 (scm_string_ref):
368 (scm_substring):
369 (scm_string_append):
370 * simpos.c (scm_system):
371 (scm_getenv):
372 * fports.c (scm_open_file):
373 * strorder.c (scm_string_equal_p):
374 (scm_string_ci_equal_p):
375 (scm_string_less_p):
376 (scm_string_ci_less_p):
377 * pairs.c (scm_obj_length):
378 * mbstrings.c (scm_multi_byte_string_length):
379
380 Use RO string macros for RO strings.
381
382 Tue Jan 30 09:19:08 1996 Tom Lord <lord@beehive>
383
384 * Makefile.in (CFLAGS ALL_CFLAGS): be more standard.
385
386 * strop.c (scm_i_rindex, scm_i_index): Don't use the BSD functions
387 index/rindex. Do handle embedded \000 characters.
388
389 Sun Jan 28 13:16:18 1996 Tom Lord <lord@beehive>
390
391 * error.c (def_err_response): (int)scm_err_pos => (long)scm_err_pos
392 Eliminate a (presumed) warning on some systems.
393
394 * gscm.c (gscm_run_scm): SCM_INIT_PATH => GUILE_INIT_PATH
395 (Mikael Djurfeldt <mdj@nada.kth.se>)
396
397 Sat Jan 27 12:36:55 1996 Tom Lord <lord@beehive>
398
399 * eval.c (scm_map): added argument type checking.
400 (kawai@sail.t.u-tokyo.ac.jp)
401
402 * gscm.c (gscm_set_procedure_properties_x): parameter "new" => "new_val"
403 for C++. (Seth Alves <alves@gryphon.com>)
404
405 (gscm_cstr): uses an uninitialized local variable causing
406 segv. (kawai@sail.t.u-tokyo.ac.jp)
407
408
409 * lvectors.c (scm_get_lvector_hook):
410 In guile-ii, the lvector code was broken. It was fixed in guile-iii.
411 It seems to me like if it is broken again in guile-iv...Here is a patch.
412 "! || (LENGTH (keyvec) == 0))"
413 (From: Mikael Djurfeldt <mdj@nada.kth.se>)
414
415
416 * gscm.c (gscm_sys_default_verbosity):
417 incorrectly declared for non-__STDC__
418 (Tom_Mckay@avanticorp.com)
419
420 * ports.c (scm_setfileno): Tweak the macro a bit
421 to make it easier to port to systems that use
422 more than a single structure field to hold a descriptor.
423
424 * debug.c (change_mode): Avoid GNUCism "int foo[n];"
425 Give a warning, not an error, for unrecognized modes.
426
427 * eval.c (SCM_CEVAL):
428 static char scm_s_for_each[];
429 static char scm_s_map[];
430 not needed.
431
432 * strings.c (scm_string_p):
433 static char s_string[];
434 (see next entry)
435
436 * struct.c (scm_sys_struct_set_x):
437 static char s_sys_make_struct[];
438 static char s_sys_struct_ref[];
439 static char s_sys_struct_set_x[];
440 Rearrange code to eliminate those forward decls for the sake of
441 broken compilers.
442
443 * variable.c (make_vcell_variable): static char s_make_variable[];
444 isn't needed.
445
446 * fports.c (scm_port_mode):
447 chars modes[3] = "";
448 to
449 chars modes[3];
450 modes[0] = '\0';
451 (Tom_Mckay@avanticorp.com)
452
453
454 * pairs.c (scm_set_cdr_x): non-__STDC__ declaration of
455 scm_cons2(), scm_acons(), and scm_set_cdr_x() missing semicolon
456 (Tom_Mckay@avanticorp.com)
457
458 * numbers.c (scm_num_eq_p): Non-__STDC__ declaration of
459 scm_num_eq_p() was scm_equal_p().
460 (Tom_Mckay@avanticorp.com)
461
462 * symbols.c (msymbolize): "CHARS(X) = " => "SETCHARS..."
463 (Tom_Mckay@avanticorp.com)
464
465 Fri Jan 26 14:03:01 1996 Tom Lord <lord@beehive>
466
467 * weaks.c (scm_make_weak_vector): "VELTS(X) =" => "SETVELTS..."
468 (Tom_Mckay@avanticorp.com)
469
470 * strop.c (scm_substring_fill_x):
471 Non-__STDC__ declaration of scm_substring_fill_x() missing semicolon
472 (Tom_Mckay@avanticorp.com)
473
474 * eval.c (SCM_APPLY): variables "debug_info" -> dbg_info.
475 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
476
477 * _scm.h (CxR functions): #define CxR SCM_CxR => #define CxR(X) SCM_CxR(X)
478 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
479
480 * lvectors.c (scm_lvector_set_x): avoid VELTS (VELTS (...)[..]) which
481 can turn into an obscure gc bug.
482
483 * chars.c (scm_char_p): fixed PROC call.
484
485 * gscm.h (gscm_vset): use scm_vector_set_x not (the missing)
486 scm_vector_set.
487
488 Tue Jan 23 13:29:40 1996 Tom Lord <lord@beehive>
489
490 * elisp.c (new file): dynamic scoping and other bits for
491 elisp. Don't use this yet unless you specificly want to
492 hack on elisp emulation.
493
494 * dynwind.c (scm_dowinds): When entering or leaving a dynamic
495 scope created by scm_with_dynamic_bindings_operation_x, swap
496 the bindings of that scope with the corresponding globals.
497
498 * continuations.c (scm_make_cont): when a continuation is captured,
499 relocate the continuation stack chunks registered on the wind chain
500 to the heap.
501
502 Sun Jan 21 19:31:17 1996 Tom Lord <lord@beehive>
503
504 * eval.c (SCM_CEVAL): if the function position evaluates
505 to a macro, process it accordingly. (Previously, macros were
506 handled only if the function position was a symbol naming a
507 variable bound to a macro).
508
509 Sat Jan 20 23:21:37 1996 Tom Lord <lord@beehive>
510
511 * eval.c (scm_m_set): allow multi-variable set! like
512 (set! x 1 y 2 z 3).
513
514 Wed Dec 6 02:40:49 1995 Tom Lord <lord@beehive>
515
516 * ports.h fports.c vports.c marksweep.c gc.c strports.c: moved the STREAM
517 of ports into the port table and replaced it with a port-table
518 index.
519
520 * repl.c (iprin1): added tc7_mb_string -- same as tc7_string.
521
522 * marksweep.c (scm_gc_mark): added tc7_mb_string -- same as tc7_string.
523
524 * mbstrings.c (new file): functions on multi-byte strings.
525
526 * tags.h (scm_typ7_string, scm_typ7_mb_string): added a tag
527 for multi-byte strings. Moved the string tag.
528
529 * chars.h chars.c repl.c (many functions): made scm_upcase and scm_downcase
530 functions that are safe for extended character sets.
531
532 Changed the range of integer->char.
533
534 Changed the tyep of SCM_ICHR.
535
536
537
538 Tue May 16 17:49:58 1995 Mikael Djurfeldt <mdj@sanscalc.nada.kth.se>
539
540 * guile.c: Changed init file name from "SCM_INIT_PATH" to
541 "GUILE_INIT_PATH"
542
543 Sun Aug 6 15:14:46 1995 Andrew McCallum <mccallum@vein.cs.rochester.edu>
544
545 * guile.c (gscm_is_gscm_type): New function. (Without this how will we
546 know that it's safe to pass an object to gscm_get_type?)
547 (gscm_get_type): Fix tyop in error message.
548
549 * variable.c (scm_variable_ref): fixed assertion test.
550 (Robert STRANDH <strandh@labri.u-bordeaux.fr>)
551
552 * gscm.h: fixed several prototypes, notably gscm_vref.
553 Add gscm_is_eq and temporarily commented out gscm_eq (see
554 the note in gscm.h near gscm_eq if this change effects your
555 code).
556 (Reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
557
558 * pairs.c (scm_obj_length): see next entry.
559
560 * gscm.h (gscm_obj_length): A way to get an integer
561 length for lists, strings, symbols (treated as strings),
562 and vectors. Returns -1 on error.
563
564 * eq.c (scm_equal_p): fixed smob case.
565 (William Gribble <grib@arlut.utexas.edu>)
566
567 * Makefile.in (X_CFLAGS): defined.
568 (William Gribble <grib@arlut.utexas.edu>)
569
570 * gscm.h (gscm_2_double): provided now
571 (reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
572
573 Tue Jun 13 01:04:09 1995 gnu
574 * Vrooom!
575
576