re PR fortran/32235 (incorrectly position text file after backspace)

2007-06-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/32235
	* io/transfer.c (st_read): Remove test for end of file condition.
	(next_record_r): Add test for end of file condition.

From-SVN: r125606
This commit is contained in:
Jerry DeLisle 2007-06-10 22:50:47 +00:00
parent 51c0074eed
commit 82fa3fc0d3
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2007-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/32235
* io/transfer.c (st_read): Remove test for end of file condition.
(next_record_r): Add test for end of file condition.
2007-06-02 Paolo Bonzini <bonzini@gnu.org>
* configure: Regenerate.

View File

@ -2268,6 +2268,14 @@ next_record_r (st_parameter_dt *dtp)
break;
}
if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL
&& !dtp->u.p.namelist_mode
&& dtp->u.p.current_unit->endfile == NO_ENDFILE
&& (file_length (dtp->u.p.current_unit->s) ==
file_position (dtp->u.p.current_unit->s)))
dtp->u.p.current_unit->endfile = AT_ENDFILE;
}
@ -2742,9 +2750,6 @@ st_read (st_parameter_dt *dtp)
switch (dtp->u.p.current_unit->endfile)
{
case NO_ENDFILE:
if (file_length (dtp->u.p.current_unit->s)
== file_position (dtp->u.p.current_unit->s))
dtp->u.p.current_unit->endfile = AT_ENDFILE;
break;
case AT_ENDFILE: