aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/backspace.c1
-rw-r--r--libgfortran/io/unix.c3
3 files changed, 10 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index e90c0fa..a0b3ec1 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,5 +1,11 @@
2004-12-02 Bud Davis <bdavis9659@comcast.net>
+ PR libfortran/18284
+ * io/unix.c (fd_alloc_w_at): Update file_length when extending.
+ * io/backspace.c (formatted_backspace): Reset endfile after backspace.
+
+2004-12-02 Bud Davis <bdavis9659@comcast.net>
+
* io/inquire.c (inquire_via_unit): do not allow a direct access
file to be opened for sequential I/O.
diff --git a/libgfortran/io/backspace.c b/libgfortran/io/backspace.c
index c40e506..e378adf 100644
--- a/libgfortran/io/backspace.c
+++ b/libgfortran/io/backspace.c
@@ -77,6 +77,7 @@ done:
if (sseek (current_unit->s, base) == FAILURE)
goto io_error;
current_unit->last_record--;
+ current_unit->endfile = NO_ENDFILE;
return;
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 5be631a..8e3afbd 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -462,6 +462,9 @@ fd_alloc_w_at (unix_stream * s, int *len, gfc_offset where)
s->logical_offset = where + *len;
+ if (where + *len > s->file_length)
+ s->file_length = where + *len;
+
n = s->logical_offset - s->buffer_offset;
if (n > s->active)
s->active = n;