2006-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
commit3c43c91f0de690634b3936417bf071951264ee8c
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Sep 2006 13:16:15 +0000 (15 13:16 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Sep 2006 13:16:15 +0000 (15 13:16 +0000)
treea336065f8c97480fad109a951d2c4da52142fd4a
parent1db61145aec790fea24e667b0e2059ac835e6b83
2006-09-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/29053
* io.h (gfc_unit): Add variable, strm_pos, to track
STREAM I/O file position.
* file_pos.c (st_rewind): Set strm_pos to beginning.
* open.c (new_unit): Initialize strm_pos.
* read.c (read_x): Bump strm_pos.
* inquire.c (inquire_via_unit): Return strm_pos value.
* transfer.c (read_block),(read_block_direct),(write_block)
(write_buf): Seek to strm_pos - 1.  Update strm_pos when done.
(pre_position): Initialize strm_pos.
(data_transfer_init): Set strm_pos if DT_HAS_REC.
(finalize_transfer): Flush file, no need to update strm_pos.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116970 138bc75d-0d04-0410-961f-82ee72b054a4
libgfortran/ChangeLog
libgfortran/io/file_pos.c
libgfortran/io/inquire.c
libgfortran/io/io.h
libgfortran/io/open.c
libgfortran/io/read.c
libgfortran/io/transfer.c