summaryrefslogtreecommitdiff
path: root/libguile/unif.c
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>1999-08-04 18:15:31 +0000
committerGary Houston <ghouston@arglist.com>1999-08-04 18:15:31 +0000
commit265e6a4d289146eb5d56c2764430b34da7580482 (patch)
treedec0450cc5cb52fa965afd3c2916a0509ae553dc /libguile/unif.c
parent82cc1b112c01d4bb8bf2cb445687aa11a4650888 (diff)
downloadguile-265e6a4d289146eb5d56c2764430b34da7580482.tar.gz
1999-08-04 Gary Houston <ghouston@easynet.co.uk>
* ports.c (scm_putc, scm_puts), * unif.c (scm_uniform_array_write): use scm_lfwrite. * ports.c (scm_putc): change type of first argument from int to char.
Diffstat (limited to 'libguile/unif.c')
-rw-r--r--libguile/unif.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/libguile/unif.c b/libguile/unif.c
index beabdd1c3..e4b2c08d4 100644
--- a/libguile/unif.c
+++ b/libguile/unif.c
@@ -1692,31 +1692,10 @@ loop:
if (SCM_NIMP (port_or_fd))
{
- scm_port *pt = SCM_PTAB_ENTRY (port_or_fd);
- int remaining = (cend - offset) * sz;
char *source = SCM_CHARS (v) + (cstart + offset) * sz;
- scm_ptob_descriptor *ptob = &scm_ptobs[SCM_PTOBNUM (port_or_fd)];
ans = cend - offset;
- if (pt->rw_active == SCM_PORT_READ)
- scm_read_flush (port_or_fd);
-
- while (remaining > 0)
- {
- int to_copy = min (pt->write_end - pt->write_pos, remaining);
-
- memcpy (pt->write_pos, source, to_copy);
- pt->write_pos += to_copy;
- source += to_copy;
- remaining -= to_copy;
- if (pt->write_pos == pt->write_end)
- ptob->fflush (port_or_fd);
- }
-
- if (pt->rw_random)
- {
- pt->rw_active = SCM_PORT_WRITE;
- }
+ scm_lfwrite (source, ans * sz, port_or_fd);
}
else /* file descriptor. */
{