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