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