aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2005-06-17 00:13:26 +0200
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2005-06-16 22:13:26 +0000
commit2f06ccc69e7513ff60afd0290e4a50f6961eb5bf (patch)
tree1d6aa9458c41d21dec52f9b06ae1138a18260d29 /libgfortran/io/unix.c
parent0518582d92b902d750f0e9d0aeaf0f4d40b5454c (diff)
downloadgcc-2f06ccc69e7513ff60afd0290e4a50f6961eb5bf.zip
gcc-2f06ccc69e7513ff60afd0290e4a50f6961eb5bf.tar.gz
gcc-2f06ccc69e7513ff60afd0290e4a50f6961eb5bf.tar.bz2
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
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c18
1 files changed, 7 insertions, 11 deletions
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;
}