diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-06-22 06:38:14 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-06-22 06:38:14 +0000 |
commit | bad2d10385968453948ad928049c842abfa78520 (patch) | |
tree | 3d389dfd1ef6d17dcf78bfd366bb51d922c24440 /Build/source/texk/dvipdfm-x/pdfximage.c | |
parent | 97eb2daa54c0ac3b6d54425c4e07fc52822140c6 (diff) |
Use MFOPEN() instead of fopen(), etc.
git-svn-id: svn://tug.org/texlive/trunk@55623 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfximage.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfximage.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfximage.c b/Build/source/texk/dvipdfm-x/pdfximage.c index f613d5b1df0..b6b536588b0 100644 --- a/Build/source/texk/dvipdfm-x/pdfximage.c +++ b/Build/source/texk/dvipdfm-x/pdfximage.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2019 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2020 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -62,6 +62,9 @@ static int ps_include_page (pdf_ximage *ximage, #define IMAGE_TYPE_BMP 6 #define IMAGE_TYPE_JP2 7 +#if defined(_WIN32) +extern int fsyscp_stat(const char *path, struct stat *buffer); +#endif /* _WIN32 */ struct attr_ { @@ -964,9 +967,17 @@ ps_include_page (pdf_ximage *ximage, const char *filename, load_options options) } #endif +#if defined(_WIN32) + if (dpx_conf.file.keep_cache != -1 && + (fsyscp_stat(temp, &stat_t)==0 || stat(temp, &stat_t)==0) && + (fsyscp_stat(filename, &stat_o)==0 || + stat(filename, &stat_o)==0) && + stat_t.st_mtime > stat_o.st_mtime) { +#else if (dpx_conf.file.keep_cache != -1 && stat(temp, &stat_t)==0 && stat(filename, &stat_o)==0 && stat_t.st_mtime > stat_o.st_mtime) { +#endif /* _WIN32 */ /* cache exist */ /*printf("\nLast file modification: %s", ctime(&stat_o.st_mtime)); printf("Last file modification: %s", ctime(&stat_t.st_mtime));*/ |