diff options
author | Thomas Fitzsimmons <fitzsim@redhat.com> | 2002-04-30 18:23:40 +0000 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@redhat.com> | 2002-04-30 18:23:40 +0000 |
commit | bfc27bae1acb55886146a7c67f85cf752b5d532c (patch) | |
tree | b50cd33ffa95c856e6d7d1e6bc506acc643e8f7e /newlib/libc/stdio/fread.c | |
parent | 1bf83a86f6487859997dd2161a408df6be9f032a (diff) | |
download | cygnal-bfc27bae1acb55886146a7c67f85cf752b5d532c.tar.gz cygnal-bfc27bae1acb55886146a7c67f85cf752b5d532c.tar.bz2 cygnal-bfc27bae1acb55886146a7c67f85cf752b5d532c.zip |
* Various formatting and whitespace changes.
Diffstat (limited to 'newlib/libc/stdio/fread.c')
-rw-r--r-- | newlib/libc/stdio/fread.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c index c4c66b4d6..38f791b6d 100644 --- a/newlib/libc/stdio/fread.c +++ b/newlib/libc/stdio/fread.c @@ -62,10 +62,10 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #ifdef __SCLE static size_t _DEFUN (crlf, (fp, buf, count, eof), - FILE * fp _AND - char * buf _AND - size_t count _AND - int eof) + FILE * fp _AND + char * buf _AND + size_t count _AND + int eof) { int newcount = 0, r; char *s, *d, *e; @@ -77,19 +77,19 @@ _DEFUN (crlf, (fp, buf, count, eof), for (s=d=buf; s<e-1; s++) { if (*s == '\r' && s[1] == '\n') - s++; + s++; *d++ = *s; } if (s < e) { if (*s == '\r') - { - int c = __sgetc_raw(fp); - if (c == '\n') - *s = '\n'; - else - ungetc(c, fp); - } + { + int c = __sgetc_raw(fp); + if (c == '\n') + *s = '\n'; + else + ungetc(c, fp); + } *d++ = *s++; } @@ -98,7 +98,7 @@ _DEFUN (crlf, (fp, buf, count, eof), { r = getc(fp); if (r == EOF) - return count - (e-d); + return count - (e-d); *d++ = r; } @@ -138,7 +138,7 @@ _DEFUN (fread, (buf, size, count, fp), { /* no more input: return partial result */ #ifdef __SCLE - if (fp->_flags & __SCLE) + if (fp->_flags & __SCLE) return crlf(fp, buf, total-resid, 1) / size; #endif return (total - resid) / size; |