* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145876
138bc75d-0d04-0410-961f-
82ee72b054a4
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.
/* unix.c */
-extern int move_pos_offset (stream *, int);
-internal_proto(move_pos_offset);
-
extern int compare_files (stream *, stream *);
internal_proto(compare_files);
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;
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;
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,