summaryrefslogtreecommitdiff
path: root/libguile/gdbint.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@red-bean.com>1999-06-12 17:26:22 +0000
committerJim Blandy <jimb@red-bean.com>1999-06-12 17:26:22 +0000
commit840ae05d912b3f9fdea264ab7ca348cff8bde420 (patch)
tree9be71a086ed3b4acd8a5c549abaac2afb5acf7ed /libguile/gdbint.c
parent027ffa31f5e32e29fef1a498a73056710780ca21 (diff)
downloadguile-840ae05d912b3f9fdea264ab7ca348cff8bde420.tar.gz
* fports.c, fports.h, gc.c, gdbint.c, ioext.c, ports.c, ports.h,
scmsigs.c, strports.c, vports.c: Install the sources which actually correspond to the changes described below. I got the ChangeLog entries and the patch from two different places...
Diffstat (limited to 'libguile/gdbint.c')
-rw-r--r--libguile/gdbint.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libguile/gdbint.c b/libguile/gdbint.c
index 867d8e7a8..73c00a1f6 100644
--- a/libguile/gdbint.c
+++ b/libguile/gdbint.c
@@ -208,11 +208,10 @@ gdb_read (str)
}
SCM_BEGIN_FOREIGN_BLOCK;
unmark_port (gdb_input_port);
- /* Replace string in input port and reset stream */
- ans = SCM_CDR (SCM_STREAM (gdb_input_port));
- SCM_SETCHARS (ans, str);
- SCM_SETLENGTH (ans, strlen (str), scm_tc7_string);
- SCM_SETCAR (SCM_STREAM (gdb_input_port), SCM_INUM0);
+ 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_lseek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
/* Read one object */
tok_buf_mark_p = SCM_GC8MARKP (tok_buf);
SCM_CLRGC8MARK (tok_buf);
@@ -271,10 +270,10 @@ gdb_print (obj)
RESET_STRING;
SCM_BEGIN_FOREIGN_BLOCK;
/* Reset stream */
- SCM_SETCAR (SCM_STREAM (gdb_output_port), SCM_INUM0);
+ scm_lseek (gdb_output_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
scm_write (obj, gdb_output_port);
- scm_display (SCM_MAKICHR (0), gdb_output_port);
- SEND_STRING (SCM_CHARS (SCM_CDR (SCM_STREAM (gdb_output_port))));
+ scm_ftruncate (gdb_output_port, SCM_UNDEFINED);
+ SEND_STRING (SCM_CHARS (SCM_STREAM (gdb_output_port)));
SCM_END_FOREIGN_BLOCK;
return 0;
}
@@ -311,14 +310,14 @@ scm_init_gdbint ()
scm_print_carefully_p = 0;
port = scm_mkstrport (SCM_INUM0,
- scm_make_string (SCM_MAKINUM (80), SCM_UNDEFINED),
+ scm_make_string (SCM_MAKINUM (0), SCM_UNDEFINED),
SCM_OPN | SCM_WRTNG,
s);
gdb_output_port = scm_permanent_object (port);
port = scm_mkstrport (SCM_INUM0,
scm_make_string (SCM_MAKINUM (0), SCM_UNDEFINED),
- SCM_OPN | SCM_RDNG,
+ SCM_OPN | SCM_RDNG | SCM_WRTNG,
s);
gdb_input_port = scm_permanent_object (port);