summaryrefslogtreecommitdiff
path: root/byterun/io.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2000-01-07 16:05:19 +0000
committerDamien Doligez <damien.doligez-inria.fr>2000-01-07 16:05:19 +0000
commit00089ba61a960ea4f85ff6945558b3c512b1dbaa (patch)
treef73401da1dedcc8e61a129ac186a4d5e003b3d9e /byterun/io.c
parent96ddeabcb78cbce02561d9ae66891d7e56a8fc68 (diff)
downloadocaml-00089ba61a960ea4f85ff6945558b3c512b1dbaa.tar.gz
detabisation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2741 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/io.c')
-rw-r--r--byterun/io.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/byterun/io.c b/byterun/io.c
index 24949c5789..1f0e04be26 100644
--- a/byterun/io.c
+++ b/byterun/io.c
@@ -52,7 +52,7 @@ void (*channel_mutex_unlock_exn) (void) = NULL;
No locking is performed. */
/* Functions shared between input and output */
-
+
struct channel * open_descriptor(int fd)
{
struct channel * channel;
@@ -71,7 +71,7 @@ void close_channel(struct channel *channel)
close(channel->fd);
if (channel_mutex_free != NULL) (*channel_mutex_free)(channel);
stat_free(channel);
-}
+}
long channel_size(struct channel *channel)
{
@@ -356,7 +356,7 @@ long input_scan_line(struct channel *channel)
n = do_read(channel->fd, channel->max, channel->end - channel->max);
if (n == 0) {
/* End-of-file encountered. Return the number of characters in the
- buffer, with negative sign since we haven't encountered
+ buffer, with negative sign since we haven't encountered
a newline. */
return -(channel->max - channel->curr);
}
@@ -479,11 +479,11 @@ value caml_output(value vchannel, value buff, value start, value length) /* ML *
long len = Long_val(length);
Lock(channel);
- while (len > 0) {
- int written = putblock(channel, &Byte(buff, pos), len);
- pos += written;
- len -= written;
- }
+ while (len > 0) {
+ int written = putblock(channel, &Byte(buff, pos), len);
+ pos += written;
+ len -= written;
+ }
Unlock(channel);
CAMLreturn (Val_unit);
}
@@ -563,4 +563,3 @@ value caml_input_scan_line(value vchannel) /* ML */
Unlock(channel);
return Val_long(res);
}
-