diff options
author | Yukimasa Morimi <h20y6m@yahoo.co.jp> | 2024-04-07 07:26:21 +0000 |
---|---|---|
committer | Yukimasa Morimi <h20y6m@yahoo.co.jp> | 2024-04-07 07:26:21 +0000 |
commit | c730811dded743d861a0869f7aaa3a2d4cf77296 (patch) | |
tree | f5baa2d3258997b985efcd68730e1ef11de9d5ff /Build/source | |
parent | c35b7aedab14306bcc3be8dc8937eb883386c99b (diff) |
dvipdfm-x: fix an issue where the PDF becomes large when inserting the same image multiple times.
git-svn-id: svn://tug.org/texlive/trunk@70880 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 7 | ||||
-rwxr-xr-x | Build/source/texk/dvipdfm-x/configure | 22 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/configure.ac | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfximage.c | 29 |
4 files changed, 35 insertions, 25 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 290df03927e..ac6e903e440 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,10 @@ +2024-04-07 Yukimasa Morimi <h20y6m@yahoo.co.jp> + + * pdfximage.c: fix an issue where the PDF becomes large when + inserting the same image multiple times. + https://github.com/texjporg/tex-jp-build/pull/169 + * configure.ac: version 20240407. + 2024-03-10 Karl Berry <karl@tug.org> * TL'24 release. diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure index 1982b3e84c9..df72ebd14e7 100755 --- a/Build/source/texk/dvipdfm-x/configure +++ b/Build/source/texk/dvipdfm-x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for dvipdfm-x (TeX Live) 20240305. +# Generated by GNU Autoconf 2.72 for dvipdfm-x (TeX Live) 20240407. # # Report bugs to <dvipdfmx@tug.org>. # @@ -614,8 +614,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dvipdfm-x (TeX Live)' PACKAGE_TARNAME='dvipdfm-x--tex-live-' -PACKAGE_VERSION='20240305' -PACKAGE_STRING='dvipdfm-x (TeX Live) 20240305' +PACKAGE_VERSION='20240407' +PACKAGE_STRING='dvipdfm-x (TeX Live) 20240407' PACKAGE_BUGREPORT='dvipdfmx@tug.org' PACKAGE_URL='' @@ -1383,7 +1383,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures dvipdfm-x (TeX Live) 20240305 to adapt to many kinds of systems. +'configure' configures dvipdfm-x (TeX Live) 20240407 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1455,7 +1455,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20240305:";; + short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20240407:";; esac cat <<\_ACEOF @@ -1586,7 +1586,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dvipdfm-x (TeX Live) configure 20240305 +dvipdfm-x (TeX Live) configure 20240407 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2367,7 +2367,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dvipdfm-x (TeX Live) $as_me 20240305, which was +It was created by dvipdfm-x (TeX Live) $as_me 20240407, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -8928,7 +8928,7 @@ fi # Define the identity of the package. PACKAGE='dvipdfm-x--tex-live-' - VERSION='20240305' + VERSION='20240407' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15995,7 +15995,7 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@gnu.org>." lt_cl_version="\ -dvipdfm-x (TeX Live) config.lt 20240305 +dvipdfm-x (TeX Live) config.lt 20240407 configured by $0, generated by GNU Autoconf 2.72. Copyright (C) 2011 Free Software Foundation, Inc. @@ -17938,7 +17938,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dvipdfm-x (TeX Live) $as_me 20240305, which was +This file was extended by dvipdfm-x (TeX Live) $as_me 20240407, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18010,7 +18010,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -dvipdfm-x (TeX Live) config.status 20240305 +dvipdfm-x (TeX Live) config.status 20240407 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/dvipdfm-x/configure.ac b/Build/source/texk/dvipdfm-x/configure.ac index 06580d0f06e..faf55681f3a 100644 --- a/Build/source/texk/dvipdfm-x/configure.ac +++ b/Build/source/texk/dvipdfm-x/configure.ac @@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -AC_INIT([dvipdfm-x (TeX Live)], [20240305], [dvipdfmx@tug.org]) +AC_INIT([dvipdfm-x (TeX Live)], [20240407], [dvipdfmx@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([agl.c]) AC_CONFIG_AUX_DIR([../../build-aux]) diff --git a/Build/source/texk/dvipdfm-x/pdfximage.c b/Build/source/texk/dvipdfm-x/pdfximage.c index 275f6777b5b..d91b33d694d 100644 --- a/Build/source/texk/dvipdfm-x/pdfximage.c +++ b/Build/source/texk/dvipdfm-x/pdfximage.c @@ -396,6 +396,8 @@ load_image (const char *ident, const char *filename, const char *fullname, int f int utf8name_failed = 0; #endif /* WIN32 */ +#define dpx_streq(a, b) ((a) == (b) || (a) && (b) && strcmp(a, b) == 0) + int pdf_ximage_load_image (const char *ident, const char *filename, load_options options) { @@ -408,20 +410,21 @@ pdf_ximage_load_image (const char *ident, const char *filename, load_options opt for (i = 0; i < ic->count; i++) { I = &ic->ximages[i]; - if (I->filename && !strcmp(filename, I->filename)) { - id = i; - break; - } - } - if (id >= 0) { - if (I->attr.page_no == options.page_no && - (I->attr.page_name && options.page_name && - strcmp(I->attr.page_name, options.page_name) == 0) && - !pdf_compare_object(I->attr.dict, options.dict) && /* ????? */ - I->attr.bbox_type == options.bbox_type) { - return id; - } + if (I->filename == NULL || strcmp(filename, I->filename) != 0) + continue; + id = i; f = I->fullname; + + if (I->attr.page_no != options.page_no) + continue; + if (!dpx_streq(I->attr.page_name, options.page_name)) + continue; + if (pdf_compare_object(I->attr.dict, options.dict) != 0) /* ????? */ + continue; + if (I->attr.bbox_type != options.bbox_type) + continue; + + return id; } if (f) { /* we already have converted this file; f is the temporary file name */ |