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