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