mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-21 12:10:26 +02:00
1999-09-18 Gary Houston <ghouston@freewire.co.uk>
* strports.c (scm_strport_to_string): create the string from pt->read_buf instead of an expression that evaluates to the same thing. * gdbint.c (gdb_print): don't just use SCM_CHARS to get a C string from the port: the port's buffer may not be NUL terminated.
This commit is contained in:
parent
46a47bedc2
commit
e684c60f44
3 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
1999-09-18 Gary Houston <ghouston@freewire.co.uk>
|
||||
|
||||
* strports.c (scm_strport_to_string): create the string from
|
||||
pt->read_buf instead of an expression that evaluates to the
|
||||
same thing.
|
||||
|
||||
* gdbint.c (gdb_print): don't just use SCM_CHARS to get a C string
|
||||
from the port: the port's buffer may not be NUL terminated.
|
||||
|
||||
1999-09-16 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
|
||||
|
||||
* Makefile.am (.c.x): Added missing semicolon after `false'.
|
||||
|
|
|
@ -275,7 +275,13 @@ gdb_print (obj)
|
|||
scm_seek (gdb_output_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||
scm_write (obj, gdb_output_port);
|
||||
scm_truncate_file (gdb_output_port, SCM_UNDEFINED);
|
||||
SEND_STRING (SCM_CHARS (SCM_STREAM (gdb_output_port)));
|
||||
{
|
||||
scm_port *pt = SCM_PTAB_ENTRY (gdb_output_port);
|
||||
|
||||
scm_flush (gdb_output_port);
|
||||
*(pt->write_buf + pt->read_buf_size) = 0;
|
||||
SEND_STRING (pt->read_buf);
|
||||
}
|
||||
SCM_END_FOREIGN_BLOCK;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -266,8 +266,7 @@ SCM scm_strport_to_string (SCM port)
|
|||
|
||||
if (pt->rw_active == SCM_PORT_WRITE)
|
||||
st_flush (port);
|
||||
return scm_makfromstr (SCM_CHARS (SCM_STREAM (port)),
|
||||
pt->read_buf_size, 0);
|
||||
return scm_makfromstr (pt->read_buf, pt->read_buf_size, 0);
|
||||
}
|
||||
|
||||
SCM_PROC(s_call_with_output_string, "call-with-output-string", 1, 0, 0, scm_call_with_output_string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue