From 909ce14fc4ee350f4067730db563cbf0961891a3 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Wed, 23 Jan 2002 07:34:26 +0000 Subject: [PATCH] indent -kr -i8 --- io.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/io.c b/io.c index 95fb73b6..6085745d 100644 --- a/io.c +++ b/io.c @@ -256,7 +256,7 @@ static void read_loop (int fd, char *buf, size_t len) static int read_unbuffered(int fd, char *buf, size_t len) { static int remaining; - int tag, ret=0; + int tag, ret = 0; char line[1024]; if (!io_multiplexing_in || fd != multiplex_in_fd) @@ -271,23 +271,24 @@ static int read_unbuffered(int fd, char *buf, size_t len) continue; } - read_loop (fd, line, 4); + read_loop(fd, line, 4); tag = IVAL(line, 0); remaining = tag & 0xFFFFFF; tag = tag >> 24; - if (tag == MPLEX_BASE) continue; + if (tag == MPLEX_BASE) + continue; tag -= MPLEX_BASE; if (tag != FERROR && tag != FINFO) { - rprintf(FERROR,"unexpected tag %d\n", tag); + rprintf(FERROR, "unexpected tag %d\n", tag); exit_cleanup(RERR_STREAMIO); } - if (remaining > sizeof(line)-1) { - rprintf(FERROR,"multiplexing overflow %d\n\n", + if (remaining > sizeof(line) - 1) { + rprintf(FERROR, "multiplexing overflow %d\n\n", remaining); exit_cleanup(RERR_STREAMIO); } @@ -295,7 +296,7 @@ static int read_unbuffered(int fd, char *buf, size_t len) read_loop(fd, line, remaining); line[remaining] = 0; - rprintf((enum logcode)tag,"%s", line); + rprintf((enum logcode) tag, "%s", line); remaining = 0; } @@ -303,6 +304,7 @@ static int read_unbuffered(int fd, char *buf, size_t len) } + /* do a buffered read from fd. don't return until all N bytes have been read. If all N can't be read then exit with an error */ static void readfd (int fd, char *buffer, size_t N) -- 2.34.1