1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

1999-07-24 Gary Houston <ghouston@easynet.co.uk>

* gdbint.c (gdb_print, gdb_read): call scm_truncate_file.

	* ports.c (scm_truncate_file): renamed from scm_ftruncate.
	allow the 1st argument to be a fdes or filename as well as a
	port (as in the filesys.c version).

	* filesys.c (scm_truncate_file): removed.
This commit is contained in:
Gary Houston 1999-07-24 19:52:13 +00:00
parent eb9ef08b77
commit 69bc9ff335
7 changed files with 59 additions and 64 deletions

View file

@ -207,7 +207,7 @@ gdb_read (str)
unmark_port (gdb_input_port);
scm_lseek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
scm_puts (str, gdb_input_port);
scm_ftruncate (gdb_input_port, SCM_UNDEFINED);
scm_truncate_file (gdb_input_port, SCM_UNDEFINED);
scm_lseek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
/* Read one object */
tok_buf_mark_p = SCM_GC8MARKP (tok_buf);
@ -269,7 +269,7 @@ gdb_print (obj)
/* Reset stream */
scm_lseek (gdb_output_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
scm_write (obj, gdb_output_port);
scm_ftruncate (gdb_output_port, SCM_UNDEFINED);
scm_truncate_file (gdb_output_port, SCM_UNDEFINED);
SEND_STRING (SCM_CHARS (SCM_STREAM (gdb_output_port)));
SCM_END_FOREIGN_BLOCK;
return 0;