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