* boot-9.scm (the-environment): New special form: Returns an
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
b322f09a
MD
11998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2
3 * readline.c (scm_init_readline): Set
4 rl_basic_word_break_characters. (Thanks to Ian Grant.)
5
6 * coop.c (coop_condition_variable_wait): Removed
7 (coop_condition_variable_wait_mutex): Folded logic of
8 coop_mutex_unlock into coop_condition_variable_wait_mutex to
9 prevent condvar signal lossage. Previously, another thread could
10 start to run after unlocking the mutex but before putting the
11 current thread on the wait queue. If that thread then would
12 signal the first, the signal would be lost. (Thanks to Christian
13 Lynbech.)
14
224822be
MD
151998-11-17 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
16
17 * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to
18 Christian Lynbech.)
19
036737fc
MD
201998-11-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
21
22 * objects.c (scm_i_make_class_object): Renamed from
23 make_class_object; exported; error checking moved to
24 scm_make_class_object and scm_make_subclass_object.
25 (scm_make_class_object, scm_make_subclass_object): Use
26 scm_i_make_class_object.
27 (scm_make_subclass_object): Let the subclass have same metaclass
28 as the superclass.
29
a6e350dd
MD
301998-11-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
31
32 * debug.c (scm_debug_options): Bugfix: Set the value of
33 scm_stack_checking_enabled_p after setting debug options;
34 #include "stackchk.h". (Thanks to Richard Polton.)
35
9879d0f1
RS
361998-11-13 Radey Shouman <rshouman@metro2000.com>
37
38 * unif.c (scm_array_contents): removed unnecessary test for 0
39 base.
40
88be72ac
MD
411998-11-13 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
42
43 * evalext.c, evalext.h (scm_m_sequence_to_list): Removed.
44 Replaced by macro `collect' in boot-9.scm.
45
ad3ff75b
MD
461998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
47
48 * eval.c (scm_copy_tree): Copy source properties if existent.
49
50 * debug.c (scm_start_stack): Copy source when evaluating. (If we
51 don't, we may end up passing memoized source to a transformer.)
52
29672a5c
MD
531998-11-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
54
7a13c3ae
MD
55 * stack.c (get_applybody): Help function which lookups the first
56 body form of the apply closure.
57 (read_frames): Prevent the source of the first form of the apply
58 closure from being recorded. This would only be confusing.
e40a5fc8 59
29672a5c
MD
60 * debug.h (SCM_SET_MACROEXP, SCM_CLEAR_MACROEXP, SCM_MACROEXPP):
61 Replaces SCM_MACROFRAME, SCM_MACROFRAMEP.
62
63 * eval.c (SCM_CEVAL): Use SCM_SET/CLEAR_MACROEXP.
64
65 * stacks.c (read_frame): Bugfix: Removed lingering `else'
66 statement.
67 (read_frames): Use SCM_MACROEXPP.
68
56977059 691998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
7c939801
MD
70
71 * stacks.c (read_frames): Skip gsubr frames in backtraces. (They
72 don't contain interesting information since all arguments are
73 present in the frame which applies the compiled closure anyway.);
74 Skip the transformer application frames.
56977059
MD
75
76 * print.c (scm_iprin1): Print gsubrs as primitives.
77
fc4c5795
MD
781998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
79
80 * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type.
81
82 * eval.c (SCM_CEVAL): Mark macro frames at `handle_a_macro' so
83 that we can identify these in a backtrace. (This change doesn't
84 introduce any significant speed penalty.)
85
86 * eval.c: Added note about `serial-map' using scm_map.
87
88 * read.c, read.h (scm_read_options, scm_read_opts): Removed
89 readline options. They should reside in their own options array.
90
91 * readline.c, readline.h (scm_readline_options,
92 scm_readline_opts): Moved readline options here.
93
68d15e3e
MD
941998-11-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
95
96 * readline.c (scm_read_history, scm_write_history): Bugfix: Use
97 SCM_ROCHARS instead of SCM_CHARS.
98
99 * ports.c (scm_unread_string): Bugfixes: Check for SCM_STRINGP,
100 not SCM_ROSTRINGP; use SCM_ROUCHARS instead of SCM_UCHARS.
101
44e0a162
MD
1021998-11-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
103
104 * ports.h (SCM_CUC): #define as ~SCM_CRDY instead of 0x001fffffL.
105 This is quite important since the latter clears the
106 FPORT_READ_SAFE and FPORT_WRITE_SAFE flags causing flushes at
107 every single character read...
108
99317654
MD
1091998-11-03 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
110
111 * print.c (scm_iprin1): Removed suspect looking (and indeed
112 malevolent) semicolon after test for user supplied closure print
113 procedure. (Thanks to Telford Tendys.)
114
115 * list.c (scm_sloppy_memq): Removed sloppy_mem_check.
116 (scm_memq, scm_memv, scm_member): Do argument checking *before*
117 starting to search the list. Removed call to sloppy_mem_check.
118
119 * list.c, list.h (scm_delq1_x, scm_delv1_x, scm_delete1_x): New
120 procedures: Same as scm_delq_x et al, but delete maximally one
121 element.
122
123 * options.c (scm_options, scm_init_options): GC-protect option
124 values of type SCM. (Thanks to Telford Tendys.)
125
d0b7bad7
MD
1261998-11-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
127
128 * eval.c: Don't #define scm_lookupcar to scm_lookupcar1. Instead
129 make sure that there always is a "real" scm_lookupcar.
130
9cb84fbb
MD
1311998-11-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
132
133 * read.c, read.h (history-length, history-file): New read options.
134 (scm_read_options): Stifle history to history length.
135
fc4c5795
MD
136 * readline.c (scm_read_history, scm_write_history): New
137 procedures.
9cb84fbb 138
4ecb8428
MD
1391998-10-31 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
140
141 * eval.h (scm_macro_eval_x): Removed declaration.
142
143 * eval.c (scm_s_expression, scm_s_test, scm_s_body,
144 scm_s_bindings, scm_s_variable, scm_s_clauses, scm_s_formals):
145 Renamed and made global.
146
147 * eval.c, eval.h (SCM_EVALIM): Renamed from EVALIM.
148 (SCM_XEVAL, SCM_XEVALCAR): Renamed from XEVAL, XEVALCAR.
149
150 * evalext.c, evalext.h: New files. Contain non-R5RS things
151 having to do with evaluation.
152
fc4c5795
MD
153 * evalext.c (scm_serial_map): New procedure: Version of `map'
154 which guarantees that the procedure is applied to the lists in
155 serial order.
156 (scm_m_sequence_to_list): New syntax: Version of `begin' which
157 returns a list of the results of the body forms instead of the
158 result of the last body form.
4ecb8428
MD
159 (scm_definedp, scm_m_undefine): Moved from eval.c
160
161 * evalext.h (scm_m_sequence_to_list): Added declaration.
162
163 * macros.c, macros.h: New files.
fc4c5795
MD
164 (scm_procedure_to_syntax, scm_procedure_to_macro,
165 scm_procedure_to_memoizing_macro, scm_macro_p, scm_macro_type,
166 scm_macro_name, scm_macro_transformer): Moved from eval.c
4ecb8428
MD
167 (scm_make_synt): Moved from eval.c
168
fc4c5795
MD
169 * procs.c, procs.h (scm_procedure_documentation): Moved from
170 eval.c.
4ecb8428
MD
171
172 * init.c (scm_boot_guile_1): Added calls to scm_init_macros and
173 scm_init_evalext.
174
175 * Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h.
176
35c96965
MD
177 * debug.c, print.c: Added #include "macros.h".
178
4d362308
MD
1791998-10-29 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
180
181 This change adds the ability to use `unread-char' multiple times
182 without interspersed reads and adds the new procedure
183 `unread-string'. The change is optimized for the common case of
184 unreading a single character. This is also the reason behind the
185 choice to store characters in the port itself: in most cases no
186 extra malloc is required.
187
188 The amount of code in some macros in ports.h has been increased to
189 the extent that they would fit better as C functions, but, since
190 this code belongs to the port representation, such functions
191 should be placed in ports.c which would cause calls back and forth
192 between ports.c and genio.c. That is not good for performance.
193 Also, keeping them as macros allows the compiler to do some
194 optimizations which are needed to make the current interface
195 (SCM_CRDYP, SCM_CGETUN, SCM_TRY_CLRDY) efficient.
196
197 One benchmark (Guile startup time) indicates an increase of
198 loading speed of 1%. Another (reading (using `read') boot-9.scm
199 10 times) shows no change in performance.
200
201 (Caveat: Since Gary is redesigning I/O anyway, no big efforts were
202 made to find a beautiful solution.)
203
204 * ports.h (SCM_CLRDY, SCM_CUNGET, SCM_CGETUN): Rewritten.
205 (SCM_TRY_CLRDY): New macro: Only clear the first unread
206 character. (SCM_CLRDY clears all.)
207 (SCM_N_READY_CHARS): New macro: Returns number of unread
208 characters in a port. Returns wrong answer if SCM_CRDYP is false.
209 (struct scm_port_table): New fields: `entry' contains port table
210 index, `cp' points to last unread char, `cbuf' is the buffer for
211 unread chars, `cbufend' points after end of the character buffer.
212
213 * ports.h, ports.c (scm_unread_string): New procedure.
214 (scm_grow_port_cbuf): New function.
215
216 * ports.c (scm_add_to_port_table, scm_remove_from_port_table):
217 Handle new fields.
218 (scm_generic_fgets), fports.c (local_fgets): Use a loop
219 to read unread characters. Use SCM_TRY_CLRDY instead of
220 SCM_CLRDY.
221
222 * ioext.c (scm_ftell): Use SCM_N_READY_CHARS to correct position.
223
224 * genio.c (scm_getc): Use SCM_TRY_CLRDY instead of SCM_CLRDY.
225
226 * genio.c, genio.h (scm_ungets): New function.
227
228 * genio.c (scm_puts): Removed mysterious TRANSCRIPT_SUPPORT code
229 sections.
230
22c88b3f
MD
2311998-10-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
232
233 * threads.h (scm_thread_sleep, scm_thread_usleep): Fixed
234 declarations. (Thanks to Russ McManus.)
235
3ffc7a36
MD
2361998-10-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
237
238 * numbers.c (num2long): As a software archeologist, I'm proud of
239 this finding! :) Preliminary dating suggests an almost 4 year old
240 remnant from the SCM ancestor. The sample has been removed from
241 the finding site and is now safely stored in the repository.
242
243 * numbers.h: Removed prototype for num2long.
244
245 * unif.c (scm_array_set_x): Use scm_num2long instead of num2long.
246
247 * gh_data.c (gh_scm2doubles): Make it possible to pass result
248 array as second arg.
249 (gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
250 gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions.
251 * gh.h: Updated and added prototypes.
252
253 * gh_data.c (gh_ints2scm): Handle integers outside INUM limits.
254
cc720f64
JB
2551998-10-24 Jim Blandy <jimb@zwingli.cygnus.com>
256
257 * gc.h: Remove all uses of SCM_P. (Thanks to Richard Polton.)
258
259 * guile-snarf.in: Never generate an empty file. (Thanks to
260 Richard Polton.)
261
262 * gh.h (gh_enter, gh_new_procedure0_0, gh_new_procedure0_1,
263 gh_new_procedure0_2, gh_new_procedure1_0, gh_new_procedure1_1,
264 gh_new_procedure1_2, gh_new_procedure2_0, gh_new_procedure2_1,
265 gh_new_procedure2_2, gh_new_procedure3_0, gh_new_procedure4_0,
266 gh_new_procedure5_0): Specify argument types, to appease C++
267 compilers. (Thanks to Brad Bowman.)
268
269 Bug reports from Russ McManus:
270 * guile-snarf.in: If the CPP environment variable is set, use that
271 as the C preprocessor, instead of the preprocessor autoconf
272 found.
273 * snarf.h (SCM_PROC): Cast the function pointer passed to
274 scm_make_gsubr, to satisfy C++.
275
276 * gh_eval.c (gh_eval_str_with_catch, gh_eval_file_with_catch):
277 Use the handler passed, instead of ignoring it and using
278 gh_standard_handler. (Thanks to Etienne Bernard.)
279
5469b4a1
JB
2801998-10-20 Jim Blandy <jimb@zwingli.cygnus.com>
281
282 * ports.h: Put text after #endif in comment. (Thanks to Nicolas
283 Neuss.)
284
f4be1689
JB
2851998-10-19 Jim Blandy <jimb@zwingli.cygnus.com>
286
1f6fe22a
JB
287 * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
288 continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
289 dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
290 feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
291 genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
292 hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
293 list.c, list.h, load.c, load.h, mallocs.c, markers.c,
294 mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
295 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
296 procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
297 regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
298 script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
299 srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
300 strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
301 symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
302 vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
303 copyright years.
304
f4be1689
JB
305 * script.c (scm_compile_shell_switches): Define
306 use-emacs-interface in the root module, so the repl code can see
307 it. See today's change to top-repl in ice-9/boot-9.scm.
308
309 * filesys.c (set_element, get_element): Make sure that `element'
310 is a cell before applying SCM_FPORTP to it. (Thanks to Jost
311 Boekemeier and Jorgen "forcer" Schaefer.)
312
3131998-10-18 Jim Blandy <jimb@zwingli.cygnus.com>
314
315 * chars.c (scm_charnames): In ASCII character name table, make
316 newlines print as #\newline by default, not #\nl.
317
318 * Makefile.am (libguile_la_SOURCES, BUILT_SOURCES): Put these in
319 alphabetical order. Oh thrills. But it helps me know how far
320 along in the compilation I am.
321 * Makefile.in: Regenerated.
322
05c33d09
MD
3231998-10-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
324
325 * unif.c (scm_raprin1): Changed print syntax for byte vectors from
326 #bytes(...) to #y(...), and syntax for short vectors from
327 #short(...) to #h(...). This may seem nutty, but, like the other
328 uniform vectors, byte vectors and short vectors want to have the
329 same print and read syntax (and, more basic, want to have read
330 syntax!). Changing the read syntax to use multiple characters
331 after the hash sign breaks with the conventions used in R5RS and
332 the conventions used for the other uniform vectors. It also
333 introduces complexity in the current reader, both on the C and
334 Scheme levels. (The Right solution is probably to change the
335 syntax and prototypes for uniform vectors entirely.)
336
1aab20ac
JB
3371998-10-17 Jim Blandy <jimb@savonarola.red-bean.com>
338
339 Don't use local_fgets on sockets; ftell doesn't work on sockets.
340 (Thanks to Jorgen "forcer" Schaefer.)
341 * ports.h (SCM_NOFTELL): New flag.
342 * fports.c (local_fgets): If it's set, use the generic fgets.
343 * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce.
344
97c524bd
MD
3451998-10-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
346
347 * script.c (scm_compile_shell_switches): Add handling of -q switch
348 (inhibit loading of user init file).
349 (scm_shell_usage): Add usage text for -q switch.
350 (scm_compile_shell_switches): Always load user init file first if
351 it is loaded at all.
352
70445040
JB
3531998-10-16 Jim Blandy <jimb@zwingli.cygnus.com>
354
355 * stime.c: The CPP hair to determine a value for CLKTCK is weird,
356 and is now broken under NetBSD. I can't fathom what it's trying
357 to do, so I've replaced it with something that I do understand,
358 which seems to work, and which isn't broken on NetBSD. "Progress?
359 You Decide." (Thanks to Perry Metzger.)
360
361 * regex-posix.c (scm_regexp_exec): Add a cast to remove a
362 signed/unsigned comparison.
363
6e6e2bbc
JB
3641998-10-15 Jim Blandy <jimb@zwingli.cygnus.com>
365
366 Warning fixes from Greg Harvey:
367 * unif.c (scm_array_set_x): initializer for pos
368 * throw.c (scm_ithrow): added initializer for jmpbuf (SCM_UNDEFINED)
369 * struct.c (scm_struct_ref, scm_struct_set_x): Added
370 initializers for field_type, since EGCS so desparately wants to
371 play dumb
372 * debug.h (scm_make_gloc, scm_gloc_p, scm_make_iloc, scm_memcons,
373 scm_mem_to_proc, scm_proc_to_mem, scm_debug_hang): Added prototypes
374 when GUILE_DEBUG is defined.
375 * dynwind.h (scm_wind_chain): Same.
376 * ports.h (scm_pt_size, scm_pt_member): Same.
377 * print.h (scm_current_pstate): Same.
378 * procs.h (scm_make_cclo): Same.
379
eebc12c6
JB
3801998-10-14 Jim Blandy <jimb@zwingli.cygnus.com>
381
a437d8a2
JB
382 Handle short and long long uniform arrays properly. (Thanks to
383 Clark McGrew.)
384 * ramap.c (scm_ra_matchp, scm_array_fill_int, scm_array_index_map_x,
385 raeql_1): Add cases for scm_tc7_svect (short vectors) and
386 scm_tc7_llvect (long long vectors).
387
388 Change the way libguile and boot-9.scm are timestamped, to try to
389 get rid of these spurious mismatch warnings. Now both
390 libguile/versiondat.h and ice-9/version.scm are generated directly
391 by the configuration process, rather than having version.scm
392 generated directly, and libguile/versiondat.h generated by the
393 Makefile, which is generated by configure. It seems that
394 sometimes the Makefile would change, but versiondat.h depends on
395 Makefile.in, not Makefile, so it wouldn't get rebuilt.
396 * Makefile.am (versiondat.h): Target removed; this is generated
397 directly by the configure script now.
398 (BUILT_SOURCES): Remove versiondat.h.
399 * versiondat.h.in: New file, transformed by the configure script
400 into versiondat.h.
401 * Makefile.in: Regenerated.
402
731a0a68
JB
403 * (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c,
404 options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS ->
405 SCM_CAUTIOUS; this way, 1) there's only one version of each flag
406 to define (we used to have both RECKLESS and SCM_RECKLESS), and 2)
407 if we want to use them in a header file some day, we can. (Thanks
408 to Michael Livshin.)
409
ae6f9e24
JB
410 * stime.c (scm_get_internal_real_time): Do the arithmetic using
411 SCM numbers, so we won't have rollover problems; the range of a
412 signed long in milliseconds is about 25 days. (Thanks to Karl
413 Hegbloom.)
414
70445040 415 Don't redefine sleep and usleep; fix this problem now.
eebc12c6
JB
416 * coop.c (sleep, usleep): Remove declarations; we don't use or
417 redefine these any more.
418 (scm_thread_usleep, scm_thread_sleep): New functions which do the
419 job of usleep and sleep in a thread-friendly way. We can use
420 these in the rest of Guile. Define versions for systems both with
421 and without iselect.
422 * threads.h (scm_thread_usleep, scm_thread_sleep): New declarations.
423 * scmsigs.c (usleep): Clean up oddities declaring usleep; since
424 we're just using it, not redefining it, we can use a K&R style
425 declaration here.
426 (sleep): Declare this, too, if the system hasn't.
427 (scm_sleep, scm_usleep): Use scm_thread_sleep and
428 scm_uthread_sleep if they're available; otherwise, just call the
429 system functions.
430 * scmconfig.h.in: Regenerated.
431
432 * coop.c (scm_thread_sleep): Make `slept' an unsigned long.
433
434 * coop.c (coop_sleephelp): Remove ANSI #ifdef hair.
435
94e3e95e
JB
4361998-10-12 Jim Blandy <jimb@zwingli.cygnus.com>
437
cb9728ed
JB
438 * threads.c: Doc fix.
439
440 The argument type of usleep varies from system to system,
441 as does the return type. We really shouldn't be redefining usleep
442 at all, but I don't have time to clean that up before the 1.3.
443 release. It's on the schedule for afterwards. (Thanks to Julian
444 Satchell.)
445 * coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and
446 definition.
447 * scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype.
448 * scmconfig.h: Regenerated.
449
94e3e95e
JB
450 * simpos.c (scm_software_type): Procedure deleted. This isn't the
451 right way to handle system variation. Autoconf's approach is the
452 way and the light.
453 * simpos.h (scm_software_type): Declaration deleted.
454
455 * script.c (scm_find_executable): Don't test if unix is #defined
456 here; first, NetBSD doesn't #define it, and second, it's the wrong
b1d6e336 457 way to go about these things. (Thanks to Perry Metzger.)
94e3e95e
JB
458 (dld_find_executable): Delete this MSDOS support code. This isn't
459 the way we want to support this; it needs to be rethunk at a
460 larger scale.
461
462 * genio.c (scm_do_read_line): Don't just politely check that the
463 line was either non-empty or EOF. Abort if it's empty and not
464 EOF.
465
5f964025
JB
4661998-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
467
81aef0ba
JB
468 * scmconfig.h.in: Regenerated.
469
335df0e8
JB
470 * libguile.h: Don't omit the dynamic linking functions. (Thanks
471 to Greg Badros.)
472
5f964025
JB
473 * genio.c (scm_do_read_line): Count lines correctly when the file
474 doesn't end in a newline.
475
17f8d40c
JB
4761998-10-10 Jim Blandy <jimb@zwingli.cygnus.com>
477
216d3a1e
JB
478 * genio.c (scm_do_read_line): Maintain the line count correctly.
479 (Thanks to Harvey J. Stein and Greg Harvey.)
480
17f8d40c
JB
481 * gc.c (scm_return_first): Remove #ifdef __STDC__ garbage; Guile
482 requires ANSI now.
483
484 * numbers.c (big2str): Protect t from garbage collection until
485 we're done. (Thanks to Gary Houston.)
486
31b9e767
JB
4871998-10-09 Jim Blandy <jimb@zwingli.cygnus.com>
488
c6ff295e
JB
489 * Makefile.am (libguile_la_LDFLAGS): Increment shared library
490 version number.
491 * Makefile.in: Regenerated.
492
31b9e767
JB
493 * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno,
494 scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of
495 SCM_P macro.
496
497 Do magic to mix reads and writes on stdio FILE-based ports.
0445f9f2 498 (Thanks to Christian Lynbech.)
31b9e767
JB
499 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY):
500 New macros.
501 (pre_read, pre_write): New functions.
502 (local_fgetc, local_fgets, local_ffwrite, local_fputc,
503 local_fputs): Call them.
504 (local_fflush): Mark the port as ready for reading and writing.
505 (scm_stdio_to_port): Set the FPORT_READ_SAFE, FPORT_WRITE_SAFE
506 flags on new port objects. This might not be accurate --- who
507 knows what state the FILE * is in when we get it --- but it won't
508 do extraneous calls to fflush or fseek, so it's no worse than the
509 behavior before this change.
510 * ports.h: Add comment.
511
512 Centralize the creation of port objects based on stdio FILE * in
513 fports.c; don't just throw them together anywhere.
514 * fports.c (scm_stdio_to_port): Make NAME a SCM value, which is
515 what the rest of Guile wants. Don't set the revealed count;
516 that's only appropriate for stdin, stdout, stderr.
517 (scm_standard_stream_to_port): This function does set the revealed
518 count.
519 * init.c (scm_init_standard_ports): Use scm_standard_stream_to_port,
520 not scm_stdio_to_port.
521 * filesys.c (scm_open): Call scm_stdio_to_port; don't write it out.
522 * fports.c (scm_open_file): Same.
523 * posix.c (scm_pipe): Same.
524 * socket.c (scm_sock_fd_to_port): Same.
525 * ioext.c (scm_fdopen): Same.
526 (scm_freopen): Moved from here to...
527 * fports.c (scm_freopen): ... here. This is really something that
528 munges the internals of an fport, so it should go here.
529 * fports.h (scm_stdio_to_port): Adjust prototype.
530 (scm_standard_stream_to_port, scm_freopen): New protoypes.
531 * ioext.h (scm_freopen): Prototype removed.
532
533 * filesys.c (set_element, get_element): This can work on both pipe
534 and file ports, so use SCM_FPORTP to typecheck, instead of testing
535 for scm_tc16_fport.
536
537 * scmconfig.h.in: Regenerated.
538
539 Change the definition of the functions in scm_ptobfuns so that
540 they get passed the port object, not the port's stream.
541 * ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
542 * gc.c (scm_gc_sweep): Pass the port itself to the free function.
543 * genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
544 Pass the port itself to the scm_ptobs function.
545 * ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
546 scm_generic_fgets): Same.
547 (putc_void_port, puts_void_port, write_void_port, flush_void_port,
548 getc_void_port, fgets_void_port, close_void_port): Just change the
549 argument names; these functions don't really do anything.
550 * fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
551 local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
552 port as an argument, and use SCM_STREAM to get the stdio FILE *.
553 Also, use prototyped definitions, and get rid of the extra
554 declarations.
555 (scm_fptob, scm_pipob): We don't need casts here any more.
556 * strports.c (prinstpt): Use prototype declarations.
557 (stputc, stwrite, stputs, stgetc): Take the port as an argument,
558 and use SCM_STREAM to get the string info. Also, use prototyped
559 definitions, and get rid of the extra declarations.
560 * vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
561 noop0): Same.
562
563 * ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight
564 prototype; it's okay (preferred, even!) to use ANSI C in Guile.
565
566 * fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and
567 scm_fgets, for consistency.
568 (scm_fptop, scm_pipob): References updated.
569
6d921cd6
JB
5701998-10-08 Jim Blandy <jimb@zwingli.cygnus.com>
571
572 Include the source location in error messages for scripts.
573 * init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the
574 stack is still there when we catch the error.
575 * throw.c (handler_message): If we are handling an error with a
576 message, then put together the proper arguments and call
577 scm_display_error, instead of scm_display_error_message. That
578 displays source location, if it can find it.
579
13af3048
JB
5801998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
581
a8e05009
JB
582 * gc.c (scm_unprotect_object): Change this so that calls to
583 scm_protect_object and scm_unprotect_object nest properly.
584 (scm_protect_object): Doc fixes.
585
3c0a54bd
JB
586 * strings.c (scm_string_set_x): Require the argument to be a
587 writable string, not a substring or a symbol.
588 * strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.
74f87516
JB
589 (Thanks to John Redford and Charbel Jacquin.)
590
13af3048
JB
591 * scmconfig.h.in: Regenerated; ../acconfig.h has changed.
592
6ea669d7
JB
5931998-10-07 Jim Blandy <jimb@totoro.red-bean.com>
594
595 * eval.c (safe_setjmp): Remove this misunderstanding.
596 (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to
597 ordinary setjmp.
598
2d0937bc
JB
5991998-10-06 Jim Blandy <jimb@zwingli.cygnus.com>
600
601 * libguile.h: Mark these as C declarations, for compilation by C++
602 compilers.
603
604 * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef
605 __cplusplus clause. I seriously doubt this ever worked the way
606 the author seems to have intended.
607
6081998-10-05 Jim Blandy <jimb@zwingli.cygnus.com>
609
610 Utterly needless cleanups to hopelessly messy code.
611 * ports.c: Doc fixes.
612 (scm_fflush): Moved to ...
613 * genio.c (scm_fflush): ... here, amongst all the other port
614 method invocation functions.
615 * genio.h, ports.h: The prototype moves too.
616
53314947
JB
6171998-10-04 Jim Blandy <jimb@zwingli.cygnus.com>
618
8b49142f
JB
619 * backtrace.c (display_error_body): The current frame does not
620 always have a parent frame; consider a function called directly
621 from the MAIN_FUNC passed to scm_boot_guile. (Thanks to Maciej
622 Stachowiak.)
623
53314947
JB
624 * alloca.c (alloca): Undo yesterday's changes, and simply call
625 malloc directly for storage, and abort if we don't get what we
626 want. The situation is much simpler --- just call malloc. Emacs
627 has bizarre/evil requirements (signal handlers might malloc unless
628 you set this global flag, so you have to set the flag around all
629 calls to malloc) which we are certainly not going to conform to,
630 so we can do the simple and obvious thing.
631
632 * coop.c (coop_condition_variable_wait): Make this function
633 static. It's only useful internally --- you should never just
634 wait on a condition variable.
635 * coop-defs.h (coop_condition_variable_wait): Delete prototype.
636
026065b7
JB
6371998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
638
7265de70
JB
639 * unif.c (scm_array_set_x): Accept any kind of number as an
640 element for a uniform vector of doubles. This is more consistent
641 with Scheme's view of numbers. (Thanks to Miroslav Silovic.)
642
a9fe62cb
JB
643 * alloca.c: Use scm_must_malloc to obtain storage. Hopefully this
644 works; I can't conveniently test it myself. (Thanks to Dvid
645 Tillman for the bug report.)
646
026065b7
JB
647 * init.c: Doc fixes.
648
649 * init.c (invoke_main_func): Load the startup files (boot-9.scm)
650 from here, not from scm_compile_shell_switches (which is a pretty
651 dumb place to do it).
652 (scm_load_startup_files): New function.
653 (scm_ice_9_already_loaded): Variable moved to here from script.c.
654 * script.c (scm_compile_shell_switches): Don't load the startup
655 files here.
656 (scm_ice_9_already_loaded): Variable moved.
657 * init.c (scm_load_startup_files): Prototype for new function.
658 * gh_init.c (gh_enter): Doc fix.
659
1aab20ac 6601998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
541716d1
JB
661
662 Some anti-warning changes from Greg Harvey.
663 * gh_data.c (gh_scm2doubles): Initialize m, to avoid compiler
664 warnings when it doesn't understand our NORETURN declarations in
665 error.h.
666 * posix.c (scm_mknod): Similar.
667
f9d12ce8
JB
6681998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
669
670 * posix.c (scm_getpwuid): If we can't find an entry, return our
671 own message, instead of using scm_syserror --- the getpwMUMBLE
672 functions don't set `errno' to anything interesting.
673
1aab20ac 6741998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
0553d3a2
JB
675
676 Get rid of warnings from the cooperative threading system.
677 * threads.h (scm_single_thread_p, scm_yield,
678 scm_call_with_new_thread, scm_join_thread, scm_make_mutex,
679 scm_lock_mutex, scm_unlock_mutex, scm_make_condition_variable,
680 scm_wait_condition_variable, scm_signal_condition_variable): Add
681 prototypes for these Scheme-visible functions.
682 * coop-defs.h (coop_next_runnable_thread,
683 coop_wait_for_runnable_thread_now, coop_wait_for_runnable_thread):
684 Prototypes for these here, even though they're from iselect.c.
685 (coop_condition_variable_wait, coop_join): Add prototypes.
686 * coop-threads.c (scm_threads_free_thread, scm_threads_free_mutex,
687 scm_threads_free_condvar): Make these smob functions static.
688 * coop-threads.h (coop_init): Give this a real prototype.
689 * coop.c: #include <unistd.h>, if we have it, for `usleep' and `sleep'.
690 (coop_next_runnable_thread): No need to provide prototype; it's in
691 coop-defs.h.
692
693 * scmconfig.h.in: .detarenegeR
694
695 * iselect.c, threads.c: Doc fixes.
696
235bb3fe
JB
6971998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
698
699 * Makefile.in: Regenerated with a patched automake, to get
700 dependency generation right when using EGCS.
701
702 * inet_aton.c (inet_aton): Add prototype, to remove compiler
703 warning. (Thanks to Robert Pluim.)
704
705 * inet_aton.c (inet_aton): Reassure the compiler that the
706 arguments to the <ctype.h> macros are all unsigned characters, not
707 signed characters.
708
1aab20ac 7091998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
83d1c666
JB
710
711 Getting rid of more warnings...
712 * iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see
713 today's change to ../configure.in.
714 * scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP.
715 * scmconfig.h.in: Regenertaded.de.,.__
716 * stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL.
717 (scm_localtime, scm_mktime): Use a const char * to manipulate the
718 time zone name.
719
720 * readline.c: Doc fix.
721 (rl_cleanup_after_signal, rl_free_line_state): Make these static.
722 * readline.h (scm_filename_completion_function): Add prototype.
723 (scm_init_readline): Make this into a prototype.
724
725 * readline.c (scm_filename_completion_function): Use SCM_PROC to
726 declare this, instead of calling scm_make_subr manually.
727
1aab20ac 7281998-10-02 Jim Blandy <jimb@savonarola.red-bean.com>
83d1c666
JB
729
730 * readline.h (scm_init_readline): Add prototype for this.
731 (scm_init_readline): Make this a real prototype.
732
94c0b3b8
JB
7331998-09-30 Jim Blandy <jimb@zwingli.cygnus.com>
734
735 Warning fixes from Maciej Stachowiak:
736 * backtrace.h (scm_display_application, scm_backtrace): Add
737 prototypes.
738 * debug.c (scm_m_start_stack): Make this function static.
739 * fluids.h (scm_fluid_p): Add prototype.
740 * procprop.c (scm_i_procedure_arity): Make this function static.
741 * regex-posix.c (scm_regexp_error_msg): Make this function static.
742 * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl.
743 * root.h (scm_dynamic_root): Add external prototype.
744 * scmsigs.h (scm_usleep): Add external prototype.
745 * script.h (scm_init_script): Use prototype, not K&R decl.
746 * stacks.h (scm_stack_id): Add external prototype.
747 * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype.
748
dc9f6d6a
MG
7491998-09-30 Mark Galassi <rosalia@cygnus.com>
750
751 * gh.h: took out the definitions of vset and vref, since they are
752 replaced by the proper vector routines that correspond to the R4RS
753 procedures.
754
61a9ba48
JB
7551998-09-29 Jim Blandy <jimb@totoro.red-bean.com>
756
94c0b3b8 757 * snarf.h (SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): New macros;
61a9ba48
JB
758 these are analogous to SCM_VCELL and SCM_GLOBAL_VCELL but take a
759 third argument, a C expression that should result in a SCM value,
760 which is used to initialize the variable. Reimplemented
761 SCM_CONST_LONG in terms of SCM_VCELL_INIT. (Thanks to Maciej
762 Stachowiak.)
763
764 * version.h (scm_libguile_config_stamp): Add prototype.
765 (From Maciej Stachowiak.)
766
9a3c1149
JB
7671998-09-26 Jim Blandy <jimb@zwingli.cygnus.com>
768
769 * eval.c (scm_force): Assert that x is SCM_NIMP to fix segv when
770 (force 9) is tried. (Thanks to Karl M. Hegbloom.)
771
52591c80
JB
7721998-09-06 Jim Blandy <jimb@zwingli.cygnus.com>
773
6925bc4e
JB
774 * print.c (scm_iprin1): Rather than having one i, and using it in
775 several places, declare a fresh i local to each block where it is
776 used, and give it a signedness appropriate to its use in each case.
777 (scm_iprlist): Same.
778
779 * print.c (scm_iprin1): Add cast to avoid unsigned/signed
780 comparison warnings.
781
782 * print.c (ENTER_NESTED_DATA): Make i an unsigned long, to avoid
783 signed/unsigned clashes.
784
785 * posix.h (scm_tmpnam): Added prototype.
786
52591c80
JB
787 * objects.h (scm_set_object_procedure_x, scm_make_class_object,
788 scm_make_subclass_object): Add external prototypes.
789
790 * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned
791 comparison is okay here.
792
793 * numbers.c (scm_istr2int): Add cast; len is known to be positive.
794
795 * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the
796 (true, but confusing) fact that -1 == ((unsigned) 0 - 1).
797
798 * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing
799 signed/unsigned.
800
801 * load.c (swap_port): Make this function static.
802
803 * load.c (scm_search_path): Make max_path_len and max_ext_len
804 unsigned, since they're compared against string sizes.
805
806 * load.c (init_build_info): Make i unsigned.
807
808 * ioext.h (scm_read_line): Add prototype.
809
810 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
811 scm_hash_fn_remove_x): Make hash bucket index local variable k
812 unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as
813 accurately as possible.
814
815 * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned
816 comparisons, and range checking to make sure those casts are
817 harmless.
2d2c87e1
JB
818
819 * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid
820 signed/unsigned comparisons.
821
822 * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to
823 avoid signed/unsigned comparisons.
824 * smob.h (scm_numsmob): Change extern declaration to match.
825
826 * ports.c (scm_numptob): Make this an int, not an scm_sizet, to
827 avoid signed/unsigned comparisons.
828 * ports.h (scm_numptob): Change extern declaration to match.
829 (scm_current_load_port, scm_set_port_line_x,
830 scm_set_port_column_x): New prototypes.
831
832 * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the
833 test code, and it causes warnings.
834
835 * gh.h (gh_int2scmb, gh_uniform_vector_length,
836 gh_uniform_vector_ref): Added prototypes.
837
838 * Makefile.am (libguile_la_SOURCES): Include Scheme-level
839 debugging support unconditionally. That's backtrace.c, stack.c,
840 debug.c, and srcprop.c.
841 (EXTRA_libguile_la_SOURCES): Omit those from here.
842 * Makefile.in: Regenerated.
843
a9b70caf
MD
8441998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
845
846 * options.c (scm_options): Bugfix: Allow empty list of options!
847
848 * debug.c, debug.h (scm_single_step): Removed.
849 (scm_with_traps): New procedure. This procedure could easily be
850 written in Scheme but needs to be highly optimized.
851
852 * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P.
853
854 * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags.
855 Check SCM_TRAPS_P before trapping.
856
6dd78771
JB
8571998-07-30 Jim Blandy <jimb@zwingli.cygnus.com>
858
859 Changes to avoid signed/unsigned comparison warnings.
860 * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs.
861 (scm_gc_sweep): Make n and j local to the blocks they're used in,
862 so they can have appropriate types for each application. Make i
863 signed. Use initializers in some spots. I'll probably pay for
864 all this tweaking.
865 (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args.
866 (scm_must_realloc): Make nm unsigned.
867 (init_heap_seg): Make new_seg_index and n_new_objects signed.
868 (scm_init_storage): Use prototype-style definition, and make the
869 argument unsigned.
870 * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc,
871 scm_must_realloc, scm_init_storage): Adjust prototype accordingly.
872
873 * filesys.c (scm_readlink): Make local vars rv and size ints, to
874 avoid signed/unsigned comparison warnings, and because the return
875 value of readlink may be -1. Don't bother casting the third
876 argument to readlink.
877
878 * filesys.c (scm_dirname, scm_basename): Move these to their own
879 page, at the end of the file.
880 * filesys.h (scm_dirname, scm_basename): Add prototypes for these.
881
882 * eval.h (scm_eval_options_interface): Add external prototype for this.
883 * eval.c (scm_eval_options_interface): Use prototype-style def'n.
884
885 * eval.c (scm_lookupcar1): Make this static.
886
887 * dynl.h (scm_registered_modules, scm_clear_registered_modules):
888 Make these prototype declarations, not K&R-style.
889
890 * chars.c (scm_tables_prehistory): Add cast, to remove signed/
891 unsigned comparison warning.
892
893 * appinit.c: File removed. It had a single function in it, empty,
894 whose reason for existence is explained in no documentation or
895 comment. I think it's there as a default for some Tcl-style
896 initialization, but Tcl abandoned that approach a while ago.
897 * Makefile.am (libguile_la_SOURCES): Remove appinit.c.
898 (BUILT_SOURCES): Remove appinit.x.
899 * Makefile.in: Regenerated.
900
0dcbc17a
JB
9011998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
902
903 * Makefile.in: Regenerated using the last public version of
904 automake, not the hacked Cygnus version.
905
1f5ae2fd
JB
9061998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
907
908 Remove Totoro kludge.
909 * Makefile.in, scmconfig.h.in: Regenerated.
910 * init.c, readline.c: Don't check if TOTORO is #defined.
911
e99cbcd6
JB
9121998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
913
914 * Makefile.am: Adjust for new thread configuration system.
915 (INCLUDES): Include the value of THREAD_CPPFLAGS.
916 (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from
917 THREAD_LIBS.
918 (THREAD_LIBS): Definition deleted; automake will generate such
919 things automatically.
920 * Makefile.in: Regenerated.
921
87148d9e
JB
9221998-07-23 Jim Blandy <jimb@zwingli.cygnus.com>
923
924 Simplify smob and port marking; set the mark bit in the generic
925 marking code, and make marker routines only responsible for
926 turning up outgoing pointers.
927 * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
928 before calling the marking function. Don't call the marking
929 function if it's zero.
930 * markers.c (scm_mark0): Just return #f. This function isn't
931 necessary at all now, but it's harmless to call it. We'll leave
932 it in so other folks' code doesn't croak at link time.
933 (scm_markcdr): Don't call SCM_SETGC8MARK.
934 * async.c (mark_async): Don't call SCM_SETGC8MARK.
935 * dynl.c (mark_dynl_obj): Same.
936 * root.c (mark_root): Same.
937 * srcprop.c (marksrcprops): Same.
938 * unif.c (markra): Same.
939 * variable.c (scm_markvar): Same.
940 * ports.c (scm_markstream): Same.
941 (void_port_ptob): Specify zero for our marking function.
942 * debug.c (debugobjsmob): Same.
943 * dynwind.c (guardsmob): Same.
944 * filesys.c (dir_smob): Same.
945 * fluids.c (fluid_smob): Same.
946 * fports.c (scm_fptob, scm_pipob): Same.
947 * mallocs.c (mallocsmob): Same.
948 * regex-posix.c (regex_t_smob): Same.
949 * smob.c (freecell, flob, bigob): Same.
950 * threads.c (thread_smob, mutex_smob, condvar_smob): Same.
951 * throw.c (jbsmob, lazy_catch_funs): Same.
952
3910272e
MD
9531998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
954
955 * eval.c (scm_copy_tree): Reverted last change: `eval' uses
956 scm_copy_tree on code in order not to let memoized code to leak
957 out. Thus, scm_copy_tree needs to copy vectors as well since
958 quasiquote can introduce evaluated code also inside vector
959 constants.
960
240ed1e5
MD
9611998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
962
963 * eval.c (scm_copy_tree): Removed ability to copy vectors.
964
965 * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect,
966 gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and
967 gh_doubles2dvect.)
968
969 * unif.c: Say that ivect and uvect are of type signed and unsigned
970 long instead of int in commentary so that it correctly describes
971 the implementation.
972
5ef81022
MD
9731998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
974
975 * stime.c: Removed declaration of strptime. (It should be
976 declared by the system headers. If it turns out that some systems
977 don't, we'll handle that then.) (Thanks to Greg Troxel.)
978
979 * stime.h: Renamed TIMEH --> STIMEH
980
981 * backtrace.c (scm_display_error, scm_display_backtrace): In order
982 to increase portability, don't use structure assignment.
983 (Thanks to Nicolas Neuss.)
984
985 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
986 portability.
987 (finalize_fd_sets): Added empty statement after last case label.
988 (Thanks to Nicolas Neuss.)
989
990 * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to
991 Nicolas Neuss.)
992
212d45b8
MD
993Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com>
994
995 * init.c, readline.c: OK, I won't have these readline.x bug
996 reports anymore. We've had them since April. The current reason
997 is a completely unintelligible failure of totoro.red-bean.com to
998 do the test for rl_getc_function in libreadline correctly. This
999 kludge overrides the test if we're on totoro so that the snapshot
1000 generation process can work.
1001
1002 * readline.c: Define a strdup replacement if not existent on system.
1003
43eeb5a6
MD
10041998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1005
1006 * vectors.c, vectors.h (scm_make_vector): Removed third argument.
1007 This change makes scm_make_vector R5RS compatible. We cannot keep
1008 the third argument since people want to be able to deduce the form
1009 of the C function call only by looking at R5RS. (At the same time
1010 we have removed some unnecessary complexity!)
1011
1012 * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
1013 net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
1014 stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
1015 argument in call to scm_make_vector.
1016
9d0b279f
MD
10171998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1018
1019 * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP.
1020 This macro is useful in applications.
1021
dbb25e7f
MD
10221998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1023
1024 * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
1025 (scm_parse_path, scm_search_path): New Scheme level procedures.
1026
1027 * load.h (scm_internal_parse_path, scm_parse_path,
1028 scm_search_path): Declared.
1029
74d6650d
MD
10301998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1031
1032 * filesys.c (dirname, basename): New procedures.
1033
1034 * init.c (scm_boot_guile_1): Removed condition around
1035 scm_init_options.
1036
1037 * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a
1038 new data type (guards) for representation of C level guards and
1039 data on the wind chain.
1040 (scm_internal_dynamic_wind): New function.
1041
1042 * dynwind.h: Declare scm_internal_dynamic_wind.
1043
1044 * root.h (scm_root_state): Added scm_cur_loadp.
1045
1046 * root.c (mark_root): Added comment about cur_loadp.
1047
1048 * load.c: #include "dynwind.h";
1049 (scm_primitive_load): Use scm_inner_dynamic_wind to update
1050 scm_cur_loadp.
1051
1052 * init.c (scm_init_standard_ports): Initialize scm_def_loadp.
1053
1054 * ports.c (current-load-port): New procedure.
1055
391aebfc
MD
10561998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1057
10ccfad7
MD
1058 * ioext.c (scm_isatty_p): Accept any kind of data as argument. If
1059 not a tty, return #f.
1060
391aebfc
MD
1061 * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
1062 to Julian Satchell and Roland Kaufmann.)
1063
1064 * gh.h (gh_memv, gh_member): Fixed typos in macro definitions.
1065 (gh_write): Added declaration. (Thanks to Eiichi Takamori.)
1066
6dabf6a9
MD
10671998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1068
1069 * debug.h, debug.c (scm_start_stack): New function. Implements
1070 the guts of old scm_m_start_stack.
1071
1072 * debug.c (scm_m_start_stack): Use scm_start_stack.
1073
1074 * init.c (scm_start_stack, scm_restart_stack): Renamed to
1075 start_stack and restart_stack. (These have static scope.)
1076
daca2816
MD
10771998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1078
1079 * readline.c (rl_cleanup_after_signals, rl_free_line_state): New
1080 readline functions to come in release 2.3. (Thanks to Chet
1081 Ramey.)
1082 (handle_errors): Use the above functions.
1083
be0ea988
MD
10841998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1085
1086 * readline.c: Improvements for readline support: Handle errors
1087 better; Implement before-read-hook.
1088
10891998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1090
1091 * init.c (scm_boot_guile_1), readline.c: Test for
1092 HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to
1093 assure that we have version >= 2.1.)
1094
e158e4f4
MD
10951998-05-11 Mikael Djurfeldt <mdj@kenneth>
1096
83d1c666
JB
1097 * readline.c (scm_readline): Defer interrupts while we're calling
1098 readline.
1099
e158e4f4
MD
1100 * readline.c (scm_add_history): Bugfix: Do strdup before giving
1101 away the string to add_history.
56600c45
MD
1102 (completion_function): Do completion for readline. (Thanks to
1103 Andrew Archibald.)
e158e4f4
MD
1104 (scm_filename_completion_function): New procedure: Filename
1105 completer.
1106 (current_input_getc): New function. Use this one instead of
1107 standard getc from readline.
1108
1109 * throw.c, throw.h (scm_handle_by_throw): New function: This
1110 handler throws errors to next handler on the dynwind chain.
1111
11121998-05-09 Mikael Djurfeldt <mdj@kenneth>
1113
1114 * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't
1115 used.
1116
8bb51def
MD
11171998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1118
1119 * procprop.c (scm_i_procedure_arity): New function. Returns arity
1120 of procedure.
1121 (scm_procedure_properties): Modified to return arity together with
1122 other properties.
1123 (scm_procedure_property): Added the read-only property `arity'.
1124 (scm_set_procedure_property_x): It is an error to set the `arity'
1125 property.
1126
1127 * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
1128 prefix SCM_; Made f_gsubr_apply global and added prefix scm_.
1129
1130 * procprop.h (scm_sym_arity): New symbol.
1131
1132 * objects.c (scm_set_object_procedure_x): New procedure: Use this
1133 to set the dispatch procedure of an operator or entity object.
1134
1135 * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
1136 Made procedure slots read-only.
1137
1138 * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
1139 scm_tcs_cons_gloc case in zero args switch; Fixed args
1140 construction for operators in scm_tcs_cons_gloc case in two args
1141 switch.
1142
680ed4a8
MD
11431998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1144
104d4533
MD
1145 * fluids.c: Removed use of assert.h (in order to avoid
1146 __eprintf).
1147
1148 * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
1149
1150 * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
1151
680ed4a8
MD
1152 * eval.c (SCM_CEVAL): Do more thorough argument checking. This
1153 change makes the evaluator safer at the cost of evaluation speed.
1154 It handles the case when the user has added a non-immediate
1155 improper end of the application form, e.g., `(+ 0 . x)'.
1156 (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
1157 minimize the extra cost as much as possible. The new code is
1158 enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
1159 problem with structs planted directly in the code (e.g. by a
1160 macro). This no longer causes segmentation fault. (Thanks to
1161 Eric Hanchrow.)
1162
1163 * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
1164 arg `proc' in order to be able to throw errors; New argument
1165 checking code.
1166
1167 * Removed extra #include "debug.h"
1168
0935d604
MD
11691998-04-25 Mikael Djurfeldt <mdj@kenneth>
1170
1171 * scmsigs.c: Declare usleep as returning void on some systems.
2c36126d
MD
1172 (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
1173 Satchell.)
0935d604
MD
1174
1175 * coop.c (usleep): Return void on some systems.
1176
f1a5fa3c
MD
11771998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1178
1179 * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
1180
1181 * coop.c: Changed return type of usleep to int.
1182
1183 * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
1184 isn't found in the OS.
1185
1186 * iselect.h: #define scm_internal_select select if GUILE_ISELECT
1187 isn't enabled. (Thought that I had made this change ages ago...)
1188
1189 * iselect.c: Declare bzero if not defined by OS.
1190
26c41b99
MD
11911998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1192
c3e09ef9
MD
1193 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
1194 condition. (Thanks to John Tobey.)
1195
1196 * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
1197 scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
1198 A section.
1199
1200 * __scm.h: Start the long-term project of moving to POSIX threads.
1201 Phase 1: Classification of all critical sections.
1202 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
1203 for A sections. (See comments in __scm.h for details.)
1204
26c41b99
MD
1205 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
1206 dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
1207
28795b1f
MD
12081998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1209
1210 * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
1211 cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
1212 (libpath.h, versiondat.h): Replaced dependency on Makefile with
1213 dependencies on $(srcdir)/Makefile.in
1214 $(top_builddir)/config.status in order to avoid circularity.
1215
1216 * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
1217 from argc if argc was 0 initially.
1218
1219 * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
1220 in generation of libpath.h.
1221
f2e5c92c
MD
12221998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
1223
1224 * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
1225 libguile from 2 to 3.
1226
a3365d47
MD
12271998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
1228
1229 * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
1230
fc1d67c4
MD
12311998-04-13 Mikael Djurfeldt <mdj@kenneth>
1232
1233 * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
1234 scm_set_port_column_x, scm_port_filename,
1235 scm_set_port_filename_x): Removed optional arguments. Added
1236 proper argument checking.
1237
1238 * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
1239 stack size in machine words.
1240
1241 * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
1242 rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
1243