diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-17 04:33:03 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-17 04:33:03 +0000 |
commit | 88544379a8817dd9e6bda685a21ee8229a13df0e (patch) | |
tree | 5be1759db610dde4e0ea428139ffbb03ab2ac794 /Build/source/texk/web2c/luatexdir/image | |
parent | cec52b672b7828d5f6d62582f4a0415b51baed58 (diff) |
web2c/luatexdir: Sync with the upstream.
git-svn-id: svn://tug.org/texlive/trunk@38879 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/image')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/image/writeimg.w | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/luatexdir/image/writeimg.w b/Build/source/texk/web2c/luatexdir/image/writeimg.w index a93fb6de642..ff667cfe62e 100644 --- a/Build/source/texk/web2c/luatexdir/image/writeimg.w +++ b/Build/source/texk/web2c/luatexdir/image/writeimg.w @@ -309,20 +309,23 @@ void read_img(PDF pdf, char *filepath = NULL; int callback_id; assert(idict != NULL); - if (img_filename(idict) == NULL) + if (img_filename(idict) == NULL) { luatex_fail("image file name missing"); + } callback_id = callback_defined(find_image_file_callback); if (img_filepath(idict) == NULL) { - if (callback_id > 0 - && run_callback(callback_id, "S->S", img_filename(idict), - &filepath)) { - if (filepath && (strlen(filepath) > 0)) - img_filepath(idict) = strdup(filepath); - } else - img_filepath(idict) = - kpse_find_file(img_filename(idict), kpse_tex_format, true); - if (img_filepath(idict) == NULL) + if (callback_id > 0) { + if (run_callback(callback_id, "S->S", img_filename(idict),&filepath)) { + if (filepath && (strlen(filepath) > 0)) { + img_filepath(idict) = strdup(filepath); + } + } + } else { + img_filepath(idict) = kpse_find_file(img_filename(idict), kpse_tex_format, true); + } + if (img_filepath(idict) == NULL) { luatex_fail("cannot find image file '%s'", img_filename(idict)); + } } recorder_record_input(img_filename(idict)); /* type checks */ |