* print.c (scm_iprin1): Rather than having one i, and using it in
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
52591c80
JB
11998-09-06 Jim Blandy <jimb@zwingli.cygnus.com>
2
3 * objects.h (scm_set_object_procedure_x, scm_make_class_object,
4 scm_make_subclass_object): Add external prototypes.
5
6 * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned
7 comparison is okay here.
8
9 * numbers.c (scm_istr2int): Add cast; len is known to be positive.
10
11 * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the
12 (true, but confusing) fact that -1 == ((unsigned) 0 - 1).
13
14 * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing
15 signed/unsigned.
16
17 * load.c (swap_port): Make this function static.
18
19 * load.c (scm_search_path): Make max_path_len and max_ext_len
20 unsigned, since they're compared against string sizes.
21
22 * load.c (init_build_info): Make i unsigned.
23
24 * ioext.h (scm_read_line): Add prototype.
25
26 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
27 scm_hash_fn_remove_x): Make hash bucket index local variable k
28 unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as
29 accurately as possible.
30
31 * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned
32 comparisons, and range checking to make sure those casts are
33 harmless.
2d2c87e1
JB
34
35 * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid
36 signed/unsigned comparisons.
37
38 * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to
39 avoid signed/unsigned comparisons.
40 * smob.h (scm_numsmob): Change extern declaration to match.
41
42 * ports.c (scm_numptob): Make this an int, not an scm_sizet, to
43 avoid signed/unsigned comparisons.
44 * ports.h (scm_numptob): Change extern declaration to match.
45 (scm_current_load_port, scm_set_port_line_x,
46 scm_set_port_column_x): New prototypes.
47
48 * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the
49 test code, and it causes warnings.
50
51 * gh.h (gh_int2scmb, gh_uniform_vector_length,
52 gh_uniform_vector_ref): Added prototypes.
53
54 * Makefile.am (libguile_la_SOURCES): Include Scheme-level
55 debugging support unconditionally. That's backtrace.c, stack.c,
56 debug.c, and srcprop.c.
57 (EXTRA_libguile_la_SOURCES): Omit those from here.
58 * Makefile.in: Regenerated.
59
a9b70caf
MD
601998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
61
62 * options.c (scm_options): Bugfix: Allow empty list of options!
63
64 * debug.c, debug.h (scm_single_step): Removed.
65 (scm_with_traps): New procedure. This procedure could easily be
66 written in Scheme but needs to be highly optimized.
67
68 * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P.
69
70 * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags.
71 Check SCM_TRAPS_P before trapping.
72
6dd78771
JB
731998-07-30 Jim Blandy <jimb@zwingli.cygnus.com>
74
75 Changes to avoid signed/unsigned comparison warnings.
76 * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs.
77 (scm_gc_sweep): Make n and j local to the blocks they're used in,
78 so they can have appropriate types for each application. Make i
79 signed. Use initializers in some spots. I'll probably pay for
80 all this tweaking.
81 (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args.
82 (scm_must_realloc): Make nm unsigned.
83 (init_heap_seg): Make new_seg_index and n_new_objects signed.
84 (scm_init_storage): Use prototype-style definition, and make the
85 argument unsigned.
86 * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc,
87 scm_must_realloc, scm_init_storage): Adjust prototype accordingly.
88
89 * filesys.c (scm_readlink): Make local vars rv and size ints, to
90 avoid signed/unsigned comparison warnings, and because the return
91 value of readlink may be -1. Don't bother casting the third
92 argument to readlink.
93
94 * filesys.c (scm_dirname, scm_basename): Move these to their own
95 page, at the end of the file.
96 * filesys.h (scm_dirname, scm_basename): Add prototypes for these.
97
98 * eval.h (scm_eval_options_interface): Add external prototype for this.
99 * eval.c (scm_eval_options_interface): Use prototype-style def'n.
100
101 * eval.c (scm_lookupcar1): Make this static.
102
103 * dynl.h (scm_registered_modules, scm_clear_registered_modules):
104 Make these prototype declarations, not K&R-style.
105
106 * chars.c (scm_tables_prehistory): Add cast, to remove signed/
107 unsigned comparison warning.
108
109 * appinit.c: File removed. It had a single function in it, empty,
110 whose reason for existence is explained in no documentation or
111 comment. I think it's there as a default for some Tcl-style
112 initialization, but Tcl abandoned that approach a while ago.
113 * Makefile.am (libguile_la_SOURCES): Remove appinit.c.
114 (BUILT_SOURCES): Remove appinit.x.
115 * Makefile.in: Regenerated.
116
0dcbc17a
JB
1171998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
118
119 * Makefile.in: Regenerated using the last public version of
120 automake, not the hacked Cygnus version.
121
1f5ae2fd
JB
1221998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
123
124 Remove Totoro kludge.
125 * Makefile.in, scmconfig.h.in: Regenerated.
126 * init.c, readline.c: Don't check if TOTORO is #defined.
127
e99cbcd6
JB
1281998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
129
130 * Makefile.am: Adjust for new thread configuration system.
131 (INCLUDES): Include the value of THREAD_CPPFLAGS.
132 (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from
133 THREAD_LIBS.
134 (THREAD_LIBS): Definition deleted; automake will generate such
135 things automatically.
136 * Makefile.in: Regenerated.
137
87148d9e
JB
1381998-07-23 Jim Blandy <jimb@zwingli.cygnus.com>
139
140 Simplify smob and port marking; set the mark bit in the generic
141 marking code, and make marker routines only responsible for
142 turning up outgoing pointers.
143 * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
144 before calling the marking function. Don't call the marking
145 function if it's zero.
146 * markers.c (scm_mark0): Just return #f. This function isn't
147 necessary at all now, but it's harmless to call it. We'll leave
148 it in so other folks' code doesn't croak at link time.
149 (scm_markcdr): Don't call SCM_SETGC8MARK.
150 * async.c (mark_async): Don't call SCM_SETGC8MARK.
151 * dynl.c (mark_dynl_obj): Same.
152 * root.c (mark_root): Same.
153 * srcprop.c (marksrcprops): Same.
154 * unif.c (markra): Same.
155 * variable.c (scm_markvar): Same.
156 * ports.c (scm_markstream): Same.
157 (void_port_ptob): Specify zero for our marking function.
158 * debug.c (debugobjsmob): Same.
159 * dynwind.c (guardsmob): Same.
160 * filesys.c (dir_smob): Same.
161 * fluids.c (fluid_smob): Same.
162 * fports.c (scm_fptob, scm_pipob): Same.
163 * mallocs.c (mallocsmob): Same.
164 * regex-posix.c (regex_t_smob): Same.
165 * smob.c (freecell, flob, bigob): Same.
166 * threads.c (thread_smob, mutex_smob, condvar_smob): Same.
167 * throw.c (jbsmob, lazy_catch_funs): Same.
168
3910272e
MD
1691998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
170
171 * eval.c (scm_copy_tree): Reverted last change: `eval' uses
172 scm_copy_tree on code in order not to let memoized code to leak
173 out. Thus, scm_copy_tree needs to copy vectors as well since
174 quasiquote can introduce evaluated code also inside vector
175 constants.
176
240ed1e5
MD
1771998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
178
179 * eval.c (scm_copy_tree): Removed ability to copy vectors.
180
181 * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect,
182 gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and
183 gh_doubles2dvect.)
184
185 * unif.c: Say that ivect and uvect are of type signed and unsigned
186 long instead of int in commentary so that it correctly describes
187 the implementation.
188
5ef81022
MD
1891998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
190
191 * stime.c: Removed declaration of strptime. (It should be
192 declared by the system headers. If it turns out that some systems
193 don't, we'll handle that then.) (Thanks to Greg Troxel.)
194
195 * stime.h: Renamed TIMEH --> STIMEH
196
197 * backtrace.c (scm_display_error, scm_display_backtrace): In order
198 to increase portability, don't use structure assignment.
199 (Thanks to Nicolas Neuss.)
200
201 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
202 portability.
203 (finalize_fd_sets): Added empty statement after last case label.
204 (Thanks to Nicolas Neuss.)
205
206 * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to
207 Nicolas Neuss.)
208
212d45b8
MD
209Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com>
210
211 * init.c, readline.c: OK, I won't have these readline.x bug
212 reports anymore. We've had them since April. The current reason
213 is a completely unintelligible failure of totoro.red-bean.com to
214 do the test for rl_getc_function in libreadline correctly. This
215 kludge overrides the test if we're on totoro so that the snapshot
216 generation process can work.
217
218 * readline.c: Define a strdup replacement if not existent on system.
219
43eeb5a6
MD
2201998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
221
222 * vectors.c, vectors.h (scm_make_vector): Removed third argument.
223 This change makes scm_make_vector R5RS compatible. We cannot keep
224 the third argument since people want to be able to deduce the form
225 of the C function call only by looking at R5RS. (At the same time
226 we have removed some unnecessary complexity!)
227
228 * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
229 net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
230 stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
231 argument in call to scm_make_vector.
232
9d0b279f
MD
2331998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
234
235 * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP.
236 This macro is useful in applications.
237
dbb25e7f
MD
2381998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
239
240 * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
241 (scm_parse_path, scm_search_path): New Scheme level procedures.
242
243 * load.h (scm_internal_parse_path, scm_parse_path,
244 scm_search_path): Declared.
245
74d6650d
MD
2461998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
247
248 * filesys.c (dirname, basename): New procedures.
249
250 * init.c (scm_boot_guile_1): Removed condition around
251 scm_init_options.
252
253 * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a
254 new data type (guards) for representation of C level guards and
255 data on the wind chain.
256 (scm_internal_dynamic_wind): New function.
257
258 * dynwind.h: Declare scm_internal_dynamic_wind.
259
260 * root.h (scm_root_state): Added scm_cur_loadp.
261
262 * root.c (mark_root): Added comment about cur_loadp.
263
264 * load.c: #include "dynwind.h";
265 (scm_primitive_load): Use scm_inner_dynamic_wind to update
266 scm_cur_loadp.
267
268 * init.c (scm_init_standard_ports): Initialize scm_def_loadp.
269
270 * ports.c (current-load-port): New procedure.
271
391aebfc
MD
2721998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
273
10ccfad7
MD
274 * ioext.c (scm_isatty_p): Accept any kind of data as argument. If
275 not a tty, return #f.
276
391aebfc
MD
277 * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
278 to Julian Satchell and Roland Kaufmann.)
279
280 * gh.h (gh_memv, gh_member): Fixed typos in macro definitions.
281 (gh_write): Added declaration. (Thanks to Eiichi Takamori.)
282
6dabf6a9
MD
2831998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
284
285 * debug.h, debug.c (scm_start_stack): New function. Implements
286 the guts of old scm_m_start_stack.
287
288 * debug.c (scm_m_start_stack): Use scm_start_stack.
289
290 * init.c (scm_start_stack, scm_restart_stack): Renamed to
291 start_stack and restart_stack. (These have static scope.)
292
daca2816
MD
2931998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
294
295 * readline.c (rl_cleanup_after_signals, rl_free_line_state): New
296 readline functions to come in release 2.3. (Thanks to Chet
297 Ramey.)
298 (handle_errors): Use the above functions.
299
be0ea988
MD
3001998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
301
302 * readline.c: Improvements for readline support: Handle errors
303 better; Implement before-read-hook.
304
3051998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
306
307 * init.c (scm_boot_guile_1), readline.c: Test for
308 HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to
309 assure that we have version >= 2.1.)
310
e158e4f4
MD
3111998-05-11 Mikael Djurfeldt <mdj@kenneth>
312
313 * readline.c (scm_add_history): Bugfix: Do strdup before giving
314 away the string to add_history.
56600c45
MD
315 (completion_function): Do completion for readline. (Thanks to
316 Andrew Archibald.)
e158e4f4
MD
317 (scm_filename_completion_function): New procedure: Filename
318 completer.
319 (current_input_getc): New function. Use this one instead of
320 standard getc from readline.
321
322 * throw.c, throw.h (scm_handle_by_throw): New function: This
323 handler throws errors to next handler on the dynwind chain.
324
3251998-05-09 Mikael Djurfeldt <mdj@kenneth>
326
327 * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't
328 used.
329
8bb51def
MD
3301998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
331
332 * procprop.c (scm_i_procedure_arity): New function. Returns arity
333 of procedure.
334 (scm_procedure_properties): Modified to return arity together with
335 other properties.
336 (scm_procedure_property): Added the read-only property `arity'.
337 (scm_set_procedure_property_x): It is an error to set the `arity'
338 property.
339
340 * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
341 prefix SCM_; Made f_gsubr_apply global and added prefix scm_.
342
343 * procprop.h (scm_sym_arity): New symbol.
344
345 * objects.c (scm_set_object_procedure_x): New procedure: Use this
346 to set the dispatch procedure of an operator or entity object.
347
348 * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
349 Made procedure slots read-only.
350
351 * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
352 scm_tcs_cons_gloc case in zero args switch; Fixed args
353 construction for operators in scm_tcs_cons_gloc case in two args
354 switch.
355
680ed4a8
MD
3561998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
357
104d4533
MD
358 * fluids.c: Removed use of assert.h (in order to avoid
359 __eprintf).
360
361 * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
362
363 * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
364
680ed4a8
MD
365 * eval.c (SCM_CEVAL): Do more thorough argument checking. This
366 change makes the evaluator safer at the cost of evaluation speed.
367 It handles the case when the user has added a non-immediate
368 improper end of the application form, e.g., `(+ 0 . x)'.
369 (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
370 minimize the extra cost as much as possible. The new code is
371 enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
372 problem with structs planted directly in the code (e.g. by a
373 macro). This no longer causes segmentation fault. (Thanks to
374 Eric Hanchrow.)
375
376 * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
377 arg `proc' in order to be able to throw errors; New argument
378 checking code.
379
380 * Removed extra #include "debug.h"
381
0935d604
MD
3821998-04-25 Mikael Djurfeldt <mdj@kenneth>
383
384 * scmsigs.c: Declare usleep as returning void on some systems.
2c36126d
MD
385 (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
386 Satchell.)
0935d604
MD
387
388 * coop.c (usleep): Return void on some systems.
389
f1a5fa3c
MD
3901998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
391
392 * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
393
394 * coop.c: Changed return type of usleep to int.
395
396 * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
397 isn't found in the OS.
398
399 * iselect.h: #define scm_internal_select select if GUILE_ISELECT
400 isn't enabled. (Thought that I had made this change ages ago...)
401
402 * iselect.c: Declare bzero if not defined by OS.
403
26c41b99
MD
4041998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
405
c3e09ef9
MD
406 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
407 condition. (Thanks to John Tobey.)
408
409 * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
410 scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
411 A section.
412
413 * __scm.h: Start the long-term project of moving to POSIX threads.
414 Phase 1: Classification of all critical sections.
415 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
416 for A sections. (See comments in __scm.h for details.)
417
26c41b99
MD
418 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
419 dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
420
28795b1f
MD
4211998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
422
423 * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
424 cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
425 (libpath.h, versiondat.h): Replaced dependency on Makefile with
426 dependencies on $(srcdir)/Makefile.in
427 $(top_builddir)/config.status in order to avoid circularity.
428
429 * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
430 from argc if argc was 0 initially.
431
432 * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
433 in generation of libpath.h.
434
f2e5c92c
MD
4351998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
436
437 * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
438 libguile from 2 to 3.
439
a3365d47
MD
4401998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
441
442 * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
443
fc1d67c4
MD
4441998-04-13 Mikael Djurfeldt <mdj@kenneth>
445
446 * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
447 scm_set_port_column_x, scm_port_filename,
448 scm_set_port_filename_x): Removed optional arguments. Added
449 proper argument checking.
450
451 * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
452 stack size in machine words.
453
454 * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
455 rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
456