summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/spc_pdfm.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-09-14 03:34:50 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-09-14 03:34:50 +0000
commit00653d612add044de9f941c7b2c562bebe60d1e8 (patch)
tree46f2e9aa6440270f015d3e9d3d17f4d4ed709691 /Build/source/texk/dvipdfm-x/spc_pdfm.c
parentfb833e57545c4b4d76e01406904fdfd83f057447 (diff)
Cleanup. Remove duplicated code. Reorganize global variables. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@48663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/spc_pdfm.c')
-rw-r--r--Build/source/texk/dvipdfm-x/spc_pdfm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.c b/Build/source/texk/dvipdfm-x/spc_pdfm.c
index 66501a16634..ead09a03bf5 100644
--- a/Build/source/texk/dvipdfm-x/spc_pdfm.c
+++ b/Build/source/texk/dvipdfm-x/spc_pdfm.c
@@ -36,6 +36,7 @@
#include "fontmap.h"
#include "dpxfile.h"
#include "dpxutil.h"
+#include "dpxconf.h"
#include "unicode.h"
@@ -553,7 +554,7 @@ modstrings (pdf_obj *kp, pdf_obj *vp, void *dp)
CMap *cmap = CMap_cache_get(cd->cmap_id);
if (needreencode(kp, vp, cd))
r = reencodestring(cmap, vp);
- } else if (is_xdv && cd && cd->taintkeys) {
+ } else if ((dpx_conf.compat_mode == dpx_mode_xdv_mode) && cd && cd->taintkeys) {
/* Please fix this... PDF string object is not always a text string.
* needreencode() is assumed to do a simple check if given string
* object is actually a text string.
@@ -581,7 +582,7 @@ parse_pdf_dict_with_tounicode (const char **pp, const char *endptr, struct touni
pdf_obj *dict;
/* disable this test for XDV files, as we do UTF8 reencoding with no cmap */
- if (!is_xdv && cd->cmap_id < 0)
+ if ((dpx_conf.compat_mode != dpx_mode_xdv_mode) && cd->cmap_id < 0)
return parse_pdf_dict(pp, endptr, NULL);
/* :( */
@@ -1077,7 +1078,7 @@ spc_handler_pdfm_image (struct spc_env *spe, struct spc_arg *args)
pdf_dev_put_image(xobj_id, &ti, spe->x_user, spe->y_user);
if (ident) {
- if (compat_mode &&
+ if ((dpx_conf.compat_mode == dpx_mode_compat_mode) &&
pdf_ximage_get_subtype(xobj_id) == PDF_XOBJECT_TYPE_IMAGE)
pdf_ximage_set_attr(xobj_id, 1, 1, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0);
addresource(sd, ident, xobj_id);
@@ -1108,7 +1109,7 @@ spc_handler_pdfm_dest (struct spc_env *spe, struct spc_arg *args)
}
#if 0
- if (is_xdv && maybe_reencode_utf8(name) < 0)
+ if ((dpx_conf.compat_mode == dpx_mode_xdv_mode) && maybe_reencode_utf8(name) < 0)
WARN("Failed to convert input string to UTF16...");
#endif