diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-01-20 06:33:49 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-01-20 06:33:49 +0000 |
commit | 17c2c96cdcde260adce0c535e501f08371f5990e (patch) | |
tree | dedbc43dcc55e290acd9a5c365727c56e2e2ac08 /libgfortran/io/unix.c | |
parent | e08c673e0571253b8624c8c5d9a8886109c1adb2 (diff) | |
download | gcc-17c2c96cdcde260adce0c535e501f08371f5990e.zip gcc-17c2c96cdcde260adce0c535e501f08371f5990e.tar.gz gcc-17c2c96cdcde260adce0c535e501f08371f5990e.tar.bz2 |
inquire.c (inquire_via_unit): If a unit is opened...
2008-01-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/inquire.c (inquire_via_unit): If a unit is opened, return values
according to the open action for DIRECT, FORMATTED, and UNFORMATTED.
(inquire_via_filename): Return "UNKNOWN" for SEQUENTIAL, DIRECT,
FORAMATTED, and UNFORMATTED inquiries.
* io/unix.c (inquire_sequential): Return "UNKNOWN" when appropriate
for files that are not opened. (inquire_direct): Same.
(inquire_formatted): Same.
From-SVN: r131672
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r-- | libgfortran/io/unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 91d5adb..d33c110 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1806,7 +1806,7 @@ inquire_sequential (const char *string, int len) if (S_ISREG (statbuf.st_mode) || S_ISCHR (statbuf.st_mode) || S_ISFIFO (statbuf.st_mode)) - return yes; + return unknown; if (S_ISDIR (statbuf.st_mode) || S_ISBLK (statbuf.st_mode)) return no; @@ -1829,7 +1829,7 @@ inquire_direct (const char *string, int len) return unknown; if (S_ISREG (statbuf.st_mode) || S_ISBLK (statbuf.st_mode)) - return yes; + return unknown; if (S_ISDIR (statbuf.st_mode) || S_ISCHR (statbuf.st_mode) || S_ISFIFO (statbuf.st_mode)) @@ -1855,7 +1855,7 @@ inquire_formatted (const char *string, int len) if (S_ISREG (statbuf.st_mode) || S_ISBLK (statbuf.st_mode) || S_ISCHR (statbuf.st_mode) || S_ISFIFO (statbuf.st_mode)) - return yes; + return unknown; if (S_ISDIR (statbuf.st_mode)) return no; |