diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-09-14 03:34:50 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-09-14 03:34:50 +0000 |
commit | 00653d612add044de9f941c7b2c562bebe60d1e8 (patch) | |
tree | 46f2e9aa6440270f015d3e9d3d17f4d4ed709691 /Build/source/texk/dvipdfm-x/spc_util.c | |
parent | fb833e57545c4b4d76e01406904fdfd83f057447 (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_util.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/spc_util.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Build/source/texk/dvipdfm-x/spc_util.c b/Build/source/texk/dvipdfm-x/spc_util.c index 4c34ce03f3c..07426a6171e 100644 --- a/Build/source/texk/dvipdfm-x/spc_util.c +++ b/Build/source/texk/dvipdfm-x/spc_util.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2017 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2018 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -29,6 +29,7 @@ #include "error.h" #include "dpxutil.h" +#include "pdfdoc.h" #include "pdfdev.h" #include "pdfparse.h" #include "pdfcolor.h" @@ -718,7 +719,8 @@ spc_util_read_dimtrns (struct spc_env *spe, int spc_util_read_blahblah (struct spc_env *spe, - transform_info *p, int *page_no, int *bbox_type, + transform_info *p, int *page_no, + enum pdf_page_boundary *bbox_type, struct spc_arg *ap) { int has_scale, has_xscale, has_yscale, has_rotate, has_matrix; @@ -864,15 +866,15 @@ spc_util_read_blahblah (struct spc_env *spe, q = parse_c_ident (&ap->curptr, ap->endptr); if (q) { if (bbox_type) { - if (strcasecmp(q, "cropbox") == 0) *bbox_type = 1; - else if (strcasecmp(q, "mediabox") == 0) *bbox_type = 2; - else if (strcasecmp(q, "artbox") == 0) *bbox_type = 3; - else if (strcasecmp(q, "trimbox") == 0) *bbox_type = 4; - else if (strcasecmp(q, "bleedbox") == 0) *bbox_type = 5; + if (strcasecmp(q, "cropbox") == 0) *bbox_type = pdf_page_boundary_cropbox; + else if (strcasecmp(q, "mediabox") == 0) *bbox_type = pdf_page_boundary_mediabox; + else if (strcasecmp(q, "artbox") == 0) *bbox_type = pdf_page_boundary_artbox; + else if (strcasecmp(q, "trimbox") == 0) *bbox_type = pdf_page_boundary_trimbox; + else if (strcasecmp(q, "bleedbox") == 0) *bbox_type = pdf_page_boundary_bleedbox; } RELEASE(q); } else if (bbox_type) { - *bbox_type = 0; + *bbox_type = pdf_page_boundary__auto; } } break; |