diff options
author | Paul Brook <paul@codesourcery.com> | 2004-08-31 15:53:31 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-08-31 15:53:31 +0000 |
commit | bd72d66cb5f8450f631da7149bf066f865d56338 (patch) | |
tree | eeec759a476bd4d9d5f8e220e891469fe79a14bb /libgfortran/io/unix.c | |
parent | c789f36b216c9318b7f5fadb3a632f91513e3156 (diff) | |
download | gcc-bd72d66cb5f8450f631da7149bf066f865d56338.zip gcc-bd72d66cb5f8450f631da7149bf066f865d56338.tar.gz gcc-bd72d66cb5f8450f631da7149bf066f865d56338.tar.bz2 |
transfer.c (read_sf): Rename uinty to readlen.
* io/transfer.c (read_sf): Rename uinty to readlen. Detect EOF.
(finalize_transfer): Move setjmp after namlist IO.
* io/unix.c (mem_alloc_r_at): Calculate remaining length correctly.
testsuite/
* gfortran.dg/eof_1.f90: New test.
From-SVN: r86831
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r-- | libgfortran/io/unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 0c65258..33d7fda 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -751,7 +751,7 @@ mem_alloc_r_at (unix_stream * s, int *len, gfc_offset where) s->logical_offset = where + *len; - n = (where - s->buffer_offset) - s->active; + n = s->buffer_offset + s->active - where; if (*len > n) *len = n; |