[PATCH] Fix backspace.f (PR libgfortran/20930)

Steven Bosscher stevenb@suse.de
Tue Apr 26 19:38:00 GMT 2005


On Tuesday 26 April 2005 20:49, David Edelsohn wrote:
> 	* io/rewind.c (st_rewind): Flush the stream when resetting the mode
> 	from WRITING to READING.

This is OK, thanks.

I guess we should re-sync mainline and 4.0 soon, your patch would be
included automatically.


> --- 55,65 ----
>   	     is the last record in the file, so truncate the file now.
>   	     Reset to read mode so two consecutive rewind statements
>   	     don't delete the file contents.  */
> !           if (u->mode == WRITING)
> ! 	    {
> ! 	      flush (u->s);
> ! 	      struncate (u->s);
> ! 	    }
>   	  u->mode = READING;
>   	  u->last_record = 0;
>   	  if (sseek (u->s, 0) == FAILURE)

Looks like spaces vs. tabs.  Can you make them tabs while you're here?

Gr.
Steven



More information about the Gcc-patches mailing list