diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-06-28 09:01:20 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-06-28 09:01:20 +0000 |
commit | 9ef73366dd8a69f3a6ff7e379dbfcd5ae6b1a7de (patch) | |
tree | 5fe08529d6474deef2bedc40cdd6732464927b3d /Build/source | |
parent | 24373ede47f19556de9ba2de8a95645b7fe30c28 (diff) |
Add missing memory release, missing variable initialization, etc. (S. Hirata).
git-svn-id: svn://tug.org/texlive/trunk@55685 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfcolor.c | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfdoc.c | 22 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/spc_dvipdfmx.c | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index dadfe8a719b..9ade4162636 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -9,6 +9,8 @@ area when it encounters "horizontal movement" such as DVI "right". Optionally height and depth of such area can be specified (default: current font size for height and depth 0). + * pdfcolor.c: Change prefix for ColorSpace resource name to "XC". + * pdfdoc.c: Add missing release object. 2020-06-27 Shunsaku Hirata <shunsaku.hirata74@gmail.com> diff --git a/Build/source/texk/dvipdfm-x/pdfcolor.c b/Build/source/texk/dvipdfm-x/pdfcolor.c index da4be21844f..55b26484b98 100644 --- a/Build/source/texk/dvipdfm-x/pdfcolor.c +++ b/Build/source/texk/dvipdfm-x/pdfcolor.c @@ -351,7 +351,7 @@ pdf_color_set_color (const pdf_color *color, char *buffer, size_t buffer_len, ch { char res_name[16]; - snprintf(res_name, 8, "CS_%d", color->res_id & 0xffff); /* TODO: Upper 16bits for category ID. See, pdfresource.c */ + snprintf(res_name, 8, "XC%d", color->res_id & 0xffff); /* TODO: Upper 16bits for category ID. See, pdfresource.c */ res_name[8] = 0; len += sprintf(buffer+len, " /%s %c%c", res_name, 'C' | mask, 'S' | mask); for (i = 0; i < color->num_components; i++) { diff --git a/Build/source/texk/dvipdfm-x/pdfdoc.c b/Build/source/texk/dvipdfm-x/pdfdoc.c index 6c8f1a446ba..3cb44d3e7bc 100644 --- a/Build/source/texk/dvipdfm-x/pdfdoc.c +++ b/Build/source/texk/dvipdfm-x/pdfdoc.c @@ -536,19 +536,15 @@ pdf_doc_add_page_resource (const char *category, pdf_obj *resources; pdf_obj *duplicate; -#if 0 - if (!PDF_OBJ_INDIRECTTYPE(resource_ref)) { - WARN("Passed non indirect reference..."); - resource_ref = pdf_ref_obj(resource_ref); /* leak */ - } -#endif resources = pdf_doc_get_page_resources(p, category); duplicate = pdf_lookup_dict(resources, resource_name); - if (duplicate && pdf_compare_reference(duplicate, resource_ref)) { - WARN("Conflicting page resource found (page: %d, category: %s, name: %s).", - pdf_doc_current_page_number(), category, resource_name); - WARN("Ignoring..."); - pdf_release_obj(resource_ref); + if (duplicate) { + if (pdf_compare_reference(duplicate, resource_ref)) { + WARN("Possibly two different resource using the same name... (page: %d, category: %s, name: %s).", + pdf_doc_current_page_number(), category, resource_name); + WARN("Ignoring..."); + } + pdf_release_obj(resource_ref); /* Discard */ } else { pdf_add_dict(resources, pdf_new_name(resource_name), resource_ref); } @@ -2406,9 +2402,9 @@ static pdf_color bgcolor = { -1, PDF_COLORSPACE_TYPE_GRAY, 1, NULL, { 1.0 }, -1} void pdf_doc_set_bgcolor (const pdf_color *color) { - if (color) + if (color) { pdf_color_copycolor(&bgcolor, color); - else { /* as clear... */ + } else { /* as clear... */ pdf_color_white(&bgcolor); } } diff --git a/Build/source/texk/dvipdfm-x/spc_dvipdfmx.c b/Build/source/texk/dvipdfm-x/spc_dvipdfmx.c index a078cfb70e5..6b3fa703959 100644 --- a/Build/source/texk/dvipdfm-x/spc_dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/spc_dvipdfmx.c @@ -64,6 +64,8 @@ spc_handler_dvipdfmx_catch_phantom (struct spc_env *spe, struct spc_arg *args) skip_white(&args->curptr, args->endptr); if (mode == 1 && args->curptr < args->endptr) { transform_info ti; + + transform_info_clear(&ti); error = spc_util_read_dimtrns(spe, &ti, args, 0); if (error) return -1; |