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
This commit is contained in:
Janne Blomqvist 2009-04-10 11:26:56 +03:00
parent 6b6802109e
commit 4dadda8fb0
4 changed files with 9 additions and 30 deletions

View File

@ -1,3 +1,10 @@
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

View File

@ -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);

View File

@ -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;

View File

@ -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,