diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2009-04-10 11:26:56 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2009-04-10 11:26:56 +0300 |
commit | 4dadda8fb0ca2ba78608c3e86afcb2d12d5f7f25 (patch) | |
tree | 52480104f1578c38c5b2f261309ec8a4041319c8 /libgfortran | |
parent | 6b6802109eeaa57a3f0c13e24dd2c4d0e05bc06c (diff) | |
download | gcc-4dadda8fb0ca2ba78608c3e86afcb2d12d5f7f25.tar.gz |
io.h (move_pos_offset): Remove prototype.
2009-04-10 Janne Blomqvist <jb@gcc.gnu.org>
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.
From-SVN: r145876
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/io.h | 3 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 4 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 25 |
4 files changed, 9 insertions, 30 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index ed6162be686..b3fb58cb338 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,5 +1,12 @@ 2009-04-10 Janne Blomqvist <jb@gcc.gnu.org> + * io/io.h (move_pos_offset): Remove prototype. + * io/transfer.c (formatted_transfer_scalar_read): Use sseek + instead of move_pos_offset. + * io/unix.c (move_pos_offset): Remove. + +2009-04-10 Janne Blomqvist <jb@gcc.gnu.org> + PR libfortran/39665 libfortran/39702 libfortran/39709 * io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value. * io/list_read.c (read_complex): Read directly into user pointer. diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h index 7e4742ec294..c9b3db3da5f 100644 --- a/libgfortran/io/io.h +++ b/libgfortran/io/io.h @@ -707,9 +707,6 @@ fnode; /* unix.c */ -extern int move_pos_offset (stream *, int); -internal_proto(move_pos_offset); - extern int compare_files (stream *, stream *); internal_proto(compare_files); diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 343dfb8453a..717041d0b41 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1153,7 +1153,7 @@ formatted_transfer_scalar_read (st_parameter_dt *dtp, bt type, void *p, int kind if (dtp->u.p.skips < 0) { if (is_internal_unit (dtp)) - move_pos_offset (dtp->u.p.current_unit->s, dtp->u.p.skips); + sseek (dtp->u.p.current_unit->s, dtp->u.p.skips, SEEK_CUR); else fbuf_seek (dtp->u.p.current_unit, dtp->u.p.skips, SEEK_CUR); dtp->u.p.current_unit->bytes_left -= (gfc_offset) dtp->u.p.skips; @@ -1329,7 +1329,7 @@ formatted_transfer_scalar_write (st_parameter_dt *dtp, bt type, void *p, int kin if (dtp->u.p.skips < 0) { if (is_internal_unit (dtp)) - move_pos_offset (dtp->u.p.current_unit->s, dtp->u.p.skips); + sseek (dtp->u.p.current_unit->s, dtp->u.p.skips, SEEK_CUR); else fbuf_seek (dtp->u.p.current_unit, dtp->u.p.skips, SEEK_CUR); dtp->u.p.current_unit->bytes_left -= (gfc_offset) dtp->u.p.skips; diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index fe181a122d9..4d5ec70ae84 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -146,31 +146,6 @@ typedef struct unix_stream; -/*move_pos_offset()-- Move the record pointer right or left - *relative to current position */ - -int -move_pos_offset (stream* st, int pos_off) -{ - unix_stream * str = (unix_stream*)st; - if (pos_off < 0) - { - str->logical_offset += pos_off; - - if (str->ndirty > str->logical_offset) - { - if (str->ndirty + pos_off > 0) - str->ndirty += pos_off; - else - str->ndirty = 0; - } - - return pos_off; - } - return 0; -} - - /* fix_fd()-- Given a file descriptor, make sure it is not one of the * standard descriptors, returning a non-standard descriptor. If the * user specifies that system errors should go to standard output, |