Commit | Line | Data |
---|---|---|
797da112 JB |
1 | 1999-06-15 Jim Blandy <jimb@savonarola.red-bean.com> |
2 | ||
3 | * stime.c (bdtime2c): Initialize lt->gmtoff and lt->tm_zone from | |
4 | sbd_time. (Thanks to Eric Hanchrow.) | |
5 | ||
6 | Fix from Ken Raeburn <raeburn@raeburn.org>: | |
7 | * weaks.c (scm_make_weak_vector): Add another extra slot before | |
8 | vector contents, to be used only during garbage collection. | |
9 | * weaks.h (SCM_WVECT_GC_CHAIN): New macro to access it. | |
10 | * gc.c (scm_weak_vectors): Now a SCM instead of a SCM*, and now | |
11 | static. | |
12 | (scm_weak_size, scm_n_weak): Deleted. | |
13 | (scm_igc): Use SCM_WVECT_GC_CHAIN to build up a chain of weak | |
14 | vectors without allocating new storage during GC, using | |
15 | scm_weak_vectors as the head of the chain. | |
16 | (scm_mark_weak_vector_spines): Walk SCM_WVECT_GC_CHAIN chain | |
17 | instead of stepping through an array. | |
18 | (scm_gc_sweep): Update offset used to find start of weak vector to | |
19 | free it. | |
20 | (scm_init_storage): Set scm_weak_vectors to EOL. | |
21 | ||
22 | Fix from Ken Raeburn <raeburn@raeburn.org>: | |
23 | * gc.c (already_in_gc): New variable. | |
24 | (scm_igc): Set and clear already_in_gc; abort if it's set at | |
25 | entry. | |
26 | ||
da6929b4 JB |
27 | 1999-06-14 Jim Blandy <jimb@savonarola.red-bean.com> |
28 | ||
797da112 | 29 | Fix from Gary Houston: |
da6929b4 JB |
30 | * fports.c (local_seek): Signal an error if the seek fails. |
31 | * ports.c (scm_lseek): Don't check return value of port's seek | |
32 | function; it's its job to signal an error if there's a problem. | |
33 | ||
2f9c7140 JB |
34 | 1999-06-12 Jim Blandy <jimb@savonarola.red-bean.com> |
35 | ||
36 | * strports.c (scm_call_with_output_string): Don't include the | |
37 | extra character at the end of the string in the result. | |
38 | ||
39 | * ioext.c (scm_read_line): Switch to reading properly. | |
40 | ||
41 | * fports.c, fports.h, gc.c, gdbint.c, ioext.c, ports.c, ports.h, | |
42 | scmsigs.c, strports.c, vports.c: Install the sources which | |
43 | actually correspond to the changes described below. I got the | |
44 | ChangeLog entries and the patch from two different places... | |
45 | ||
aad827f4 JB |
46 | 1999-06-09 Jim Blandy <jimb@savonarola.red-bean.com> |
47 | ||
48 | * gc.c (scm_igc): Check for scm_mallocated underflow. Otherwise, | |
49 | it shows up as terrible performance, as we GC constantly. | |
50 | ||
51 | * ioext.c (scm_do_read_line): Rewritten to use memchr to find the | |
52 | newline. A bit faster, and definitely hairier. | |
53 | (scm_read_line): Count newlines here instead. | |
54 | ||
55 | * strings.c (scm_take_str): New function. | |
56 | (scm_take0str): Reimplement in terms of scm_take_str. * strings.h | |
57 | (scm_take_str): New declaration. * ioext.c (scm_read_line): Use | |
58 | scm_take_str, to avoid copying the string. | |
59 | ||
60 | Add some simple-minded support for line buffered ports. | |
61 | * ports.h (SCM_BUFLINE): New flag for ports. | |
62 | * init.c (scm_init_standard_ports): Request line-buffering on | |
63 | the standard output port. | |
64 | * * ports.c (scm_mode_bits): Recognize 'l' as a request for line | |
65 | buffering. | |
66 | (scm_putc, scm_puts, scm_lfwrite): If the port is line-buffered, | |
67 | and there's a newline to be written, flush the port. | |
68 | ||
69 | Gary Houston's open-buffer port patches: | |
70 | ||
71 | 1999-04-26 Gary Houston <ghouston@easynet.co.uk> | |
72 | ||
73 | * ports.c: (scm_lseek): clear buffers even if just reading current | |
74 | position. | |
75 | ||
76 | * fports.c (local_fclose): call local_fflush unconditionally. | |
77 | (various): don't use the scm_must... memory procs. | |
78 | ||
79 | 1999-04-25 Gary Houston <ghouston@easynet.co.uk> | |
80 | ||
81 | * ports.h (scm_port): make read_pos a pointer to const. | |
82 | strports.c: take care of rw_active and rw_randow. | |
83 | fports.c: scm_fport_drain_input: removed. do it all in ports.c. | |
84 | strports.c (scm_mkstrport): check that pos is reasonable. | |
85 | ioext.c (scm_ftell, scm_fseek): use lseek. | |
86 | (SCM_CLEAR_BUFFERS): macro deleted. | |
87 | ioext.c (redirect_port: use ptob fflush, read_flush. | |
88 | ports.h (scm_ptobfuns): add ftruncate. | |
89 | ports.c (scm_newptob): set ftruncate. | |
90 | adjust ptob tables. | |
91 | * ports.c (scm_ftruncate): new procedure. | |
92 | fports.c (local_ftrunate), strports.c (str_ftruncate): new procs. | |
93 | strports.c (st_seek, st_grow_port): new procs. | |
94 | fports.h (scm_port): change size types from int to off_t. | |
95 | ports.c (scm_init_ports): initialise the seek symbols here | |
96 | instead of in ioext.c. | |
97 | strports.c (scm_call_with_output_string): start with an empty | |
98 | string, so seek and ftruncate can be used. | |
99 | ||
100 | gdbint.c: adjust string port usage. | |
101 | ||
102 | 1999-04-24 Gary Houston <ghouston@easynet.co.uk> | |
103 | ||
104 | * ports.h (scm_ptobfuns): add a read_flush procedure which is the | |
105 | equivalent to fflush for the read buffer. | |
106 | * ports.c (scm_newptob): set read_flush. | |
107 | ports.c (void_port_ptob): set read_flush. | |
108 | fports.c (local_read_flush): new proc. add to ptob. | |
109 | strport.c (st_read_flush): likewise. | |
110 | vport.c (sf_read_flush): likewise. | |
111 | fports.h (struct scm_fport): remove random member. there's nothing | |
112 | left but fdes. leaving it as a struct to allow for future changes. | |
113 | fports.c: replace usage of scm_fport::random with scm_port::rw_random. | |
114 | ports.c: (scm_putc, scm_puts, scm_lfwrite): call the read_flush | |
115 | ptob proc if the read buffer is filled. | |
116 | ||
117 | 1999-04-23 Gary Houston <ghouston@easynet.co.uk> | |
118 | ||
119 | * ports.h (scm_port): add a rw_random member and replace | |
120 | reading and writing members with rw_active member. | |
121 | SCM_PORT_READ/SCM_PORT_WRITE: new values. | |
122 | ||
123 | 1999-04-22 Gary Houston <ghouston@easynet.co.uk> | |
124 | ||
125 | * ports.h (struct scm_port_table): add writing and reading members | |
126 | to replace write_needs_seek: it isn't good enough for non-fports. | |
127 | ports.c, ioext.c, fports.c: corresponding changes. | |
128 | (struct scm_port_table): give it a typedef and rename to scm_port. | |
129 | ports.c, fports.c, strports.c, vports.c, ioext.c, ports.h: | |
130 | corresponding changes. | |
131 | ||
132 | 1999-04-20 Gary Houston <ghouston@easynet.co.uk> | |
133 | ||
134 | * ports.c (scm_newptob): bugfix: set seek member. | |
135 | * * (scm_lseek): new procedure, using code from ioext.c:scm_fseek | |
136 | and generalised to all port types. | |
137 | ||
138 | 1999-04-18 Gary Houston <ghouston@easynet.co.uk> | |
139 | ||
140 | * scmsigs.c (scm_init_scmsigs): set the SA_RESTART flag for all | |
141 | signals (it was only being done for handlers installed from Scheme). | |
142 | Otherwise (for example) SIGSTOP followed by SIGCONT on an interpreter | |
143 | waiting for input caused an EINTR error from read. | |
144 | ||
145 | 1999-04-07 Gary Houston <ghouston@easynet.co.uk> | |
146 | ||
147 | * ports.h (struct scm_port_table): make all the char members | |
148 | unsigned, so they convert to int without becoming negative if large. | |
149 | ||
150 | 1999-03-14 Gary Houston <ghouston@easynet.co.uk> | |
151 | ||
152 | * fports.c (scm_fdes_wait_for_input): forgot to check compilation | |
153 | with threads enabled. rename this procedure to | |
154 | fport_wait_for_input and take a port instead of a fdes. | |
155 | use scm_fport_input_waiting_p instead of scm_fdes_waiting_p. | |
156 | ||
157 | * readline.c (scm_readline): Applied a patch from Greg Harvey to | |
158 | get readline support working again: use fdopen to get FILE objects. | |
159 | ||
160 | 1999-02-26 Gary Houston <ghouston@easynet.co.uk> | |
161 | ||
162 | * gc.c (scm_init_storage): install an atexit proc to flush the | |
163 | ports. | |
164 | (cleanup): the new proc. it sets a global variable which can be | |
165 | checked by the ptob flush procs to avoid trying to throw | |
166 | exceptions during exit. not very pleasant but it seems more reliable. | |
167 | * fports.c (local_fflush): check terminating variable and if set | |
168 | don't throw exception. | |
169 | * CHECKME: that the atexit proc is installed if unexec used. | |
170 | ||
171 | * throw.c (scm_handle_by_message): don't flush all ports here. | |
172 | it still causes bus errors. | |
173 | ||
174 | * fports.h (SCM_FPORT_CLEAR_BUFFERS): rename to SCM_CLEAR_BUFFERS | |
175 | and move to ioext.c. | |
176 | ||
177 | * fports.c (scm_fdes_waiting_p): merged into fport_input_waiting_p. | |
178 | ||
179 | * ports.c (scm_char_ready_p): check the port buffer and call the | |
180 | ptob entry if needed. | |
181 | ||
182 | * ports.h (scm_ptobfuns): input_waiting_p added. change all the | |
183 | ptob initialisers. use it in char-ready | |
184 | ||
185 | * ioext.c (scm_do_read_line): moved from ports.c. make it static. | |
186 | ||
187 | * vports.c (sfflush): modified to write a char (since softports | |
188 | currently use shortbuf.) | |
189 | ||
190 | * fports.c (scm_standard_stream_to_port): moved to init.c and | |
191 | made static. | |
192 | ||
193 | * init.c (scm_init_standard_ports): make stdout and stderr | |
194 | unbuffered if connected to a terminal. with stdio they | |
195 | were line-buffered by default. | |
196 | ||
197 | (scm_ptobfuns): fputc, fputs, fwrite, fgetc, fgets removed. | |
198 | update ptob tables. | |
199 | ||
200 | * ports.h (scm_ptobfuns): change fflush return to void. | |
201 | change flush proc definitions. | |
202 | ||
203 | * strports.c (scm_call_with_output_string): get size from | |
204 | buffer instead of port stream. | |
205 | (scm_strprint_obj): likewise. | |
206 | (st_flush): new proc. | |
207 | ||
208 | * ports.h (struct scm_port_table): added write_end member, | |
209 | as an optimisation. set it where write_buf_size is set. | |
210 | ||
211 | * ports.h (struct scm_port_table): change stream from void * | |
212 | back to SCM. SCM presumably must be large enough to hold a | |
213 | pointer (and probably vice versa but who knows.) | |
214 | (SCM_SSTREAM): deleted. change users back to SCM_STREAM. | |
215 | ||
216 | (scm_puts): rewritten | |
217 | * fports.c (local_ffwrite, local_fputs): removed. | |
218 | * strports.c (stputc, stputs, stwrite): dyked out (FIXME) | |
219 | * vports.c (sfputc, sfputs, sfwrite) likewise. | |
220 | * ports.c (write_void_port, puts_void_port): removed. | |
221 | (putc_void_port, getc_void_port, fgets_void_port): likewise. | |
222 | ||
223 | * ports.c (scm_lfwrite): rewritten using fport.c version. | |
224 | ||
225 | * fports.c (local_fputc): deleted. | |
226 | ||
227 | * ports.c (scm_add_to_port_table): initialise write_needs_seek. | |
228 | ||
229 | * ports.h (scm_ptobfuns): add seek function pointer. | |
230 | * fports.c: set it to local_seek, new procedure. | |
231 | ||
232 | ||
233 | * fports.h (SCM_MAYBE_DRAIN_INPUT): moved to ports.c. | |
234 | use ptob for seek. take ptob instead of fport arg. | |
235 | ||
236 | * ports.h (struct scm_port_table): new member write_needs_seek, | |
237 | replaces reading member in fport struct. | |
238 | ||
239 | * vports.c (sfgetc): store the getted char into the buffer. | |
240 | rename to sf_fill_buffer and install it for fill-buffer in ptob. | |
241 | the Scheme interface is still a procedure that gets a char. | |
242 | (scm_make_soft_port): set up the port buffer (shortbuf). | |
243 | ||
244 | * fports.c (local_fgetc, local_fgets): deleted. | |
245 | * strports.c (stgetc): likewise. | |
246 | * ports.c: scm_generic_fgets: likewise. | |
247 | ||
248 | * ports.h (scm_ptobfuns): add fill_buffer. | |
249 | * ports.c (scm_newptob): assign it. | |
250 | * strports.c (scm_mkstrport): set up the buffer. | |
251 | put just the string into the stream, not cons (pos stream). | |
252 | (stfill_buffer): new proc. | |
253 | ||
254 | * ports.h: fport buffer moved into port table: to be | |
255 | used for all port types. | |
256 | ||
257 | 1998-12-20 Gary Houston <ghouston@easynet.co.uk> | |
258 | ||
259 | * throw.c (scm_handle_by_message): flush ports at exit. | |
260 | ||
261 | * socket.c (scm_sock_fd_to_port): use scm_fdes_to_port. | |
262 | (scm_getsockopt, scm_setsockopt, scm_shutdown, scm_connect, | |
263 | scm_bind, scm_listen, scm_accept, scm_getsockname, | |
264 | scm_getpeername, scm_recv, scm_send, scm_recvfrom, | |
265 | scm_sendto, | |
266 | use SCM_FPORT_FDES. use SCM_OPFPORTP not SCM_FPORTP. | |
267 | ||
268 | * posix.c (scm_getgroups): use SCM_ALLOW/DEFER_INTS. | |
269 | (scm_ttyname): use SCM_FPORT_FDES. | |
270 | (scm_tcgetpgrp, scm_tcsetpgrp): likewise. | |
271 | ||
272 | * filesys.c (scm_chown): use SCM_FPORT_FDES. | |
273 | (scm_chmod, scm_stat, scm_truncate_file: likewise. | |
274 | ||
275 | * ioext.c (scm_isatty_p): use SCM_FPORT_FDES. | |
276 | (scm_fdes_to_ports): modified. | |
277 | (scm_fdopen): use scm_fdes_to_port. | |
278 | ||
279 | * ports.c (scm_init_ports): don't try to flush ports using | |
280 | atexit(). it's too late, errors will cause SEGV. | |
281 | ||
282 | * fports.c (scm_fport_buffer_add): new procedure. | |
283 | ||
284 | * fports.h (SCM_FDES_RANDOM_P): new macro. use it in | |
285 | scm_fdes_to_port and scm_redirect_port. | |
286 | ||
287 | * ioext.c (scm_redirect_port): use setvbuf to set buffers in the | |
288 | new port. reset fp->random. | |
289 | ||
290 | * fports.c (scm_fdes_to_port), ports.c (scm_void_port), | |
291 | filesys.c (scm_opendir): | |
292 | restore defer interrupts while the port is constructed. | |
293 | * (scm_setvbuf): if mode is _IOFBF and size is not supplied, | |
294 | derive buffer size from fdes or use a default. | |
295 | (scm_fdes_to_port): use setvbuf instead of creating the buffers | |
296 | directly. | |
297 | ||
298 | vports.c (various places): use SCM_SSTREAM. | |
299 | strports.c: likewise. | |
300 | * gdbint.c: likewise. | |
301 | * ports.h (SCM_SSTREAM): new macro. | |
302 | ||
303 | * fports.c (scm_input_waiting_p): use scm_return_first, since port | |
304 | may be removed from the stack by the tail call to scm_fdes_waiting_p. | |
305 | ||
306 | * fports.h (SCM_CLEAR_BUFFERS): new macro. | |
307 | ||
308 | * filesys.c (scm_fsync): use SCM_FDES. | |
309 | ||
310 | * ports.c (scm_force_output): call scm_fflush. | |
311 | ||
312 | * print.c (scm_newline): don't check errno for EPIPE (it wouldn't | |
313 | * reach this point.) don't flush port (if scm_cur_outp). | |
314 | ||
315 | * fports.h (SCM_FPORT_FDES): new macro. | |
316 | ||
317 | * filesys.c (scm_fcntl): get fdes from fport. | |
318 | (set_element, get_element): likewise. | |
319 | ||
320 | * vports.c (sfflush): don't need to set errno. | |
321 | ||
322 | * ports.c: install scm_flush_all_ports to be run on exit. | |
323 | ||
324 | * filesys.c (scm_open): adjust port_mode for O_APPEND and O_CREAT. | |
325 | ||
326 | ports.c fports.c ioext.c posix.c socket.c net_db.c filesys.c: | |
327 | removed all uses of SCM_DEFER/ALLOW ints for now. they were mainly | |
328 | just protecting errno. some may need to be put back. | |
329 | ||
330 | * scmsigs.c (take_signal): save and restore errno while this | |
331 | proc runs. | |
332 | ||
333 | *fports.c (print_pipe_port, local_pclose, scm_pipob): deleted. | |
334 | * open-pipe, close-pipe are emulated in (ice-9 popen) | |
335 | ports.c (scm_ports_prehistory): don't init scm_pipob. | |
336 | ports.h (scm_tc16_pipe): deleted. | |
337 | posix.c (scm_open_pipe, scm_close_pipe): deleted. | |
338 | ||
339 | * ioext.c (scm_primitive_move_to_fdes): use fport. | |
340 | * fport.c (scm_fport_fill_buffer): flush write buffer if needed. | |
341 | change arg type from scm_fport to SCM port. | |
342 | fport.h (SCM_SETFDES): removed. | |
343 | (SCM_MAYBE_DRAIN_INPUT): new macro. | |
344 | ||
345 | * fport.h (struct scm_fport): added 'random'. | |
346 | fport.c (scm_open_file): set random if lseek works. | |
347 | ||
348 | * ioext.c (scm_dup_to_fdes): use SCM_FSTREAM. | |
349 | (scm_ftell): always use lseek and account for the buffer. | |
350 | (scm_fileno): use fport buffer. | |
351 | (scm_fseek): clear fport buffers. always use lseek. | |
352 | ||
353 | * posix.c (scm_pipe): use fport buffer. | |
354 | * unif.c: include fports.h instead of genio.h. | |
355 | * fports.c (scm_fdes_wait_for_input, scm_fport_fill_buffer): new | |
356 | procedures. | |
357 | (local_fgetc): use them. | |
358 | (local_ffwrite): use buffer. | |
359 | (local_fgets): use buffer. | |
360 | (scm_setbuf0): deleted. | |
361 | (scm_setvbuf): set the buffer. | |
362 | (scm_setfileno): deleted. | |
363 | (scm_evict_ports): set fdes directly. | |
364 | * (scm_freopen): deleted. doesn't seem useful in Guile. | |
365 | (scm_stdio_to_port): deleted. | |
366 | fports.h (struct scm_fport): add shortbuf member to avoid separate | |
367 | code for unbuffered ports. | |
368 | (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP): moved | |
369 | from ports.h. | |
370 | ||
371 | * genio.c, genio.h: move contents into ports.c, ports.h. The | |
372 | division wasn't useful. | |
373 | ||
374 | * fports.c, fports.h (scm_fport_drain_input): new procedure. | |
375 | * ports.c (scm_drain_input): call scm_fport_drain_input. | |
376 | * scm_fdes_waiting_p: new procedure. | |
377 | * fports.c (scm_fdes_to_port): allocate read and/or write buffers. | |
378 | (scm_input_waiting_p): check the buffer. | |
379 | (local_fgetc, local_fflush, local_fputc): likewise. | |
380 | ||
381 | * fports.h (scm_fport): read/write_buf,_pos,_buf_end,,_buf_size: | |
382 | new members. | |
383 | * init.c (scm_init_standard_ports): pass fdes instead of FILE *. | |
384 | ||
385 | * * ports.c (scm_drain_input): new procedure. | |
386 | ports.h: prototype. | |
387 | * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY, | |
388 | pre_read, pre_write): removed. | |
389 | (local_fputc, local_fputs, local_ffwrite): use write, not stdio. | |
390 | (scm_standard_stream_to_port): change first arg from FILE * to | |
391 | int fdes. | |
392 | (local_fflush): flush fdes, not FILE *. | |
393 | * fports.h (SCM_NOFTELL): removed. | |
394 | * genio.c, ports.c: don't include filesys.h. | |
395 | * genio.c (scm_getc): don't use scm_internal_select if FPORT. | |
396 | do it in fports.c:local_fgetc. | |
397 | * genio.c: don't use SCM_SYSCALL when calling ptob procedures. | |
398 | do it where it's needed in the port smobs. | |
399 | * filesys.c (scm_input_waiting_p): moved to fports.c, stdio | |
400 | buffer support removed. take SCM arg, not FILE *. | |
401 | * filesys.h: prototype moved too. | |
402 | * fports.c (scm_fdes_to_port): new procedure. | |
403 | (local_fgetc): use read not fgetc. | |
404 | (local_fclose): use close, not fclose. | |
405 | (local_fgets): use read, not fgets | |
406 | * fports.h: prototype for scm_fdes_to_port. | |
407 | * fports.h (scm_fport): new struct. | |
408 | * fports.c (scm_open_file): use open, not fopen. | |
409 | #include fcntl.h | |
410 | * ports.h (struct scm_port_table): change stream from SCM to void *. | |
411 | * ports.c (scm_add_to_port_table): check for memory allocation error. | |
412 | (scm_prinport): remove MSDOS hair. | |
413 | (scm_void_port): set stream to 0 instead of SCM_BOOL_F. | |
414 | (scm_close_port): don't throw errors: do it in fports.c. | |
415 | ||
15631a33 MD |
416 | 1999-06-04 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> |
417 | ||
418 | * numbers.c: Added #include "feature.h". | |
419 | ||
b88c9601 MD |
420 | 1999-05-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
421 | ||
422 | * smob.c, smob.h (scm_make_smob_type): New interface to smob | |
423 | types (supersedes scm_newsmob). | |
424 | (scm_set_smob_mark, scm_set_smob_free, scm_set_smob_print, | |
425 | scm_set_smob_equalp): New functions. Sets smob functions. | |
426 | (SCM_NEWSMOB): New macro. Creates smob objects. | |
427 | (scm_make_smob): New function. Creates smob objects and | |
428 | mallocates memory. | |
429 | (scm_smob_free, scm_smob_print): Default free and print | |
430 | functions. | |
431 | ||
432 | * Makefile.am: Removed markers.c, markers.x, markers.h. | |
433 | ||
434 | * markers.c, markers.h: Removed. (Contents moved to smob.c, | |
435 | smob.h.) | |
436 | ||
437 | * arbiters.c, async.c, regex-posix.c: Use new smob interface. | |
438 | ||
439 | * eval.c, fports.c, libguile.h, ports.c: Removed #include | |
440 | "markers.h". | |
441 | ||
442 | * fluids.c, guardians.c, srcprop.c, threads.c: Added #include | |
443 | "genio.h". | |
444 | ||
445 | * regex-posix.c, regex-posix.h: Renamed scm_tc16_regex_t --> | |
446 | scm_tc16_regex. | |
447 | ||
7c1ce4ee JB |
448 | 1999-05-09 Jim Blandy <jimb@savonarola.red-bean.com> |
449 | ||
e7d37b0a JB |
450 | * strop.c (scm_string_capitalize_x): Use the SCM object `s' in |
451 | error messages, not the uninitialized string `str'. Love that | |
452 | typechecking. | |
453 | ||
454 | * strop.c (scm_substring_move_x): New function, which can handle | |
455 | arbitrary overlapping substrings. | |
456 | (substring-move-left!, substring-move-right!): These are | |
457 | now just synonyms for substring-move!. | |
458 | * strop.h (scm_substring_move_x): New prototype. | |
459 | (scm_substring_move_left_x, scm_substring_move_right_x): | |
460 | #define these as synonyms for scm_substring_move_x. | |
461 | ||
7c1ce4ee JB |
462 | Fixes, cleanups, and new functions from Greg Harvey. |
463 | ||
464 | 1999-05-03 Greg Harvey <Greg.Harvey@thezone.net> | |
465 | ||
466 | * strop.c (scm_string_capitalize_x, scm_string_capitalize): new | |
467 | functions; capitalize the first letter of each word in the | |
468 | argument string, and downcase the rest. | |
469 | (scm_string_ci_to_symbol): string->symbol, such that the same | |
470 | symbol is returned for any argument where the only difference | |
471 | between strings is in capitalization. | |
472 | (scm_string_upcase, scm_string_downcase): non-destructive | |
473 | versions. | |
474 | ||
475 | 1999-01-13 Greg Harvey <Greg.Harvey@thezone.net> | |
476 | ||
477 | * strop.c (scm_substring_move_left_x, scm_substring_move_right_x): | |
478 | changed to use memmove. | |
479 | * strop.c (scm_i_index): removed the pos arguments (it's only | |
480 | called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3, | |
481 | SCM_ARG4). | |
482 | ||
483 | 1999-01-11 Greg Harvey <Greg.Harvey@thezone.net> | |
484 | ||
485 | * strop.h: fixed prototypes. | |
486 | ||
e7d37b0a | 487 | * strop.c (scm_substring_move_left_x, scm_substring_move_right_x): |
7c1ce4ee JB |
488 | changed to have 5 required args, rather than 2 required, and 3 required |
489 | rest args. Also modified to allow str1 & str2 to overlap. | |
490 | (scm_substring_fill_x): changed to 4 args, rather than 2 args and | |
491 | 2 required rest args. | |
492 | ||
b7e13f65 JB |
493 | 1999-05-02 Jim Blandy <jimb@savonarola.red-bean.com> |
494 | ||
495 | * procs.h: Doc fix. | |
496 | ||
497 | * Makefile.am (modinclude_HEADERS): Add kw.h, so the new version | |
498 | gets installed. | |
499 | * Makefile.in: Regenerated. | |
500 | ||
501 | * numbers.c: If we're supporting floating-point, provide the | |
502 | feature "inexact". | |
503 | ||
504 | * scmconfig.h.in: Regenerated; see today's change to | |
505 | ../configure.in. | |
506 | ||
ef0615e4 JB |
507 | 1999-04-17 Jim Blandy <jimb@savonarola.red-bean.com> |
508 | ||
cceae55d JB |
509 | * Makefile.in: Regenerated. |
510 | ||
ef0615e4 | 511 | Remove readline support, to avoid copyright confusion. |
cceae55d | 512 | * Makefile.am: Remove readline files from lists. |
ef0615e4 JB |
513 | * init.c: Don't initialize readline. |
514 | * scmconfig.h.in: Regenerated. | |
515 | ||
516 | * numbers.c (s_bignum): Renamed to s_bignum, and made static. | |
517 | Libguile should not be exporting random little strings. | |
518 | * numbers.h (s_bignum): Extern declaration removed. | |
519 | ||
520 | More const changes from Ken Raeburn. | |
521 | * numbers.c (scm_s_bignum, fx): Now const. | |
522 | (scm_logtab, scm_ilentab, s_adjbig): Now static and const. | |
523 | * numbers.h (scm_s_bignum): Update declaration. | |
524 | * eval.c (bodycheck): Argument WHAT now points to const. | |
525 | * snarf.h (SCM_SYNTAX): Name is const. | |
526 | ||
527 | * eval.c (scm_i_let): Make this globally visible, to avoid dynamic | |
528 | linking crashes on NetBSD. (Thanks to Ken Raeburn.) | |
529 | ||
488325ae MD |
530 | 1999-03-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
531 | ||
532 | * numbers.c (isfinite): Define this macro if not defined: Return a | |
533 | non-zero value if X is finite. (From ISO C 9x standard.) | |
534 | (scm_inexact_to_exact): Bugfix: Don't pass NaNs to scm_dbl2big. | |
535 | (Thanks to Jon Trowbridge and Greg Harvey.) | |
536 | ||
e7367a17 MD |
537 | 1999-03-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
538 | ||
539 | * keywords.c (scm_tc16_kw): Added for backward compatibility. | |
540 | Will be removed in next release. | |
541 | ||
542 | * Makefile.am (modinclude_HEADERS): Added kw.h; | |
543 | ||
544 | * kw.h: New file. | |
545 | ||
546 | * libguile.h: #include "libguile/kw.h" | |
547 | ||
46d83025 MD |
548 | 1999-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
549 | ||
550 | * pairs.c (scm_set_car_x, scm_set_cdr_x): Return SCM_UNSPECIFIED. | |
551 | ||
e059c0b7 MD |
552 | 1999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
553 | ||
437bc84d MD |
554 | * print.c (scm_isymnames): Added #@dispatch and #@hash-dispatch. |
555 | ||
e059c0b7 MD |
556 | * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold): |
557 | Place the table argument last. | |
558 | ||
7e68f448 MD |
559 | 1999-03-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
560 | ||
561 | * modules.c: #include "procprop.h" | |
562 | (scm_system_module_env_p): Assume root environment is no lookup | |
563 | closure is found. | |
564 | ||
4177648e MD |
565 | * debug.c, eval.c, evalext.c, gdbint.c stacks.c: |
566 | #include "modules.h". | |
7e68f448 MD |
567 | |
568 | * modules.c, modules.h, eval.c, eval.h (scm_env_top_level, | |
569 | scm_top_level_env, scm_system_module_env_p): Moved to modules.c. | |
570 | ||
571 | * eval.c, eval.h (scm_top_level_lookup_closure): Removed. | |
572 | ||
cd713a06 MD |
573 | 1999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
574 | ||
575 | * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to | |
576 | scm_misc_error when pos is a string. This allows for dispatching | |
577 | arbitrary error messages with one argument via SCM_ASSERT: | |
578 | SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>); | |
579 | ||
64af44a3 MD |
580 | 1999-03-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
581 | ||
582 | * list.c (scm_reverse): Report an error if given a circular list | |
583 | instead of filling memory. | |
584 | * list.c (scm_reverse_x): Check args. | |
585 | ||
6ee350ad MD |
586 | 1999-03-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
587 | ||
588 | Most of this batch of changes is about how to deal with extended | |
589 | types when an object system is loaded into Guile. A nice object | |
590 | system is capable of representing Guile's types as class objects. | |
591 | ||
592 | For example, we want a regular expression to be of class <regex>. | |
593 | But regular expressions are smobs which aren't under direct | |
594 | control of the object system, so there has to be some mechanism | |
595 | which informs the object system that a new class should be created | |
596 | which can represent the smob type. I call this a "wrapper class". | |
597 | ||
598 | * objects.c: #include "smob.h"; | |
599 | (scm_class_keyword): Removed. (Class is automatically created by | |
600 | make_smob_classes.) | |
601 | (scm_smob_class): Array of smob classes indexed by smobnum. | |
602 | (scm_make_extended_class): "Plugin" function pointer for creation | |
603 | of wrapper classes for smob and struct types. | |
604 | (scm_class_of): Handle compiled closures. (Currently regarded as | |
605 | <procedure>.); | |
606 | Use scm_smob_class to handle smob types; | |
607 | Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword | |
608 | through scm_smob_class; | |
609 | Handle structs. | |
610 | ||
611 | * smob.c (scm_newsmob): Also create a wrapper class if | |
612 | scm_smob_class has been initialized. | |
613 | ||
614 | * smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16 | |
615 | type code and smobnum. | |
616 | ||
617 | * struct.c: #include "alist.h", "weaks.h", "hashtab.h"; | |
618 | (scm_struct_table): Weak key table with auxilliary information for | |
619 | struct types. Currently used for names and wrapper classes. | |
620 | (scm_struct_ihashq): Hash function for structs. | |
621 | (scm_struct_create_handle): Get/create entry in scm_struct_table. | |
622 | (scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures | |
623 | for accessing names of vtables. The record implementation in | |
624 | boot-9.scm currently uses the setter to record the name of record | |
625 | types. When the object system is initialized, it can use this | |
626 | information to create wrapper classes with suitable names. | |
627 | (scm_init_struct): Allocate scm_struct_table. | |
628 | (scm_alloc_struct): Don't initialize scm_struct_i_tag here. | |
629 | (struct tags are a finite resource and we might want to restrict | |
630 | the use of tags to vtables only. E.g., Goops only uses tags for | |
631 | classes.) | |
632 | (scm_make_struct): Use scm_struct_entity_n_extra_words instead of | |
633 | magic number 5. | |
634 | (scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic | |
635 | number -1. | |
636 | ||
637 | * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME, | |
638 | SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros. | |
639 | Used for access of struct table entries. | |
640 | ||
641 | * hashtab.c, hashtab.h (scm_internal_hash_fold): New function. | |
642 | (scm_hash_fold): New procedure. Used to process all entries in a | |
643 | hash table (in no particular order). | |
644 | ||
645 | Argh! For the umpteenth time I got compilation errors because of | |
646 | the "intuitive" name `kw'. This has to have an end: | |
647 | ||
648 | * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced | |
649 | "kw" --> "keywords" everywhere. | |
650 | (I doubt that this will cause big compatibility problems since the | |
651 | application interface is unaffected.) | |
652 | ||
653 | * keywords.c, keywords.h: Files renamed from kw.c, kw.h. | |
654 | ||
71c7d7d6 MD |
655 | 1999-03-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
656 | ||
efdfceea MD |
657 | * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and |
658 | column inums to native form. | |
659 | ||
71c7d7d6 MD |
660 | Improvement of backtraces: Introduces a new stack narrowing |
661 | specifier, #t, for the inner cut. (See further in the comments in | |
662 | stacks.c:narrow_stack ().) | |
663 | ||
664 | * procprop.c, procprop.h (scm_sym_system_procedure): New symbol. | |
665 | (Used to flag certain system procedures which shouldn't turn up in | |
666 | backtraces.) | |
667 | ||
668 | * eval.c (scm_sym_system_module): New symbol. (Used to flag | |
669 | modules which aren't "user" modules and the code of which | |
670 | shouldn't turn up in backtraces.) | |
671 | ||
672 | * eval.c, eval.h (scm_top_level_lookup_closure): New function: | |
673 | Extract the lookup closure from an environment. | |
674 | (scm_system_module_env_p): New function: Return non-#f if MODULE | |
675 | is a system module. | |
676 | ||
677 | * stacks.c: #include "eval.h"; #include "procprop.h"; | |
678 | (narrow_stack): Handle new narrowing specifier #t. | |
679 | ||
680 | * debug.c (scm_procedure_name): Use name property in the default | |
681 | case. | |
fde61308 MD |
682 | |
683 | * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr (). | |
684 | ||
685 | * objects.h (scm_si_redefined, scm_si_hashsets): Shifted. | |
686 | ||
687 | * eval.c, procs.c, procs.h, procprop.c: Renamed getter -> | |
688 | procedure throughout. | |
689 | ||
690 | * print.c (scm_iprin1): Removed extraneous space when printing | |
691 | procedure-with-setters. | |
692 | ||
693 | Entity and operator setter slots were introduced as a complement | |
694 | to the <procedure-with-setter> type in order to support entities | |
695 | and operators with setters in a reasonable and efficient way. | |
696 | * procs.c (scm_procedure, scm_setter): Handle entity and operator | |
697 | setter slots. | |
698 | ||
699 | * objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros. | |
700 | (struct scm_metaclass_operator): New setter slot. | |
701 | ||
702 | * gc.c (scm_gc_mark): Mark struct setter slot. | |
703 | ||
704 | * struct.c (scm_make_struct): Allocate one word more for | |
705 | entities and initialize the new slot. | |
706 | ||
707 | * struct.h (scm_struct_i_setter): New constant. | |
708 | ||
963561f7 MD |
709 | 1999-03-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
710 | ||
fde61308 MD |
711 | * objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots |
712 | directly through the instance. | |
713 | ||
714 | * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF. | |
715 | ||
716 | * gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at | |
717 | scm_struct_i_flags instead of scm_vtable_index_layout! | |
718 | ||
719 | * list.c (scm_list_star): New procedure. | |
720 | ||
963561f7 MD |
721 | 1999-02-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
722 | ||
fde61308 MD |
723 | * debug.c (scm_init_debug): Added scheme level constant |
724 | SCM_IM_DISPATCH. | |
725 | ||
963561f7 MD |
726 | 1999-02-12 Jim Blandy <jimb@savonarola.red-bean.com> |
727 | ||
728 | * __scm.h (SCM_FENCE): Fix `asm volatile' warnings for EGCS. | |
729 | ||
730 | * gc.c (scm_gc_sweep): Properly properly record the size of a | |
731 | freed structure. (Thanks to Greg Harvey.) | |
732 | ||
733 | 1999-02-07 Jim Blandy <jimb@savonarola.red-bean.com> | |
734 | ||
735 | * gc.c (scm_gc_sweep): Properly record the size of a freed | |
736 | structure. (Thanks to Michael Livshin.) | |
737 | ||
738 | 1999-02-06 Jim Blandy <jimb@savonarola.red-bean.com> | |
739 | ||
740 | Readline paren matching from Greg Harvey, with modifications from | |
741 | Mikael Djurfeldt: | |
742 | ||
743 | * readline.c (in_readline, reentry_barrier_mutex): Make these | |
744 | static. | |
745 | ||
746 | * readline.c: #include <sys/time.h> and "iselect.h", so we can | |
747 | control how long we're paused, and threads will run while we're | |
748 | paused. | |
749 | (match_paren, find_matching_paren, init_bouncing_parens): New | |
750 | functions. | |
751 | (scm_init_readline): Call init_bouncing_parens. | |
752 | (scm_readline_opts): Add the bounce-parens option. | |
753 | * readline.h (SCM_READLINE_BOUNCE_PARENS): New readline option. | |
754 | (SCM_N_READLINE_OPTIONS): Adjust. | |
755 | ||
756 | 1999-02-06 Jim Blandy <jimb@zwingli.cygnus.com> | |
757 | ||
758 | All the below are changes from Ken Raeburn, to get Guile to use | |
759 | const where it can. | |
760 | ||
761 | * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums), | |
762 | eval.c (s_expression, s_test, s_body, s_bindings, s_variable, | |
763 | s_clauses, s_formals): Variables now const. | |
764 | ||
765 | * eval.c (promsmob): Now const. | |
766 | * macros.c (macrosmob): Now const. | |
767 | * smob.c (scm_newsmob): Smobfuns argument now points to const. | |
768 | (freecell, flob, bigob): Now const. | |
769 | ||
770 | * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring), | |
771 | error.c (scm_error, scm_syserror, scm_syserror_msg, | |
772 | scm_num_overflow, scm_out_of_range, scm_wrong_type_arg, | |
773 | scm_memory_error, scm_misc_error, scm_wta), macros.c | |
774 | (scm_make_synt), feature.c (scm_add_feature), filesys.c | |
775 | (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc, | |
776 | scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr), | |
777 | numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long, | |
778 | scm_num2long_long, scm_num2ulong), | |
779 | options.c (scm_options), posix.c (scm_convert_exec_args, | |
780 | environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr), | |
781 | ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c | |
782 | (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c | |
783 | (setzone, restorezone, bdtime2c), strop.c (scm_i_index), | |
784 | strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft, | |
785 | scm_intern_obarray, scm_intern, scm_intern0, | |
786 | scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0, | |
787 | scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument | |
788 | indicating calling subr, error message text, reason for error, | |
789 | symbol name or feature name are now pointer to const. | |
790 | * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const. | |
791 | ||
792 | * procs.c (scm_init_iprocs): iproc argument now points to const. | |
793 | * pairs.c (cxrs): Now const. | |
794 | ||
795 | * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h, | |
796 | numbers.h, options.h, procs.h, ramap.h, read.h, smob.h, | |
797 | strports.h, symbols.h, unif.h: Update variable declarations and | |
798 | function prototypes for above changes. | |
799 | ||
800 | * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link, | |
801 | sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and | |
802 | SYMB now point to const. | |
803 | ||
804 | 1999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se> | |
805 | ||
fde61308 MD |
806 | * print.c (scm_iprin1): Use scm_procedure_name instead of |
807 | scm_procedure_property for compiled closures. | |
808 | ||
809 | * tags.h (scm_tc7_pws): New procedure type. Four representations | |
810 | for procedure-with-setters were considered before selecting this | |
811 | one: | |
812 | ||
813 | 1. A closure where the CODE and ENV slots are used to represent | |
814 | the getter and a new SETTER slot is used for the setter. The | |
815 | original getter is stored as a `getter' procedure property. For | |
816 | closure getters, the CODE and ENV slots contains a copy of the | |
817 | getter's CODE and ENV slots. For subr getters, the CODE contains | |
818 | a call to the subr. | |
819 | ||
820 | 2. A compiled closure with a call to the getter in the cclo | |
821 | procedure. The getter and setter are stored in slots 1 and 2. | |
822 | ||
823 | 3. An entity (i.e. a struct with an associated procedure) with a | |
824 | call to the getter in the entity procedure and the setter stored | |
825 | in slot 0. The original getter is stored in slot 1. | |
826 | ||
827 | 4. A new primitive procedure type supported in the evaluator. The | |
828 | getter and setter are stored in a GETTER and SETTER slot. A call | |
829 | to this procedure type results in a retrieval of the getter and a | |
830 | jump back to the correct eval dispatcher. | |
831 | ||
832 | Representation 4 was selected because of efficiency and | |
833 | simplicity. | |
834 | ||
835 | Rep 1 has the advantage that there is zero penalty for closure | |
836 | getters, but primitive getters will get considerable overhead | |
837 | because the procedure-with-getter will be a closure which calls | |
838 | the getter. | |
839 | ||
840 | Rep 3 has the advantage that a GOOPS accessor can be a subclass of | |
841 | <procedure-with-setter>, but together with rep 2 it suffers from a | |
842 | three level dispatch for non-GOOPS getters: | |
843 | ||
844 | cclo/struct --> dispatch proc --> getter | |
845 | ||
846 | This is because the dispatch procedure must take an extra initial | |
847 | argument (cclo for rep 2, struct for rep 3). | |
848 | ||
849 | Rep 4 has the single disadvantage that it uses up one tc7 type | |
850 | code, but the plan for uniform vectors will very likely free tc7 | |
851 | codes, so this is probably no big problem. Also note that the | |
852 | GETTER and SETTER slots can live directly on the heap, using the | |
853 | new four-word cells. | |
854 | ||
855 | * procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER, | |
856 | SCM_SETTER): New macros. | |
857 | (scm_procedure_with_setter_p, scm_make_procedure_with_setter, | |
858 | scm_getter, scm_setter): New procedures. | |
859 | ||
860 | * eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws. | |
861 | ||
862 | * gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for | |
863 | scm_tc7_pws. | |
864 | ||
865 | * objects.c, objects.h (scm_class_of, | |
866 | scm_class_procedure_with_setter): Added. | |
867 | ||
868 | * procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added | |
869 | entry for scm_tc7_pws. | |
870 | ||
871 | * procs.c (scm_procedure_p): Added case label for scm_tc7_pws. | |
872 | ||
963561f7 MD |
873 | 1999-01-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
874 | ||
fde61308 MD |
875 | * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing |
876 | macro. | |
877 | (scm_init_evalext): Call scm_make_gsubr for | |
878 | scm_m_generalized_set_x. | |
879 | ||
880 | * eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET. | |
881 | ||
882 | * eval.h: Declare scm_s_set_x, scm_sym_set_x; | |
883 | ||
884 | * eval.c: Renamed "set" --> "set_x" in various names for | |
885 | consistency of name correspondence between Scheme and C; | |
886 | Renamed scm_i_set_x --> scm_sym_set_x and made global. | |
887 | Renamed s_set_x --> scm_s_set_x and made global. | |
888 | ||
963561f7 MD |
889 | 1999-01-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
890 | ||
fde61308 MD |
891 | * random.c (scm_i_random_bignum): Made independent of endianness. |
892 | ||
963561f7 MD |
893 | 1999-01-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
894 | ||
fde61308 MD |
895 | * eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY. |
896 | (Thanks to Eric Hanchrow.) | |
897 | ||
963561f7 MD |
898 | 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
899 | ||
fde61308 MD |
900 | * objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF. |
901 | ||
902 | * random.c: Bugfix: Retrieve and store most significant 32 bits in | |
903 | different order if the machine is bigendian. | |
904 | (scm_init_random): Added safety check for bignum digit size. | |
905 | ||
ec1bbf39 MD |
906 | 1999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
907 | ||
908 | * random.c, random.h (scm_i_make_rstate): New function: Makes | |
909 | scm_rstate from seed. | |
910 | (scm_copy_random_state, scm_seed_to_random_state): New functions. | |
911 | (scm_make_random_state): Removed. | |
912 | ||
913 | * random.c (scm_make_random_state): Use scm_i_make_rstate(). | |
914 | ||
efe5e0ef MD |
915 | 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
916 | ||
917 | * random.c: Bugfix: Retrieve and store most significant 32 bits in | |
918 | different order if the machine is bigendian. | |
919 | (scm_init_random): Added safety check for bignum digit size. | |
920 | ||
a40bd532 MD |
921 | 1999-01-11 Roland Orre <mdj@mdj.nada.kth.se> |
922 | ||
923 | * sort.c (scm_merge, scm_merge_list_x): Bugfix: Place elements | |
924 | from first arg before equal elements in second arg in result. | |
925 | (scm_merge_list_step): Bugfix: Don't presume that arguments in a C | |
926 | function call are executed in a well defined order. | |
927 | ||
94baa3b2 JB |
928 | 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com> |
929 | ||
930 | * alloca.c (alloca): Cast value returned by malloc. (Thanks to | |
931 | Christian Lynbech.) | |
932 | ||
922363f5 MD |
933 | 1999-01-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
934 | ||
935 | * random.c: Removed alloca includes. | |
936 | ||
f7677ff2 JB |
937 | 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com> |
938 | ||
939 | * Makefile.in: This changed, for some reason I don't really | |
940 | understand, when I ran automake in the top level directory. This | |
941 | may be contamination by Cygnus internal releases. If you re-run | |
942 | automake and this change gets reverted, don't worry about it. | |
943 | ||
7a5bee23 MD |
944 | 1999-01-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
945 | ||
946 | * sort.c, sort.h: New files: Implement slib's and scsh's sort | |
f7677ff2 | 947 | interfaces. Author: Roland Orre. |
7a5bee23 MD |
948 | |
949 | * Makefile.am: Added sort.c, sort.h, sort.x. | |
950 | ||
951 | * init.c: #include "sort.h"; | |
952 | (scm_boot_guile_1): Call scm_init_sort (). | |
953 | ||
954 | * numbers.h: Added #include "libguile/print.h". | |
955 | ||
956 | * numbers.c: Formatted according to Guile conventions; | |
957 | Renamed s_bignum --> scm_s_bignum. | |
958 | ||
959 | * random.c, random.h: New files: Random number support. | |
960 | Interface same as slib's. | |
961 | ||
962 | * Makefile.am: Added random.c, random.h, random.x. | |
963 | ||
964 | * init.c: #include "random.h"; | |
965 | (scm_boot_guile_1): Call scm_init_random (). | |
966 | ||
0c03eafd MD |
967 | 1998-12-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
968 | ||
969 | * Makefile.am: New files: guardians.c, guardians.x, guardians.h | |
970 | ||
971 | * guardians.c, guardians.h (scm_make_guardian, | |
972 | scm_guardian_gc_init, scm_guardian_zombify, scm_guard, | |
973 | scm_get_one_zombie, scm_init_guardian): This is an implementation | |
974 | of guardians as described in R. Kent Dybvig, Carl Bruggeman, and | |
975 | David Eby (1993) "Guardians in a Generation-Based Garbage | |
976 | Collector" ACM SIGPLAN Conference on Programming Language Design | |
977 | and Implementation, June 1993 ftp://ftp.cs.indiana.edu | |
978 | /pub/scheme-repository/doc/pubs/guardians.ps.gz | |
979 | Author: Michael N. Livshin. | |
980 | ||
981 | * gc.h (SCM_MARKEDP, SCM_NMARKEDP): New macros. | |
982 | ||
983 | * gc.c (scm_igc): Call scm_guardian_gc_init and | |
984 | scm_guardian_zombify. | |
985 | ||
986 | * init.c (scm_boot_guile_1): Call scm_init_guardian. | |
987 | ||
d0c2c0c0 MD |
988 | 1998-12-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
989 | ||
990 | * macros.c (scm_makacro, scm_makmacro, scm_makmmacro): Added | |
991 | argument checking. | |
992 | ||
7f0a6a69 MD |
993 | 1998-12-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
994 | ||
995 | Move the procedure slots of entities to invisible slots (so that | |
996 | we can have operator class objects which themselves are entities). | |
997 | * struct.h (scm_struct_i_proc, scm_struct_i_flags, | |
998 | SCM_STRUCTF_ENTITY): New constants. | |
999 | ||
1000 | * struct.c (scm_make_struct): Allocate "invisible" room for | |
1001 | procedures if SCM_STRUCTF_ENTITY is set in vtable. | |
1002 | ||
1003 | * gc.c (scm_gc_mark): Mark entity procedures. | |
1004 | ||
1005 | * struct.c, struct.h (scm_alloc_struct): Renamed from alloc_struct | |
1006 | and made global. | |
1007 | (scm_struct_init): Renamed from init_struct and made global. | |
1008 | ||
1009 | * objects.h (SCM_ENTITY, scm_entity): Removed. | |
1010 | (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, | |
1011 | SCM_ENTITY_PROC_3): Adjusted for new location of procedure slots. | |
1012 | ||
b8229a3b MS |
1013 | Mon Dec 14 18:10:12 1998 Maciej Stachowiak <mstachow@mit.edu> |
1014 | ||
1015 | * snarf.h (SCM_SYNTAX): New macro to allow convenient declaration | |
1016 | of syntactic forms, similar to SCM_PROC. | |
1017 | * debug.c, eval.c, evalext.c: use SCM_SYNTAX to declare all special | |
1018 | forms, and SCM_SYMBOL or SCM_GLOBAL_SYMBOL to delcare C variables | |
1019 | for the name symbols when needed. | |
1020 | ||
333a4791 JB |
1021 | 1998-12-14 Jim Blandy <jimb@zwingli.cygnus.com> |
1022 | ||
1023 | * Makefile.in: Regenerated. | |
1024 | ||
715fad68 JB |
1025 | 1998-12-05 Jim Blandy <jimb@zwingli.cygnus.com> |
1026 | ||
1027 | * pairs.h (SCM_NEWCELL): When DEBUG_FREELIST is defined, don't | |
1028 | take the address of _into; it might be a register. Just have | |
1029 | scm_debug_newcell return the new cell. | |
1030 | * gc.c (scm_debug_newcell): Just return the new cell, instead of | |
1031 | taking the address of a place to store it as an argument. | |
1032 | * gc.h (scm_debug_newcell): Change declaration. | |
1033 | (Thanks to Greg Harvey.) | |
1034 | ||
67ad463a MD |
1035 | 1998-12-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1036 | ||
1037 | * ramap.c (array-copy-in-order!, array-map-in-order): New names. | |
1038 | Replaces old names serial-array-copy! and serial-array-map!. | |
1039 | ||
1040 | * evalext.c (map-in-order): New name. Replaces serial-map. | |
1041 | ||
67ea079d JB |
1042 | 1998-12-05 Jim Blandy <jimb@totoro.red-bean.com> |
1043 | ||
1044 | * smob.c (freeprint): New function. | |
1045 | (freecell): Use it to print freed objects, for slightly easier | |
1046 | debugging. | |
1047 | ||
6ab397f4 MD |
1048 | 1998-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1049 | ||
1050 | * backtrace.c (display_frame): Made more robust. Doesn't throw an | |
1051 | error if no source properties can be found for a frame. (Thanks | |
1052 | to Christian Lynbech.) | |
1053 | ||
afae5cbd MD |
1054 | 1998-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1055 | ||
1056 | * objects.h: Removed slots direct_supers and direct_slots from the | |
1057 | definitions of the rudimentary classes described by objects.h. | |
1058 | ||
1059 | * objects.c, objects.h (scm_entity_p): New procedure. Together | |
1060 | with the predicates scm_procedure_p and scm_struct_p, this | |
1061 | predicate makes it possible to differ between structs, entities | |
1062 | and operators. | |
1063 | ||
1064 | * modules.c, modules.h (scm_resolve_module): New function. | |
1065 | ||
3763ac3c MD |
1066 | 1998-11-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1067 | ||
afae5cbd MD |
1068 | * objects.h (SCM_METACLASS_STANDARD_LAYOUT, |
1069 | SCM_METACLASS_OPERATOR_LAYOUT): Removed slots `direct_supers' and | |
1070 | `direct_slots'. | |
1071 | ||
1072 | * objects.c (scm_entity_p): New procedure. | |
1073 | ||
3763ac3c MD |
1074 | * procprop.c (scm_i_procedure_arity): Bugfix: Return correct value |
1075 | for asubrs, rpsubrs, lsubrs and lsubr_2s. | |
1076 | ||
0d2e4c1b MD |
1077 | 1998-11-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1078 | ||
1079 | * procprop.h (scm_i_procedure_arity): Added declaration. | |
1080 | ||
1081 | * procprop.c (scm_i_procedure_arity): Made global; New code to | |
1082 | handle operators and entities. | |
1083 | (scm_procedure_property): No need to call scm_procedure_p since | |
1084 | scm_i_procedure_arity now does all necessary type checking. | |
1085 | Added #include "objects.h". | |
1086 | ||
1087 | * feature.c (scm_remove_hook_x): Bugfix: Changed reference to | |
1088 | s_add_hook_x --> s_remove_hook_x. | |
1089 | (scm_add_hook_x, scm_remove_hook_x): Hooks now takes arguments. | |
1090 | Added #include "procprop.h" | |
1091 | ||
1092 | * feature.c, feature.h (scm_reset_hook_x): New procedure. | |
1093 | (scm_make_hook): Optional argument defines number of arguments to | |
1094 | the hook. | |
1095 | (scm_make_named_hook): Take number of args as second arg. | |
3763ac3c MD |
1096 | (scm_run_hook): Renamed from scm_run_hooks (old name defined in |
1097 | boot-9.scm for a while); First arg is the hook. The rest are | |
1098 | arguments passed on to the hook procedures. | |
0d2e4c1b | 1099 | |
69c6acbb JB |
1100 | 1998-11-23 Jim Blandy <jimb@zwingli.cygnus.com> |
1101 | ||
1102 | * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest, | |
1103 | scm_logbit_p): Do the computation in ulongs. This is not as nice | |
1104 | as doing it in bignums, but at least it's good enough for | |
1105 | manipulating flags in 32-bit words. (Thanks to Jim Wilson.) | |
1106 | ||
1107 | * regex-posix.c (scm_regexp_exec): Reliably mark unmatched | |
1108 | subexpressions. (Thanks to Charbel Jacquin.) | |
1109 | ||
a56eeb46 MD |
1110 | 1998-11-23 Mikael Djurfeldt <mdj@kenneth> |
1111 | ||
1112 | * feature.c, feature.h (scm_make_hook, scm_add_hook_x, | |
1113 | scm_remove_hook_x, scm_run_hooks): Moved from ice-9/boot-9.scm. | |
1114 | (scm_make_named_hook): New function. | |
1115 | ||
1116 | * feature.c: Added #include "eval.h". | |
1117 | ||
1118 | * modules.c (scm_make_module): Beautify the module. | |
1119 | ||
7e414627 MD |
1120 | 1998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1121 | ||
1122 | * modules.c, modules.h: New files: C interface to modules. (This | |
1123 | is necessary in order to interface the object system to Guile | |
1124 | properly. The guts of these modules will be replaced by the new | |
1125 | module system in the future.) | |
1126 | ||
1127 | * init.c: Added #include "modules.h" | |
1128 | (scm_boot_guile_1): Call scm_init_modules. | |
1129 | (invoke_main_func): Call scm_post_boot_init_modules. | |
1130 | ||
1131 | * Makefile.am: Added modules.c, modules.x, modules.h. | |
1132 | ||
17621f3e MD |
1133 | 1998-11-22 Mikael Djurfeldt <mdj@kenneth> |
1134 | ||
1135 | * procs.c: #include "objects.h" | |
1136 | (scm_procedure_p): Return #t also on structs which are operators. | |
1137 | ||
1138 | * objects.c (scm_init_objects): Renamed <standard-metaclass>, | |
1139 | <operator-metaclass> and <entity-class> to <standard-class>, | |
1140 | <operator-class> and <entity> in order to conform with STKlos | |
1141 | naming conventions. | |
1142 | ||
1143 | * eval.c (SCM_CEVAL): Jump to badfun if trying to apply a struct | |
1144 | which isn't an operator. | |
1145 | (SCM_APPLY): Ditto, but jump to badproc. | |
1146 | ||
aa00bd1e MD |
1147 | 1998-11-21 Mikael Djurfeldt <mdj@kenneth> |
1148 | ||
1149 | * eval.c (SCM_CEVAL): Allow structs implanted in code. | |
1150 | Previously, structs implanted in code were interpreted as forms | |
1151 | the operator of which was a gloc. We solve this by checking for | |
1152 | the zero in the emulated vcell in the struct vtable. Since | |
1153 | implanted structs always will look like forms with a gloc | |
1154 | operator, execution will only be slowed down by maximally one | |
1155 | extra test-and-branch per application. | |
1156 | ||
1157 | * evalext.c (scm_definedp): Removed check for isyms; Added a | |
1158 | second optional argument: It is now possible to supply an | |
1159 | evaluation environment in which to look for the symbol. | |
1160 | ||
b322f09a MD |
1161 | 1998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1162 | ||
1163 | * readline.c (scm_init_readline): Set | |
1164 | rl_basic_word_break_characters. (Thanks to Ian Grant.) | |
1165 | ||
1166 | * coop.c (coop_condition_variable_wait): Removed | |
1167 | (coop_condition_variable_wait_mutex): Folded logic of | |
1168 | coop_mutex_unlock into coop_condition_variable_wait_mutex to | |
1169 | prevent condvar signal lossage. Previously, another thread could | |
1170 | start to run after unlocking the mutex but before putting the | |
1171 | current thread on the wait queue. If that thread then would | |
1172 | signal the first, the signal would be lost. (Thanks to Christian | |
1173 | Lynbech.) | |
1174 | ||
224822be MD |
1175 | 1998-11-17 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1176 | ||
1177 | * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to | |
1178 | Christian Lynbech.) | |
1179 | ||
036737fc MD |
1180 | 1998-11-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1181 | ||
1182 | * objects.c (scm_i_make_class_object): Renamed from | |
1183 | make_class_object; exported; error checking moved to | |
1184 | scm_make_class_object and scm_make_subclass_object. | |
1185 | (scm_make_class_object, scm_make_subclass_object): Use | |
1186 | scm_i_make_class_object. | |
1187 | (scm_make_subclass_object): Let the subclass have same metaclass | |
1188 | as the superclass. | |
1189 | ||
a6e350dd MD |
1190 | 1998-11-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1191 | ||
1192 | * debug.c (scm_debug_options): Bugfix: Set the value of | |
1193 | scm_stack_checking_enabled_p after setting debug options; | |
1194 | #include "stackchk.h". (Thanks to Richard Polton.) | |
1195 | ||
9879d0f1 RS |
1196 | 1998-11-13 Radey Shouman <rshouman@metro2000.com> |
1197 | ||
1198 | * unif.c (scm_array_contents): removed unnecessary test for 0 | |
1199 | base. | |
1200 | ||
88be72ac MD |
1201 | 1998-11-13 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1202 | ||
1203 | * evalext.c, evalext.h (scm_m_sequence_to_list): Removed. | |
1204 | Replaced by macro `collect' in boot-9.scm. | |
1205 | ||
ad3ff75b MD |
1206 | 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1207 | ||
1208 | * eval.c (scm_copy_tree): Copy source properties if existent. | |
1209 | ||
1210 | * debug.c (scm_start_stack): Copy source when evaluating. (If we | |
1211 | don't, we may end up passing memoized source to a transformer.) | |
1212 | ||
29672a5c MD |
1213 | 1998-11-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1214 | ||
7a13c3ae MD |
1215 | * stack.c (get_applybody): Help function which lookups the first |
1216 | body form of the apply closure. | |
1217 | (read_frames): Prevent the source of the first form of the apply | |
1218 | closure from being recorded. This would only be confusing. | |
e40a5fc8 | 1219 | |
29672a5c MD |
1220 | * debug.h (SCM_SET_MACROEXP, SCM_CLEAR_MACROEXP, SCM_MACROEXPP): |
1221 | Replaces SCM_MACROFRAME, SCM_MACROFRAMEP. | |
1222 | ||
1223 | * eval.c (SCM_CEVAL): Use SCM_SET/CLEAR_MACROEXP. | |
1224 | ||
1225 | * stacks.c (read_frame): Bugfix: Removed lingering `else' | |
1226 | statement. | |
1227 | (read_frames): Use SCM_MACROEXPP. | |
1228 | ||
56977059 | 1229 | 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
7c939801 MD |
1230 | |
1231 | * stacks.c (read_frames): Skip gsubr frames in backtraces. (They | |
1232 | don't contain interesting information since all arguments are | |
1233 | present in the frame which applies the compiled closure anyway.); | |
1234 | Skip the transformer application frames. | |
56977059 MD |
1235 | |
1236 | * print.c (scm_iprin1): Print gsubrs as primitives. | |
1237 | ||
fc4c5795 MD |
1238 | 1998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1239 | ||
1240 | * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type. | |
1241 | ||
1242 | * eval.c (SCM_CEVAL): Mark macro frames at `handle_a_macro' so | |
1243 | that we can identify these in a backtrace. (This change doesn't | |
1244 | introduce any significant speed penalty.) | |
1245 | ||
1246 | * eval.c: Added note about `serial-map' using scm_map. | |
1247 | ||
1248 | * read.c, read.h (scm_read_options, scm_read_opts): Removed | |
1249 | readline options. They should reside in their own options array. | |
1250 | ||
1251 | * readline.c, readline.h (scm_readline_options, | |
1252 | scm_readline_opts): Moved readline options here. | |
1253 | ||
68d15e3e MD |
1254 | 1998-11-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1255 | ||
1256 | * readline.c (scm_read_history, scm_write_history): Bugfix: Use | |
1257 | SCM_ROCHARS instead of SCM_CHARS. | |
1258 | ||
1259 | * ports.c (scm_unread_string): Bugfixes: Check for SCM_STRINGP, | |
1260 | not SCM_ROSTRINGP; use SCM_ROUCHARS instead of SCM_UCHARS. | |
1261 | ||
44e0a162 MD |
1262 | 1998-11-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1263 | ||
1264 | * ports.h (SCM_CUC): #define as ~SCM_CRDY instead of 0x001fffffL. | |
1265 | This is quite important since the latter clears the | |
1266 | FPORT_READ_SAFE and FPORT_WRITE_SAFE flags causing flushes at | |
1267 | every single character read... | |
1268 | ||
99317654 MD |
1269 | 1998-11-03 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1270 | ||
1271 | * print.c (scm_iprin1): Removed suspect looking (and indeed | |
1272 | malevolent) semicolon after test for user supplied closure print | |
1273 | procedure. (Thanks to Telford Tendys.) | |
1274 | ||
1275 | * list.c (scm_sloppy_memq): Removed sloppy_mem_check. | |
1276 | (scm_memq, scm_memv, scm_member): Do argument checking *before* | |
1277 | starting to search the list. Removed call to sloppy_mem_check. | |
1278 | ||
1279 | * list.c, list.h (scm_delq1_x, scm_delv1_x, scm_delete1_x): New | |
1280 | procedures: Same as scm_delq_x et al, but delete maximally one | |
1281 | element. | |
1282 | ||
1283 | * options.c (scm_options, scm_init_options): GC-protect option | |
1284 | values of type SCM. (Thanks to Telford Tendys.) | |
1285 | ||
d0b7bad7 MD |
1286 | 1998-11-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1287 | ||
1288 | * eval.c: Don't #define scm_lookupcar to scm_lookupcar1. Instead | |
1289 | make sure that there always is a "real" scm_lookupcar. | |
1290 | ||
9cb84fbb MD |
1291 | 1998-11-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1292 | ||
69c6acbb JB |
1293 | * read.c, read.h (scm_read_opts): New read options |
1294 | "history-length" and "history-file". | |
9cb84fbb MD |
1295 | (scm_read_options): Stifle history to history length. |
1296 | ||
69c6acbb | 1297 | * readline.c (scm_read_history, scm_write_history): New procedures. |
9cb84fbb | 1298 | |
4ecb8428 MD |
1299 | 1998-10-31 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1300 | ||
1301 | * eval.h (scm_macro_eval_x): Removed declaration. | |
1302 | ||
1303 | * eval.c (scm_s_expression, scm_s_test, scm_s_body, | |
1304 | scm_s_bindings, scm_s_variable, scm_s_clauses, scm_s_formals): | |
1305 | Renamed and made global. | |
1306 | ||
1307 | * eval.c, eval.h (SCM_EVALIM): Renamed from EVALIM. | |
1308 | (SCM_XEVAL, SCM_XEVALCAR): Renamed from XEVAL, XEVALCAR. | |
1309 | ||
1310 | * evalext.c, evalext.h: New files. Contain non-R5RS things | |
1311 | having to do with evaluation. | |
1312 | ||
fc4c5795 MD |
1313 | * evalext.c (scm_serial_map): New procedure: Version of `map' |
1314 | which guarantees that the procedure is applied to the lists in | |
1315 | serial order. | |
1316 | (scm_m_sequence_to_list): New syntax: Version of `begin' which | |
1317 | returns a list of the results of the body forms instead of the | |
1318 | result of the last body form. | |
4ecb8428 MD |
1319 | (scm_definedp, scm_m_undefine): Moved from eval.c |
1320 | ||
1321 | * evalext.h (scm_m_sequence_to_list): Added declaration. | |
1322 | ||
1323 | * macros.c, macros.h: New files. | |
fc4c5795 MD |
1324 | (scm_procedure_to_syntax, scm_procedure_to_macro, |
1325 | scm_procedure_to_memoizing_macro, scm_macro_p, scm_macro_type, | |
1326 | scm_macro_name, scm_macro_transformer): Moved from eval.c | |
4ecb8428 MD |
1327 | (scm_make_synt): Moved from eval.c |
1328 | ||
69c6acbb | 1329 | * procs.c, procs.h (scm_procedure_documentation): Moved from eval.c. |
4ecb8428 MD |
1330 | |
1331 | * init.c (scm_boot_guile_1): Added calls to scm_init_macros and | |
1332 | scm_init_evalext. | |
1333 | ||
1334 | * Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h. | |
1335 | ||
35c96965 MD |
1336 | * debug.c, print.c: Added #include "macros.h". |
1337 | ||
4d362308 MD |
1338 | 1998-10-29 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1339 | ||
1340 | This change adds the ability to use `unread-char' multiple times | |
1341 | without interspersed reads and adds the new procedure | |
1342 | `unread-string'. The change is optimized for the common case of | |
1343 | unreading a single character. This is also the reason behind the | |
1344 | choice to store characters in the port itself: in most cases no | |
1345 | extra malloc is required. | |
1346 | ||
1347 | The amount of code in some macros in ports.h has been increased to | |
1348 | the extent that they would fit better as C functions, but, since | |
1349 | this code belongs to the port representation, such functions | |
1350 | should be placed in ports.c which would cause calls back and forth | |
1351 | between ports.c and genio.c. That is not good for performance. | |
1352 | Also, keeping them as macros allows the compiler to do some | |
1353 | optimizations which are needed to make the current interface | |
1354 | (SCM_CRDYP, SCM_CGETUN, SCM_TRY_CLRDY) efficient. | |
1355 | ||
1356 | One benchmark (Guile startup time) indicates an increase of | |
1357 | loading speed of 1%. Another (reading (using `read') boot-9.scm | |
1358 | 10 times) shows no change in performance. | |
1359 | ||
1360 | (Caveat: Since Gary is redesigning I/O anyway, no big efforts were | |
1361 | made to find a beautiful solution.) | |
1362 | ||
1363 | * ports.h (SCM_CLRDY, SCM_CUNGET, SCM_CGETUN): Rewritten. | |
1364 | (SCM_TRY_CLRDY): New macro: Only clear the first unread | |
1365 | character. (SCM_CLRDY clears all.) | |
1366 | (SCM_N_READY_CHARS): New macro: Returns number of unread | |
1367 | characters in a port. Returns wrong answer if SCM_CRDYP is false. | |
1368 | (struct scm_port_table): New fields: `entry' contains port table | |
1369 | index, `cp' points to last unread char, `cbuf' is the buffer for | |
1370 | unread chars, `cbufend' points after end of the character buffer. | |
1371 | ||
1372 | * ports.h, ports.c (scm_unread_string): New procedure. | |
1373 | (scm_grow_port_cbuf): New function. | |
1374 | ||
1375 | * ports.c (scm_add_to_port_table, scm_remove_from_port_table): | |
1376 | Handle new fields. | |
1377 | (scm_generic_fgets), fports.c (local_fgets): Use a loop | |
1378 | to read unread characters. Use SCM_TRY_CLRDY instead of | |
1379 | SCM_CLRDY. | |
1380 | ||
1381 | * ioext.c (scm_ftell): Use SCM_N_READY_CHARS to correct position. | |
1382 | ||
1383 | * genio.c (scm_getc): Use SCM_TRY_CLRDY instead of SCM_CLRDY. | |
1384 | ||
1385 | * genio.c, genio.h (scm_ungets): New function. | |
1386 | ||
1387 | * genio.c (scm_puts): Removed mysterious TRANSCRIPT_SUPPORT code | |
1388 | sections. | |
1389 | ||
22c88b3f MD |
1390 | 1998-10-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
1391 | ||
1392 | * threads.h (scm_thread_sleep, scm_thread_usleep): Fixed | |
1393 | declarations. (Thanks to Russ McManus.) | |
1394 | ||
3ffc7a36 MD |
1395 | 1998-10-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1396 | ||
1397 | * numbers.c (num2long): As a software archeologist, I'm proud of | |
1398 | this finding! :) Preliminary dating suggests an almost 4 year old | |
1399 | remnant from the SCM ancestor. The sample has been removed from | |
1400 | the finding site and is now safely stored in the repository. | |
1401 | ||
1402 | * numbers.h: Removed prototype for num2long. | |
1403 | ||
1404 | * unif.c (scm_array_set_x): Use scm_num2long instead of num2long. | |
1405 | ||
1406 | * gh_data.c (gh_scm2doubles): Make it possible to pass result | |
1407 | array as second arg. | |
1408 | (gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars, | |
1409 | gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions. | |
1410 | * gh.h: Updated and added prototypes. | |
1411 | ||
1412 | * gh_data.c (gh_ints2scm): Handle integers outside INUM limits. | |
1413 | ||
cc720f64 JB |
1414 | 1998-10-24 Jim Blandy <jimb@zwingli.cygnus.com> |
1415 | ||
1416 | * gc.h: Remove all uses of SCM_P. (Thanks to Richard Polton.) | |
1417 | ||
1418 | * guile-snarf.in: Never generate an empty file. (Thanks to | |
1419 | Richard Polton.) | |
1420 | ||
1421 | * gh.h (gh_enter, gh_new_procedure0_0, gh_new_procedure0_1, | |
1422 | gh_new_procedure0_2, gh_new_procedure1_0, gh_new_procedure1_1, | |
1423 | gh_new_procedure1_2, gh_new_procedure2_0, gh_new_procedure2_1, | |
1424 | gh_new_procedure2_2, gh_new_procedure3_0, gh_new_procedure4_0, | |
1425 | gh_new_procedure5_0): Specify argument types, to appease C++ | |
1426 | compilers. (Thanks to Brad Bowman.) | |
1427 | ||
1428 | Bug reports from Russ McManus: | |
1429 | * guile-snarf.in: If the CPP environment variable is set, use that | |
1430 | as the C preprocessor, instead of the preprocessor autoconf | |
1431 | found. | |
1432 | * snarf.h (SCM_PROC): Cast the function pointer passed to | |
1433 | scm_make_gsubr, to satisfy C++. | |
1434 | ||
1435 | * gh_eval.c (gh_eval_str_with_catch, gh_eval_file_with_catch): | |
1436 | Use the handler passed, instead of ignoring it and using | |
1437 | gh_standard_handler. (Thanks to Etienne Bernard.) | |
1438 | ||
5469b4a1 JB |
1439 | 1998-10-20 Jim Blandy <jimb@zwingli.cygnus.com> |
1440 | ||
1441 | * ports.h: Put text after #endif in comment. (Thanks to Nicolas | |
1442 | Neuss.) | |
1443 | ||
f4be1689 JB |
1444 | 1998-10-19 Jim Blandy <jimb@zwingli.cygnus.com> |
1445 | ||
1f6fe22a JB |
1446 | * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c, |
1447 | continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h, | |
1448 | dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h, | |
1449 | feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h, | |
1450 | genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c, | |
1451 | hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h, | |
1452 | list.c, list.h, load.c, load.h, mallocs.c, markers.c, | |
1453 | mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c, | |
1454 | ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c, | |
1455 | procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c, | |
1456 | regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c, | |
1457 | script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c, | |
1458 | srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h, | |
1459 | strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c, | |
1460 | symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c, | |
1461 | vectors.c, vectors.h, version.h, vports.c, weaks.c: Update | |
1462 | copyright years. | |
1463 | ||
f4be1689 JB |
1464 | * script.c (scm_compile_shell_switches): Define |
1465 | use-emacs-interface in the root module, so the repl code can see | |
1466 | it. See today's change to top-repl in ice-9/boot-9.scm. | |
1467 | ||
1468 | * filesys.c (set_element, get_element): Make sure that `element' | |
1469 | is a cell before applying SCM_FPORTP to it. (Thanks to Jost | |
1470 | Boekemeier and Jorgen "forcer" Schaefer.) | |
1471 | ||
1472 | 1998-10-18 Jim Blandy <jimb@zwingli.cygnus.com> | |
1473 | ||
1474 | * chars.c (scm_charnames): In ASCII character name table, make | |
1475 | newlines print as #\newline by default, not #\nl. | |
1476 | ||
1477 | * Makefile.am (libguile_la_SOURCES, BUILT_SOURCES): Put these in | |
1478 | alphabetical order. Oh thrills. But it helps me know how far | |
1479 | along in the compilation I am. | |
1480 | * Makefile.in: Regenerated. | |
1481 | ||
05c33d09 MD |
1482 | 1998-10-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1483 | ||
1484 | * unif.c (scm_raprin1): Changed print syntax for byte vectors from | |
1485 | #bytes(...) to #y(...), and syntax for short vectors from | |
1486 | #short(...) to #h(...). This may seem nutty, but, like the other | |
1487 | uniform vectors, byte vectors and short vectors want to have the | |
1488 | same print and read syntax (and, more basic, want to have read | |
1489 | syntax!). Changing the read syntax to use multiple characters | |
1490 | after the hash sign breaks with the conventions used in R5RS and | |
1491 | the conventions used for the other uniform vectors. It also | |
1492 | introduces complexity in the current reader, both on the C and | |
1493 | Scheme levels. (The Right solution is probably to change the | |
1494 | syntax and prototypes for uniform vectors entirely.) | |
1495 | ||
1aab20ac JB |
1496 | 1998-10-17 Jim Blandy <jimb@savonarola.red-bean.com> |
1497 | ||
1498 | Don't use local_fgets on sockets; ftell doesn't work on sockets. | |
1499 | (Thanks to Jorgen "forcer" Schaefer.) | |
1500 | * ports.h (SCM_NOFTELL): New flag. | |
1501 | * fports.c (local_fgets): If it's set, use the generic fgets. | |
1502 | * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce. | |
1503 | ||
97c524bd MD |
1504 | 1998-10-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
1505 | ||
1506 | * script.c (scm_compile_shell_switches): Add handling of -q switch | |
1507 | (inhibit loading of user init file). | |
1508 | (scm_shell_usage): Add usage text for -q switch. | |
1509 | (scm_compile_shell_switches): Always load user init file first if | |
1510 | it is loaded at all. | |
1511 | ||
70445040 JB |
1512 | 1998-10-16 Jim Blandy <jimb@zwingli.cygnus.com> |
1513 | ||
1514 | * stime.c: The CPP hair to determine a value for CLKTCK is weird, | |
1515 | and is now broken under NetBSD. I can't fathom what it's trying | |
1516 | to do, so I've replaced it with something that I do understand, | |
1517 | which seems to work, and which isn't broken on NetBSD. "Progress? | |
1518 | You Decide." (Thanks to Perry Metzger.) | |
1519 | ||
1520 | * regex-posix.c (scm_regexp_exec): Add a cast to remove a | |
1521 | signed/unsigned comparison. | |
1522 | ||
6e6e2bbc JB |
1523 | 1998-10-15 Jim Blandy <jimb@zwingli.cygnus.com> |
1524 | ||
1525 | Warning fixes from Greg Harvey: | |
1526 | * unif.c (scm_array_set_x): initializer for pos | |
1527 | * throw.c (scm_ithrow): added initializer for jmpbuf (SCM_UNDEFINED) | |
1528 | * struct.c (scm_struct_ref, scm_struct_set_x): Added | |
1529 | initializers for field_type, since EGCS so desparately wants to | |
1530 | play dumb | |
1531 | * debug.h (scm_make_gloc, scm_gloc_p, scm_make_iloc, scm_memcons, | |
1532 | scm_mem_to_proc, scm_proc_to_mem, scm_debug_hang): Added prototypes | |
1533 | when GUILE_DEBUG is defined. | |
1534 | * dynwind.h (scm_wind_chain): Same. | |
1535 | * ports.h (scm_pt_size, scm_pt_member): Same. | |
1536 | * print.h (scm_current_pstate): Same. | |
1537 | * procs.h (scm_make_cclo): Same. | |
1538 | ||
eebc12c6 JB |
1539 | 1998-10-14 Jim Blandy <jimb@zwingli.cygnus.com> |
1540 | ||
a437d8a2 JB |
1541 | Handle short and long long uniform arrays properly. (Thanks to |
1542 | Clark McGrew.) | |
1543 | * ramap.c (scm_ra_matchp, scm_array_fill_int, scm_array_index_map_x, | |
1544 | raeql_1): Add cases for scm_tc7_svect (short vectors) and | |
1545 | scm_tc7_llvect (long long vectors). | |
1546 | ||
1547 | Change the way libguile and boot-9.scm are timestamped, to try to | |
1548 | get rid of these spurious mismatch warnings. Now both | |
1549 | libguile/versiondat.h and ice-9/version.scm are generated directly | |
1550 | by the configuration process, rather than having version.scm | |
1551 | generated directly, and libguile/versiondat.h generated by the | |
1552 | Makefile, which is generated by configure. It seems that | |
1553 | sometimes the Makefile would change, but versiondat.h depends on | |
1554 | Makefile.in, not Makefile, so it wouldn't get rebuilt. | |
1555 | * Makefile.am (versiondat.h): Target removed; this is generated | |
1556 | directly by the configure script now. | |
1557 | (BUILT_SOURCES): Remove versiondat.h. | |
1558 | * versiondat.h.in: New file, transformed by the configure script | |
1559 | into versiondat.h. | |
1560 | * Makefile.in: Regenerated. | |
1561 | ||
731a0a68 JB |
1562 | * (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c, |
1563 | options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS -> | |
1564 | SCM_CAUTIOUS; this way, 1) there's only one version of each flag | |
1565 | to define (we used to have both RECKLESS and SCM_RECKLESS), and 2) | |
1566 | if we want to use them in a header file some day, we can. (Thanks | |
1567 | to Michael Livshin.) | |
1568 | ||
ae6f9e24 JB |
1569 | * stime.c (scm_get_internal_real_time): Do the arithmetic using |
1570 | SCM numbers, so we won't have rollover problems; the range of a | |
1571 | signed long in milliseconds is about 25 days. (Thanks to Karl | |
1572 | Hegbloom.) | |
1573 | ||
70445040 | 1574 | Don't redefine sleep and usleep; fix this problem now. |
eebc12c6 JB |
1575 | * coop.c (sleep, usleep): Remove declarations; we don't use or |
1576 | redefine these any more. | |
1577 | (scm_thread_usleep, scm_thread_sleep): New functions which do the | |
1578 | job of usleep and sleep in a thread-friendly way. We can use | |
1579 | these in the rest of Guile. Define versions for systems both with | |
1580 | and without iselect. | |
1581 | * threads.h (scm_thread_usleep, scm_thread_sleep): New declarations. | |
1582 | * scmsigs.c (usleep): Clean up oddities declaring usleep; since | |
1583 | we're just using it, not redefining it, we can use a K&R style | |
1584 | declaration here. | |
1585 | (sleep): Declare this, too, if the system hasn't. | |
1586 | (scm_sleep, scm_usleep): Use scm_thread_sleep and | |
1587 | scm_uthread_sleep if they're available; otherwise, just call the | |
1588 | system functions. | |
1589 | * scmconfig.h.in: Regenerated. | |
1590 | ||
1591 | * coop.c (scm_thread_sleep): Make `slept' an unsigned long. | |
1592 | ||
1593 | * coop.c (coop_sleephelp): Remove ANSI #ifdef hair. | |
1594 | ||
94e3e95e JB |
1595 | 1998-10-12 Jim Blandy <jimb@zwingli.cygnus.com> |
1596 | ||
cb9728ed JB |
1597 | * threads.c: Doc fix. |
1598 | ||
1599 | The argument type of usleep varies from system to system, | |
1600 | as does the return type. We really shouldn't be redefining usleep | |
1601 | at all, but I don't have time to clean that up before the 1.3. | |
1602 | release. It's on the schedule for afterwards. (Thanks to Julian | |
1603 | Satchell.) | |
1604 | * coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and | |
1605 | definition. | |
1606 | * scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype. | |
1607 | * scmconfig.h: Regenerated. | |
1608 | ||
94e3e95e JB |
1609 | * simpos.c (scm_software_type): Procedure deleted. This isn't the |
1610 | right way to handle system variation. Autoconf's approach is the | |
1611 | way and the light. | |
1612 | * simpos.h (scm_software_type): Declaration deleted. | |
1613 | ||
1614 | * script.c (scm_find_executable): Don't test if unix is #defined | |
1615 | here; first, NetBSD doesn't #define it, and second, it's the wrong | |
b1d6e336 | 1616 | way to go about these things. (Thanks to Perry Metzger.) |
94e3e95e JB |
1617 | (dld_find_executable): Delete this MSDOS support code. This isn't |
1618 | the way we want to support this; it needs to be rethunk at a | |
1619 | larger scale. | |
1620 | ||
1621 | * genio.c (scm_do_read_line): Don't just politely check that the | |
1622 | line was either non-empty or EOF. Abort if it's empty and not | |
1623 | EOF. | |
1624 | ||
5f964025 JB |
1625 | 1998-10-11 Jim Blandy <jimb@zwingli.cygnus.com> |
1626 | ||
81aef0ba JB |
1627 | * scmconfig.h.in: Regenerated. |
1628 | ||
335df0e8 JB |
1629 | * libguile.h: Don't omit the dynamic linking functions. (Thanks |
1630 | to Greg Badros.) | |
1631 | ||
5f964025 JB |
1632 | * genio.c (scm_do_read_line): Count lines correctly when the file |
1633 | doesn't end in a newline. | |
1634 | ||
17f8d40c JB |
1635 | 1998-10-10 Jim Blandy <jimb@zwingli.cygnus.com> |
1636 | ||
216d3a1e JB |
1637 | * genio.c (scm_do_read_line): Maintain the line count correctly. |
1638 | (Thanks to Harvey J. Stein and Greg Harvey.) | |
1639 | ||
17f8d40c JB |
1640 | * gc.c (scm_return_first): Remove #ifdef __STDC__ garbage; Guile |
1641 | requires ANSI now. | |
1642 | ||
1643 | * numbers.c (big2str): Protect t from garbage collection until | |
1644 | we're done. (Thanks to Gary Houston.) | |
1645 | ||
31b9e767 JB |
1646 | 1998-10-09 Jim Blandy <jimb@zwingli.cygnus.com> |
1647 | ||
c6ff295e JB |
1648 | * Makefile.am (libguile_la_LDFLAGS): Increment shared library |
1649 | version number. | |
1650 | * Makefile.in: Regenerated. | |
1651 | ||
31b9e767 JB |
1652 | * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno, |
1653 | scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of | |
1654 | SCM_P macro. | |
1655 | ||
1656 | Do magic to mix reads and writes on stdio FILE-based ports. | |
0445f9f2 | 1657 | (Thanks to Christian Lynbech.) |
31b9e767 JB |
1658 | * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY): |
1659 | New macros. | |
1660 | (pre_read, pre_write): New functions. | |
1661 | (local_fgetc, local_fgets, local_ffwrite, local_fputc, | |
1662 | local_fputs): Call them. | |
1663 | (local_fflush): Mark the port as ready for reading and writing. | |
1664 | (scm_stdio_to_port): Set the FPORT_READ_SAFE, FPORT_WRITE_SAFE | |
1665 | flags on new port objects. This might not be accurate --- who | |
1666 | knows what state the FILE * is in when we get it --- but it won't | |
1667 | do extraneous calls to fflush or fseek, so it's no worse than the | |
1668 | behavior before this change. | |
1669 | * ports.h: Add comment. | |
1670 | ||
1671 | Centralize the creation of port objects based on stdio FILE * in | |
1672 | fports.c; don't just throw them together anywhere. | |
1673 | * fports.c (scm_stdio_to_port): Make NAME a SCM value, which is | |
1674 | what the rest of Guile wants. Don't set the revealed count; | |
1675 | that's only appropriate for stdin, stdout, stderr. | |
1676 | (scm_standard_stream_to_port): This function does set the revealed | |
1677 | count. | |
1678 | * init.c (scm_init_standard_ports): Use scm_standard_stream_to_port, | |
1679 | not scm_stdio_to_port. | |
1680 | * filesys.c (scm_open): Call scm_stdio_to_port; don't write it out. | |
1681 | * fports.c (scm_open_file): Same. | |
1682 | * posix.c (scm_pipe): Same. | |
1683 | * socket.c (scm_sock_fd_to_port): Same. | |
1684 | * ioext.c (scm_fdopen): Same. | |
1685 | (scm_freopen): Moved from here to... | |
1686 | * fports.c (scm_freopen): ... here. This is really something that | |
1687 | munges the internals of an fport, so it should go here. | |
1688 | * fports.h (scm_stdio_to_port): Adjust prototype. | |
1689 | (scm_standard_stream_to_port, scm_freopen): New protoypes. | |
1690 | * ioext.h (scm_freopen): Prototype removed. | |
1691 | ||
1692 | * filesys.c (set_element, get_element): This can work on both pipe | |
1693 | and file ports, so use SCM_FPORTP to typecheck, instead of testing | |
1694 | for scm_tc16_fport. | |
1695 | ||
1696 | * scmconfig.h.in: Regenerated. | |
1697 | ||
1698 | Change the definition of the functions in scm_ptobfuns so that | |
1699 | they get passed the port object, not the port's stream. | |
1700 | * ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'. | |
1701 | * gc.c (scm_gc_sweep): Pass the port itself to the free function. | |
1702 | * genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc): | |
1703 | Pass the port itself to the scm_ptobs function. | |
1704 | * ports.c (scm_close_port, scm_force_output, scm_flush_all_ports, | |
1705 | scm_generic_fgets): Same. | |
1706 | (putc_void_port, puts_void_port, write_void_port, flush_void_port, | |
1707 | getc_void_port, fgets_void_port, close_void_port): Just change the | |
1708 | argument names; these functions don't really do anything. | |
1709 | * fports.c (local_fgetc, local_fgets, local_fclose, local_fflush, | |
1710 | local_fputc, local_fputs, local_ffwrite, local_pclose): Take the | |
1711 | port as an argument, and use SCM_STREAM to get the stdio FILE *. | |
1712 | Also, use prototyped definitions, and get rid of the extra | |
1713 | declarations. | |
1714 | (scm_fptob, scm_pipob): We don't need casts here any more. | |
1715 | * strports.c (prinstpt): Use prototype declarations. | |
1716 | (stputc, stwrite, stputs, stgetc): Take the port as an argument, | |
1717 | and use SCM_STREAM to get the string info. Also, use prototyped | |
1718 | definitions, and get rid of the extra declarations. | |
1719 | * vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose, | |
1720 | noop0): Same. | |
1721 | ||
1722 | * ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight | |
1723 | prototype; it's okay (preferred, even!) to use ANSI C in Guile. | |
1724 | ||
1725 | * fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and | |
1726 | scm_fgets, for consistency. | |
1727 | (scm_fptop, scm_pipob): References updated. | |
1728 | ||
6d921cd6 JB |
1729 | 1998-10-08 Jim Blandy <jimb@zwingli.cygnus.com> |
1730 | ||
1731 | Include the source location in error messages for scripts. | |
1732 | * init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the | |
1733 | stack is still there when we catch the error. | |
1734 | * throw.c (handler_message): If we are handling an error with a | |
1735 | message, then put together the proper arguments and call | |
1736 | scm_display_error, instead of scm_display_error_message. That | |
1737 | displays source location, if it can find it. | |
1738 | ||
13af3048 JB |
1739 | 1998-10-07 Jim Blandy <jimb@zwingli.cygnus.com> |
1740 | ||
a8e05009 JB |
1741 | * gc.c (scm_unprotect_object): Change this so that calls to |
1742 | scm_protect_object and scm_unprotect_object nest properly. | |
1743 | (scm_protect_object): Doc fixes. | |
1744 | ||
3c0a54bd JB |
1745 | * strings.c (scm_string_set_x): Require the argument to be a |
1746 | writable string, not a substring or a symbol. | |
1747 | * strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates. | |
74f87516 JB |
1748 | (Thanks to John Redford and Charbel Jacquin.) |
1749 | ||
13af3048 JB |
1750 | * scmconfig.h.in: Regenerated; ../acconfig.h has changed. |
1751 | ||
6ea669d7 JB |
1752 | 1998-10-07 Jim Blandy <jimb@totoro.red-bean.com> |
1753 | ||
1754 | * eval.c (safe_setjmp): Remove this misunderstanding. | |
1755 | (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to | |
1756 | ordinary setjmp. | |
1757 | ||
2d0937bc JB |
1758 | 1998-10-06 Jim Blandy <jimb@zwingli.cygnus.com> |
1759 | ||
1760 | * libguile.h: Mark these as C declarations, for compilation by C++ | |
1761 | compilers. | |
1762 | ||
1763 | * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef | |
1764 | __cplusplus clause. I seriously doubt this ever worked the way | |
1765 | the author seems to have intended. | |
1766 | ||
1767 | 1998-10-05 Jim Blandy <jimb@zwingli.cygnus.com> | |
1768 | ||
1769 | Utterly needless cleanups to hopelessly messy code. | |
1770 | * ports.c: Doc fixes. | |
1771 | (scm_fflush): Moved to ... | |
1772 | * genio.c (scm_fflush): ... here, amongst all the other port | |
1773 | method invocation functions. | |
1774 | * genio.h, ports.h: The prototype moves too. | |
1775 | ||
53314947 JB |
1776 | 1998-10-04 Jim Blandy <jimb@zwingli.cygnus.com> |
1777 | ||
8b49142f JB |
1778 | * backtrace.c (display_error_body): The current frame does not |
1779 | always have a parent frame; consider a function called directly | |
1780 | from the MAIN_FUNC passed to scm_boot_guile. (Thanks to Maciej | |
1781 | Stachowiak.) | |
1782 | ||
53314947 JB |
1783 | * alloca.c (alloca): Undo yesterday's changes, and simply call |
1784 | malloc directly for storage, and abort if we don't get what we | |
1785 | want. The situation is much simpler --- just call malloc. Emacs | |
1786 | has bizarre/evil requirements (signal handlers might malloc unless | |
1787 | you set this global flag, so you have to set the flag around all | |
1788 | calls to malloc) which we are certainly not going to conform to, | |
1789 | so we can do the simple and obvious thing. | |
1790 | ||
1791 | * coop.c (coop_condition_variable_wait): Make this function | |
1792 | static. It's only useful internally --- you should never just | |
1793 | wait on a condition variable. | |
1794 | * coop-defs.h (coop_condition_variable_wait): Delete prototype. | |
1795 | ||
026065b7 JB |
1796 | 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com> |
1797 | ||
7265de70 JB |
1798 | * unif.c (scm_array_set_x): Accept any kind of number as an |
1799 | element for a uniform vector of doubles. This is more consistent | |
1800 | with Scheme's view of numbers. (Thanks to Miroslav Silovic.) | |
1801 | ||
a9fe62cb JB |
1802 | * alloca.c: Use scm_must_malloc to obtain storage. Hopefully this |
1803 | works; I can't conveniently test it myself. (Thanks to Dvid | |
1804 | Tillman for the bug report.) | |
1805 | ||
026065b7 JB |
1806 | * init.c: Doc fixes. |
1807 | ||
1808 | * init.c (invoke_main_func): Load the startup files (boot-9.scm) | |
1809 | from here, not from scm_compile_shell_switches (which is a pretty | |
1810 | dumb place to do it). | |
1811 | (scm_load_startup_files): New function. | |
1812 | (scm_ice_9_already_loaded): Variable moved to here from script.c. | |
1813 | * script.c (scm_compile_shell_switches): Don't load the startup | |
1814 | files here. | |
1815 | (scm_ice_9_already_loaded): Variable moved. | |
1816 | * init.c (scm_load_startup_files): Prototype for new function. | |
1817 | * gh_init.c (gh_enter): Doc fix. | |
1818 | ||
1aab20ac | 1819 | 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com> |
541716d1 JB |
1820 | |
1821 | Some anti-warning changes from Greg Harvey. | |
1822 | * gh_data.c (gh_scm2doubles): Initialize m, to avoid compiler | |
1823 | warnings when it doesn't understand our NORETURN declarations in | |
1824 | error.h. | |
1825 | * posix.c (scm_mknod): Similar. | |
1826 | ||
f9d12ce8 JB |
1827 | 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com> |
1828 | ||
1829 | * posix.c (scm_getpwuid): If we can't find an entry, return our | |
1830 | own message, instead of using scm_syserror --- the getpwMUMBLE | |
1831 | functions don't set `errno' to anything interesting. | |
1832 | ||
1aab20ac | 1833 | 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com> |
0553d3a2 JB |
1834 | |
1835 | Get rid of warnings from the cooperative threading system. | |
1836 | * threads.h (scm_single_thread_p, scm_yield, | |
1837 | scm_call_with_new_thread, scm_join_thread, scm_make_mutex, | |
1838 | scm_lock_mutex, scm_unlock_mutex, scm_make_condition_variable, | |
1839 | scm_wait_condition_variable, scm_signal_condition_variable): Add | |
1840 | prototypes for these Scheme-visible functions. | |
1841 | * coop-defs.h (coop_next_runnable_thread, | |
1842 | coop_wait_for_runnable_thread_now, coop_wait_for_runnable_thread): | |
1843 | Prototypes for these here, even though they're from iselect.c. | |
1844 | (coop_condition_variable_wait, coop_join): Add prototypes. | |
1845 | * coop-threads.c (scm_threads_free_thread, scm_threads_free_mutex, | |
1846 | scm_threads_free_condvar): Make these smob functions static. | |
1847 | * coop-threads.h (coop_init): Give this a real prototype. | |
1848 | * coop.c: #include <unistd.h>, if we have it, for `usleep' and `sleep'. | |
1849 | (coop_next_runnable_thread): No need to provide prototype; it's in | |
1850 | coop-defs.h. | |
1851 | ||
1852 | * scmconfig.h.in: .detarenegeR | |
1853 | ||
1854 | * iselect.c, threads.c: Doc fixes. | |
1855 | ||
235bb3fe JB |
1856 | 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com> |
1857 | ||
1858 | * Makefile.in: Regenerated with a patched automake, to get | |
1859 | dependency generation right when using EGCS. | |
1860 | ||
1861 | * inet_aton.c (inet_aton): Add prototype, to remove compiler | |
1862 | warning. (Thanks to Robert Pluim.) | |
1863 | ||
1864 | * inet_aton.c (inet_aton): Reassure the compiler that the | |
1865 | arguments to the <ctype.h> macros are all unsigned characters, not | |
1866 | signed characters. | |
1867 | ||
1aab20ac | 1868 | 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com> |
83d1c666 JB |
1869 | |
1870 | Getting rid of more warnings... | |
1871 | * iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see | |
1872 | today's change to ../configure.in. | |
1873 | * scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP. | |
1874 | * scmconfig.h.in: Regenertaded.de.,.__ | |
1875 | * stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL. | |
1876 | (scm_localtime, scm_mktime): Use a const char * to manipulate the | |
1877 | time zone name. | |
1878 | ||
1879 | * readline.c: Doc fix. | |
1880 | (rl_cleanup_after_signal, rl_free_line_state): Make these static. | |
1881 | * readline.h (scm_filename_completion_function): Add prototype. | |
1882 | (scm_init_readline): Make this into a prototype. | |
1883 | ||
1884 | * readline.c (scm_filename_completion_function): Use SCM_PROC to | |
1885 | declare this, instead of calling scm_make_subr manually. | |
1886 | ||
1aab20ac | 1887 | 1998-10-02 Jim Blandy <jimb@savonarola.red-bean.com> |
83d1c666 JB |
1888 | |
1889 | * readline.h (scm_init_readline): Add prototype for this. | |
1890 | (scm_init_readline): Make this a real prototype. | |
1891 | ||
94c0b3b8 JB |
1892 | 1998-09-30 Jim Blandy <jimb@zwingli.cygnus.com> |
1893 | ||
1894 | Warning fixes from Maciej Stachowiak: | |
1895 | * backtrace.h (scm_display_application, scm_backtrace): Add | |
1896 | prototypes. | |
1897 | * debug.c (scm_m_start_stack): Make this function static. | |
1898 | * fluids.h (scm_fluid_p): Add prototype. | |
1899 | * procprop.c (scm_i_procedure_arity): Make this function static. | |
1900 | * regex-posix.c (scm_regexp_error_msg): Make this function static. | |
1901 | * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl. | |
1902 | * root.h (scm_dynamic_root): Add external prototype. | |
1903 | * scmsigs.h (scm_usleep): Add external prototype. | |
1904 | * script.h (scm_init_script): Use prototype, not K&R decl. | |
1905 | * stacks.h (scm_stack_id): Add external prototype. | |
1906 | * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype. | |
1907 | ||
dc9f6d6a MG |
1908 | 1998-09-30 Mark Galassi <rosalia@cygnus.com> |
1909 | ||
1910 | * gh.h: took out the definitions of vset and vref, since they are | |
1911 | replaced by the proper vector routines that correspond to the R4RS | |
1912 | procedures. | |
1913 | ||
61a9ba48 JB |
1914 | 1998-09-29 Jim Blandy <jimb@totoro.red-bean.com> |
1915 | ||
94c0b3b8 | 1916 | * snarf.h (SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): New macros; |
61a9ba48 JB |
1917 | these are analogous to SCM_VCELL and SCM_GLOBAL_VCELL but take a |
1918 | third argument, a C expression that should result in a SCM value, | |
1919 | which is used to initialize the variable. Reimplemented | |
1920 | SCM_CONST_LONG in terms of SCM_VCELL_INIT. (Thanks to Maciej | |
1921 | Stachowiak.) | |
1922 | ||
1923 | * version.h (scm_libguile_config_stamp): Add prototype. | |
1924 | (From Maciej Stachowiak.) | |
1925 | ||
9a3c1149 JB |
1926 | 1998-09-26 Jim Blandy <jimb@zwingli.cygnus.com> |
1927 | ||
1928 | * eval.c (scm_force): Assert that x is SCM_NIMP to fix segv when | |
1929 | (force 9) is tried. (Thanks to Karl M. Hegbloom.) | |
1930 | ||
52591c80 JB |
1931 | 1998-09-06 Jim Blandy <jimb@zwingli.cygnus.com> |
1932 | ||
6925bc4e JB |
1933 | * print.c (scm_iprin1): Rather than having one i, and using it in |
1934 | several places, declare a fresh i local to each block where it is | |
1935 | used, and give it a signedness appropriate to its use in each case. | |
1936 | (scm_iprlist): Same. | |
1937 | ||
1938 | * print.c (scm_iprin1): Add cast to avoid unsigned/signed | |
1939 | comparison warnings. | |
1940 | ||
1941 | * print.c (ENTER_NESTED_DATA): Make i an unsigned long, to avoid | |
1942 | signed/unsigned clashes. | |
1943 | ||
1944 | * posix.h (scm_tmpnam): Added prototype. | |
1945 | ||
52591c80 JB |
1946 | * objects.h (scm_set_object_procedure_x, scm_make_class_object, |
1947 | scm_make_subclass_object): Add external prototypes. | |
1948 | ||
1949 | * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned | |
1950 | comparison is okay here. | |
1951 | ||
1952 | * numbers.c (scm_istr2int): Add cast; len is known to be positive. | |
1953 | ||
1954 | * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the | |
1955 | (true, but confusing) fact that -1 == ((unsigned) 0 - 1). | |
1956 | ||
1957 | * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing | |
1958 | signed/unsigned. | |
1959 | ||
1960 | * load.c (swap_port): Make this function static. | |
1961 | ||
1962 | * load.c (scm_search_path): Make max_path_len and max_ext_len | |
1963 | unsigned, since they're compared against string sizes. | |
1964 | ||
1965 | * load.c (init_build_info): Make i unsigned. | |
1966 | ||
1967 | * ioext.h (scm_read_line): Add prototype. | |
1968 | ||
1969 | * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x, | |
1970 | scm_hash_fn_remove_x): Make hash bucket index local variable k | |
1971 | unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as | |
1972 | accurately as possible. | |
1973 | ||
1974 | * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned | |
1975 | comparisons, and range checking to make sure those casts are | |
1976 | harmless. | |
2d2c87e1 JB |
1977 | |
1978 | * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid | |
1979 | signed/unsigned comparisons. | |
1980 | ||
1981 | * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to | |
1982 | avoid signed/unsigned comparisons. | |
1983 | * smob.h (scm_numsmob): Change extern declaration to match. | |
1984 | ||
1985 | * ports.c (scm_numptob): Make this an int, not an scm_sizet, to | |
1986 | avoid signed/unsigned comparisons. | |
1987 | * ports.h (scm_numptob): Change extern declaration to match. | |
1988 | (scm_current_load_port, scm_set_port_line_x, | |
1989 | scm_set_port_column_x): New prototypes. | |
1990 | ||
1991 | * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the | |
1992 | test code, and it causes warnings. | |
1993 | ||
1994 | * gh.h (gh_int2scmb, gh_uniform_vector_length, | |
1995 | gh_uniform_vector_ref): Added prototypes. | |
1996 | ||
1997 | * Makefile.am (libguile_la_SOURCES): Include Scheme-level | |
1998 | debugging support unconditionally. That's backtrace.c, stack.c, | |
1999 | debug.c, and srcprop.c. | |
2000 | (EXTRA_libguile_la_SOURCES): Omit those from here. | |
2001 | * Makefile.in: Regenerated. | |
2002 | ||
a9b70caf MD |
2003 | 1998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2004 | ||
2005 | * options.c (scm_options): Bugfix: Allow empty list of options! | |
2006 | ||
2007 | * debug.c, debug.h (scm_single_step): Removed. | |
2008 | (scm_with_traps): New procedure. This procedure could easily be | |
2009 | written in Scheme but needs to be highly optimized. | |
2010 | ||
2011 | * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P. | |
2012 | ||
2013 | * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags. | |
2014 | Check SCM_TRAPS_P before trapping. | |
2015 | ||
6dd78771 JB |
2016 | 1998-07-30 Jim Blandy <jimb@zwingli.cygnus.com> |
2017 | ||
2018 | Changes to avoid signed/unsigned comparison warnings. | |
2019 | * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs. | |
2020 | (scm_gc_sweep): Make n and j local to the blocks they're used in, | |
2021 | so they can have appropriate types for each application. Make i | |
2022 | signed. Use initializers in some spots. I'll probably pay for | |
2023 | all this tweaking. | |
2024 | (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args. | |
2025 | (scm_must_realloc): Make nm unsigned. | |
2026 | (init_heap_seg): Make new_seg_index and n_new_objects signed. | |
2027 | (scm_init_storage): Use prototype-style definition, and make the | |
2028 | argument unsigned. | |
2029 | * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc, | |
2030 | scm_must_realloc, scm_init_storage): Adjust prototype accordingly. | |
2031 | ||
2032 | * filesys.c (scm_readlink): Make local vars rv and size ints, to | |
2033 | avoid signed/unsigned comparison warnings, and because the return | |
2034 | value of readlink may be -1. Don't bother casting the third | |
2035 | argument to readlink. | |
2036 | ||
2037 | * filesys.c (scm_dirname, scm_basename): Move these to their own | |
2038 | page, at the end of the file. | |
2039 | * filesys.h (scm_dirname, scm_basename): Add prototypes for these. | |
2040 | ||
2041 | * eval.h (scm_eval_options_interface): Add external prototype for this. | |
2042 | * eval.c (scm_eval_options_interface): Use prototype-style def'n. | |
2043 | ||
2044 | * eval.c (scm_lookupcar1): Make this static. | |
2045 | ||
2046 | * dynl.h (scm_registered_modules, scm_clear_registered_modules): | |
2047 | Make these prototype declarations, not K&R-style. | |
2048 | ||
2049 | * chars.c (scm_tables_prehistory): Add cast, to remove signed/ | |
2050 | unsigned comparison warning. | |
2051 | ||
2052 | * appinit.c: File removed. It had a single function in it, empty, | |
2053 | whose reason for existence is explained in no documentation or | |
2054 | comment. I think it's there as a default for some Tcl-style | |
2055 | initialization, but Tcl abandoned that approach a while ago. | |
2056 | * Makefile.am (libguile_la_SOURCES): Remove appinit.c. | |
2057 | (BUILT_SOURCES): Remove appinit.x. | |
2058 | * Makefile.in: Regenerated. | |
2059 | ||
0dcbc17a JB |
2060 | 1998-07-29 Jim Blandy <jimb@zwingli.cygnus.com> |
2061 | ||
2062 | * Makefile.in: Regenerated using the last public version of | |
2063 | automake, not the hacked Cygnus version. | |
2064 | ||
1f5ae2fd JB |
2065 | 1998-07-28 Jim Blandy <jimb@zwingli.cygnus.com> |
2066 | ||
2067 | Remove Totoro kludge. | |
2068 | * Makefile.in, scmconfig.h.in: Regenerated. | |
2069 | * init.c, readline.c: Don't check if TOTORO is #defined. | |
2070 | ||
e99cbcd6 JB |
2071 | 1998-07-26 Jim Blandy <jimb@zwingli.cygnus.com> |
2072 | ||
2073 | * Makefile.am: Adjust for new thread configuration system. | |
2074 | (INCLUDES): Include the value of THREAD_CPPFLAGS. | |
2075 | (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from | |
2076 | THREAD_LIBS. | |
2077 | (THREAD_LIBS): Definition deleted; automake will generate such | |
2078 | things automatically. | |
2079 | * Makefile.in: Regenerated. | |
2080 | ||
87148d9e JB |
2081 | 1998-07-23 Jim Blandy <jimb@zwingli.cygnus.com> |
2082 | ||
2083 | Simplify smob and port marking; set the mark bit in the generic | |
2084 | marking code, and make marker routines only responsible for | |
2085 | turning up outgoing pointers. | |
2086 | * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here, | |
2087 | before calling the marking function. Don't call the marking | |
2088 | function if it's zero. | |
2089 | * markers.c (scm_mark0): Just return #f. This function isn't | |
2090 | necessary at all now, but it's harmless to call it. We'll leave | |
2091 | it in so other folks' code doesn't croak at link time. | |
2092 | (scm_markcdr): Don't call SCM_SETGC8MARK. | |
2093 | * async.c (mark_async): Don't call SCM_SETGC8MARK. | |
2094 | * dynl.c (mark_dynl_obj): Same. | |
2095 | * root.c (mark_root): Same. | |
2096 | * srcprop.c (marksrcprops): Same. | |
2097 | * unif.c (markra): Same. | |
2098 | * variable.c (scm_markvar): Same. | |
2099 | * ports.c (scm_markstream): Same. | |
2100 | (void_port_ptob): Specify zero for our marking function. | |
2101 | * debug.c (debugobjsmob): Same. | |
2102 | * dynwind.c (guardsmob): Same. | |
2103 | * filesys.c (dir_smob): Same. | |
2104 | * fluids.c (fluid_smob): Same. | |
2105 | * fports.c (scm_fptob, scm_pipob): Same. | |
2106 | * mallocs.c (mallocsmob): Same. | |
2107 | * regex-posix.c (regex_t_smob): Same. | |
2108 | * smob.c (freecell, flob, bigob): Same. | |
2109 | * threads.c (thread_smob, mutex_smob, condvar_smob): Same. | |
2110 | * throw.c (jbsmob, lazy_catch_funs): Same. | |
2111 | ||
3910272e MD |
2112 | 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
2113 | ||
2114 | * eval.c (scm_copy_tree): Reverted last change: `eval' uses | |
2115 | scm_copy_tree on code in order not to let memoized code to leak | |
2116 | out. Thus, scm_copy_tree needs to copy vectors as well since | |
2117 | quasiquote can introduce evaluated code also inside vector | |
2118 | constants. | |
2119 | ||
240ed1e5 MD |
2120 | 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
2121 | ||
2122 | * eval.c (scm_copy_tree): Removed ability to copy vectors. | |
2123 | ||
2124 | * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect, | |
2125 | gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and | |
2126 | gh_doubles2dvect.) | |
2127 | ||
2128 | * unif.c: Say that ivect and uvect are of type signed and unsigned | |
2129 | long instead of int in commentary so that it correctly describes | |
2130 | the implementation. | |
2131 | ||
5ef81022 MD |
2132 | 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
2133 | ||
2134 | * stime.c: Removed declaration of strptime. (It should be | |
2135 | declared by the system headers. If it turns out that some systems | |
2136 | don't, we'll handle that then.) (Thanks to Greg Troxel.) | |
2137 | ||
2138 | * stime.h: Renamed TIMEH --> STIMEH | |
2139 | ||
2140 | * backtrace.c (scm_display_error, scm_display_backtrace): In order | |
2141 | to increase portability, don't use structure assignment. | |
2142 | (Thanks to Nicolas Neuss.) | |
2143 | ||
2144 | * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased | |
2145 | portability. | |
2146 | (finalize_fd_sets): Added empty statement after last case label. | |
2147 | (Thanks to Nicolas Neuss.) | |
2148 | ||
2149 | * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to | |
2150 | Nicolas Neuss.) | |
2151 | ||
212d45b8 MD |
2152 | Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com> |
2153 | ||
2154 | * init.c, readline.c: OK, I won't have these readline.x bug | |
2155 | reports anymore. We've had them since April. The current reason | |
2156 | is a completely unintelligible failure of totoro.red-bean.com to | |
2157 | do the test for rl_getc_function in libreadline correctly. This | |
2158 | kludge overrides the test if we're on totoro so that the snapshot | |
2159 | generation process can work. | |
2160 | ||
2161 | * readline.c: Define a strdup replacement if not existent on system. | |
2162 | ||
43eeb5a6 MD |
2163 | 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
2164 | ||
2165 | * vectors.c, vectors.h (scm_make_vector): Removed third argument. | |
2166 | This change makes scm_make_vector R5RS compatible. We cannot keep | |
2167 | the third argument since people want to be able to deduce the form | |
2168 | of the C function call only by looking at R5RS. (At the same time | |
2169 | we have removed some unnecessary complexity!) | |
2170 | ||
2171 | * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c, | |
2172 | net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c, | |
2173 | stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third | |
2174 | argument in call to scm_make_vector. | |
2175 | ||
9d0b279f MD |
2176 | 1998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2177 | ||
2178 | * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP. | |
2179 | This macro is useful in applications. | |
2180 | ||
dbb25e7f MD |
2181 | 1998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
2182 | ||
2183 | * load.c (scm_internal_parse_path): Renamed from scm_parse_path. | |
2184 | (scm_parse_path, scm_search_path): New Scheme level procedures. | |
2185 | ||
2186 | * load.h (scm_internal_parse_path, scm_parse_path, | |
2187 | scm_search_path): Declared. | |
2188 | ||
74d6650d MD |
2189 | 1998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2190 | ||
2191 | * filesys.c (dirname, basename): New procedures. | |
2192 | ||
2193 | * init.c (scm_boot_guile_1): Removed condition around | |
2194 | scm_init_options. | |
2195 | ||
2196 | * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a | |
2197 | new data type (guards) for representation of C level guards and | |
2198 | data on the wind chain. | |
2199 | (scm_internal_dynamic_wind): New function. | |
2200 | ||
2201 | * dynwind.h: Declare scm_internal_dynamic_wind. | |
2202 | ||
2203 | * root.h (scm_root_state): Added scm_cur_loadp. | |
2204 | ||
2205 | * root.c (mark_root): Added comment about cur_loadp. | |
2206 | ||
2207 | * load.c: #include "dynwind.h"; | |
2208 | (scm_primitive_load): Use scm_inner_dynamic_wind to update | |
2209 | scm_cur_loadp. | |
2210 | ||
2211 | * init.c (scm_init_standard_ports): Initialize scm_def_loadp. | |
2212 | ||
2213 | * ports.c (current-load-port): New procedure. | |
2214 | ||
391aebfc MD |
2215 | 1998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2216 | ||
10ccfad7 MD |
2217 | * ioext.c (scm_isatty_p): Accept any kind of data as argument. If |
2218 | not a tty, return #f. | |
2219 | ||
391aebfc MD |
2220 | * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks |
2221 | to Julian Satchell and Roland Kaufmann.) | |
2222 | ||
2223 | * gh.h (gh_memv, gh_member): Fixed typos in macro definitions. | |
2224 | (gh_write): Added declaration. (Thanks to Eiichi Takamori.) | |
2225 | ||
6dabf6a9 MD |
2226 | 1998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se> |
2227 | ||
2228 | * debug.h, debug.c (scm_start_stack): New function. Implements | |
2229 | the guts of old scm_m_start_stack. | |
2230 | ||
2231 | * debug.c (scm_m_start_stack): Use scm_start_stack. | |
2232 | ||
2233 | * init.c (scm_start_stack, scm_restart_stack): Renamed to | |
2234 | start_stack and restart_stack. (These have static scope.) | |
2235 | ||
daca2816 MD |
2236 | 1998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2237 | ||
2238 | * readline.c (rl_cleanup_after_signals, rl_free_line_state): New | |
2239 | readline functions to come in release 2.3. (Thanks to Chet | |
2240 | Ramey.) | |
2241 | (handle_errors): Use the above functions. | |
2242 | ||
be0ea988 MD |
2243 | 1998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2244 | ||
2245 | * readline.c: Improvements for readline support: Handle errors | |
2246 | better; Implement before-read-hook. | |
2247 | ||
2248 | 1998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se> | |
2249 | ||
2250 | * init.c (scm_boot_guile_1), readline.c: Test for | |
2251 | HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to | |
2252 | assure that we have version >= 2.1.) | |
2253 | ||
e158e4f4 MD |
2254 | 1998-05-11 Mikael Djurfeldt <mdj@kenneth> |
2255 | ||
83d1c666 JB |
2256 | * readline.c (scm_readline): Defer interrupts while we're calling |
2257 | readline. | |
2258 | ||
e158e4f4 MD |
2259 | * readline.c (scm_add_history): Bugfix: Do strdup before giving |
2260 | away the string to add_history. | |
56600c45 MD |
2261 | (completion_function): Do completion for readline. (Thanks to |
2262 | Andrew Archibald.) | |
e158e4f4 MD |
2263 | (scm_filename_completion_function): New procedure: Filename |
2264 | completer. | |
2265 | (current_input_getc): New function. Use this one instead of | |
2266 | standard getc from readline. | |
2267 | ||
2268 | * throw.c, throw.h (scm_handle_by_throw): New function: This | |
2269 | handler throws errors to next handler on the dynwind chain. | |
2270 | ||
2271 | 1998-05-09 Mikael Djurfeldt <mdj@kenneth> | |
2272 | ||
2273 | * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't | |
2274 | used. | |
2275 | ||
8bb51def MD |
2276 | 1998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2277 | ||
2278 | * procprop.c (scm_i_procedure_arity): New function. Returns arity | |
2279 | of procedure. | |
2280 | (scm_procedure_properties): Modified to return arity together with | |
2281 | other properties. | |
2282 | (scm_procedure_property): Added the read-only property `arity'. | |
2283 | (scm_set_procedure_property_x): It is an error to set the `arity' | |
2284 | property. | |
2285 | ||
2286 | * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added | |
2287 | prefix SCM_; Made f_gsubr_apply global and added prefix scm_. | |
2288 | ||
2289 | * procprop.h (scm_sym_arity): New symbol. | |
2290 | ||
2291 | * objects.c (scm_set_object_procedure_x): New procedure: Use this | |
2292 | to set the dispatch procedure of an operator or entity object. | |
2293 | ||
2294 | * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT): | |
2295 | Made procedure slots read-only. | |
2296 | ||
2297 | * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above | |
2298 | scm_tcs_cons_gloc case in zero args switch; Fixed args | |
2299 | construction for operators in scm_tcs_cons_gloc case in two args | |
2300 | switch. | |
2301 | ||
680ed4a8 MD |
2302 | 1998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2303 | ||
104d4533 MD |
2304 | * fluids.c: Removed use of assert.h (in order to avoid |
2305 | __eprintf). | |
2306 | ||
2307 | * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic. | |
2308 | ||
2309 | * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0. | |
2310 | ||
680ed4a8 MD |
2311 | * eval.c (SCM_CEVAL): Do more thorough argument checking. This |
2312 | change makes the evaluator safer at the cost of evaluation speed. | |
2313 | It handles the case when the user has added a non-immediate | |
2314 | improper end of the application form, e.g., `(+ 0 . x)'. | |
2315 | (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to | |
2316 | minimize the extra cost as much as possible. The new code is | |
2317 | enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the | |
2318 | problem with structs planted directly in the code (e.g. by a | |
2319 | macro). This no longer causes segmentation fault. (Thanks to | |
2320 | Eric Hanchrow.) | |
2321 | ||
2322 | * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra | |
2323 | arg `proc' in order to be able to throw errors; New argument | |
2324 | checking code. | |
2325 | ||
2326 | * Removed extra #include "debug.h" | |
2327 | ||
0935d604 MD |
2328 | 1998-04-25 Mikael Djurfeldt <mdj@kenneth> |
2329 | ||
2330 | * scmsigs.c: Declare usleep as returning void on some systems. | |
2c36126d MD |
2331 | (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian |
2332 | Satchell.) | |
0935d604 MD |
2333 | |
2334 | * coop.c (usleep): Return void on some systems. | |
2335 | ||
f1a5fa3c MD |
2336 | 1998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2337 | ||
2338 | * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath. | |
2339 | ||
2340 | * coop.c: Changed return type of usleep to int. | |
2341 | ||
2342 | * scmsigs.c (scm_usleep): New procedure; Declare usleep if it | |
2343 | isn't found in the OS. | |
2344 | ||
2345 | * iselect.h: #define scm_internal_select select if GUILE_ISELECT | |
2346 | isn't enabled. (Thought that I had made this change ages ago...) | |
2347 | ||
2348 | * iselect.c: Declare bzero if not defined by OS. | |
2349 | ||
26c41b99 MD |
2350 | 1998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2351 | ||
c3e09ef9 MD |
2352 | * dynl.c (scm_must_free_argv): Fixed memory leak due to negated |
2353 | condition. (Thanks to John Tobey.) | |
2354 | ||
2355 | * continuations.c (scm_make_cont), debug.c (scm_make_memoized, | |
2356 | scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS --> | |
2357 | A section. | |
2358 | ||
2359 | * __scm.h: Start the long-term project of moving to POSIX threads. | |
2360 | Phase 1: Classification of all critical sections. | |
2361 | (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters | |
2362 | for A sections. (See comments in __scm.h for details.) | |
2363 | ||
26c41b99 MD |
2364 | * dynl.c: Only check that HAVE_DLOPEN is defined before loading |
2365 | dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD. | |
2366 | ||
28795b1f MD |
2367 | 1998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se> |
2368 | ||
2369 | * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c, | |
2370 | cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES | |
2371 | (libpath.h, versiondat.h): Replaced dependency on Makefile with | |
2372 | dependencies on $(srcdir)/Makefile.in | |
2373 | $(top_builddir)/config.status in order to avoid circularity. | |
2374 | ||
2375 | * script.c (scm_compile_shell_switches): Bugfix: Don't discount i | |
2376 | from argc if argc was 0 initially. | |
2377 | ||
2378 | * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS | |
2379 | in generation of libpath.h. | |
2380 | ||
f2e5c92c MD |
2381 | 1998-04-15 Mikael Djurfeldt <mdj@nada.kth.se> |
2382 | ||
2383 | * Makefile.am (libguile_la_LDFLAGS): Bumped version number of | |
2384 | libguile from 2 to 3. | |
2385 | ||
a3365d47 MD |
2386 | 1998-04-14 Mikael Djurfeldt <mdj@nada.kth.se> |
2387 | ||
2388 | * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES. | |
2389 | ||
fc1d67c4 MD |
2390 | 1998-04-13 Mikael Djurfeldt <mdj@kenneth> |
2391 | ||
2392 | * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column, | |
2393 | scm_set_port_column_x, scm_port_filename, | |
2394 | scm_set_port_filename_x): Removed optional arguments. Added | |
2395 | proper argument checking. | |
2396 | ||
2397 | * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure | |
2398 | stack size in machine words. | |
2399 | ||
2400 | * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x, | |
2401 | rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks | |
2402 |