From 2f06ccc69e7513ff60afd0290e4a50f6961eb5bf Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Fri, 17 Jun 2005 00:13:26 +0200 Subject: re PR libfortran/16436 (gfortran TL edit descriptor failure - test f77-edit-t-in.f) PR libfortran/16436 * io/transfer.c (read_sf): Correct updating of bytes_left field. (formatted_transfer): Correct updating of bytes_left field and reformatting code (comments and whitespace). * io/unix.c (move_pos_offset): "active" field should not be changed here. Whitespace corrections. * gfortran.dg/g77/f77-edit-t-in.f: Not XFAIL-ed any more. From-SVN: r101100 --- libgfortran/io/unix.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'libgfortran/io/unix.c') diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index f82ffa7..f4ee889 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -154,26 +154,22 @@ move_pos_offset (stream* st, int pos_off) unix_stream * str = (unix_stream*)st; if (pos_off < 0) { - str->active += pos_off; - if (str->active < 0) - str->active = 0; + str->logical_offset += pos_off; - str->logical_offset += pos_off; - - if (str->dirty_offset+str->ndirty > str->logical_offset) + if (str->dirty_offset + str->ndirty > str->logical_offset) { - if (str->ndirty + pos_off > 0) - str->ndirty += pos_off ; + if (str->ndirty + pos_off > 0) + str->ndirty += pos_off; else { str->dirty_offset += pos_off + pos_off; - str->ndirty = 0 ; + str->ndirty = 0; } } - return pos_off ; + return pos_off; } - return 0 ; + return 0; } -- cgit v1.1