diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-10-21 23:24:48 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-10-21 23:24:48 +0000 |
commit | 7142e79ff38d960e45d6bcae03ec698967226dbb (patch) | |
tree | 785b5ef976f109e7f86e63c344a0781906606817 /Build/source/texk/web2c/lib/openclose.c | |
parent | 7d0aea6a5e929ae80c89a44bd96a2257386112d3 (diff) |
openclose.c: use dir_p() instead of defining a new function
git-svn-id: svn://tug.org/texlive/trunk@45570 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/lib/openclose.c')
-rw-r--r-- | Build/source/texk/web2c/lib/openclose.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c index 4ecf3827c93..57c4db9aae7 100644 --- a/Build/source/texk/web2c/lib/openclose.c +++ b/Build/source/texk/web2c/lib/openclose.c @@ -12,10 +12,6 @@ #include <ptexenc/ptexenc.h> #endif -#if !defined(_WIN32) -#include <sys/stat.h> -#endif - #ifdef WIN32 #undef fopen #undef xfopen @@ -150,14 +146,6 @@ recorder_record_output (const_string name) whether or not the open succeeded. If it did, `nameoffile' is set to the full filename opened, and `namelength' to its length. */ -#if !defined(_WIN32) -static int is_dirp (char *buff) -{ - struct stat stats; - return stat (buff, &stats) == 0 && S_ISDIR (stats.st_mode); -} -#endif - boolean open_input (FILE **f_ptr, int filefmt, const_string fopen_mode) { @@ -189,7 +177,7 @@ open_input (FILE **f_ptr, int filefmt, const_string fopen_mode) /* if fname is a directory, discard it. */ - if (*f_ptr && is_dirp (fname)) { + if (*f_ptr && dir_p (fname)) { fclose (*f_ptr); *f_ptr = NULL; } |