diff options
Diffstat (limited to 'libgfortran/io/open.c')
| -rw-r--r-- | libgfortran/io/open.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 44ff69d68db..742610a3ef6 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -109,19 +109,6 @@ static const st_option convert_opt[] = { NULL, 0} }; -/* Given a unit, test to see if the file is positioned at the terminal - point, and if so, change state from NO_ENDFILE flag to AT_ENDFILE. - This prevents us from changing the state from AFTER_ENDFILE to - AT_ENDFILE. */ - -void -test_endfile (gfc_unit * u) -{ - if (u->endfile == NO_ENDFILE && file_length (u->s) == file_position (u->s)) - u->endfile = AT_ENDFILE; -} - - /* Change the modes of a file, those that are allowed * to be changed. */ @@ -208,8 +195,6 @@ edit_modes (st_parameter_open *opp, gfc_unit * u, unit_flags * flags) u->current_record = 0; u->last_record = 0; - - test_endfile (u); /* We might be at the end. */ break; case POSITION_APPEND: @@ -487,13 +472,6 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) memmove (u->file, opp->file, opp->file_len); u->file_len = opp->file_len; - /* Curiously, the standard requires that the - position specifier be ignored for new files so a newly connected - file starts out at the initial point. We still need to figure - out if the file is at the end or not. */ - - test_endfile (u); - if (flags->status == STATUS_SCRATCH && opp->file != NULL) free_mem (opp->file); return u; |

