r180701 - in /trunk/libgfortran: ChangeLog io/f...
jb@gcc.gnu.org
jb@gcc.gnu.org
Mon Oct 31 14:45:00 GMT 2011
Author: jb
Date: Mon Oct 31 14:45:50 2011
New Revision: 180701
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180701
Log:
Simplify handling of special files.
2011-10-31 Janne Blomqvist <jb@gcc.gnu.org>
* io/file_pos.c (st_rewind): Handle regular and special files
identically.
* io/intrinsics.c (fseek_sub): Don't check whether we think the
file is seekable, just do what the caller says.
* io/transfer.c (skip_record): First try to seek, then fallback to
reading and throwing away what we read.
* io/unit.c (update_position): Don't check whether file is
seekable, just try to do what we're told.
(unit_truncate): Likewise.
* io/unix.c (struct unix_stream): Remove special_file flag.
(buf_flush): Remove code for handling unseekable files.
(buf_seek): Likewise.
(fd_to_stream): Use buffered IO only for regular files.
(file_length): Remove is_seekable() call.
(is_seekable): Remove function.
(is_special): Likewise.
* io/unix.h: Remove prototypes for is_seekable and is_special.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/file_pos.c
trunk/libgfortran/io/intrinsics.c
trunk/libgfortran/io/transfer.c
trunk/libgfortran/io/unit.c
trunk/libgfortran/io/unix.c
trunk/libgfortran/io/unix.h
More information about the Gcc-cvs
mailing list