diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvi.c | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvipdfmx.c | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/spc_html.c | 14 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/spc_util.c | 12 |
5 files changed, 44 insertions, 7 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 5a0911bb9e2..67f1fc03fdd 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,8 @@ +2017-04-26 Paul Vojta <vojta@math.berkeley.edu> + + * dvi.c, dvipdfmx.c, spc_html.c, spc_util.c: Support additional + length units. + 2017-04-16 Shunsaku Hirata <shunsaku.hirata74@gmail.com> * tt_cmap.c: Fix a bug that generation of GID to CID mapping for diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c index 69c9e85acb5..29b07a67a3c 100644 --- a/Build/source/texk/dvipdfm-x/dvi.c +++ b/Build/source/texk/dvipdfm-x/dvi.c @@ -2157,7 +2157,11 @@ read_length (double *vp, double mag, const char **pp, const char *endptr) #define K_UNIT__CM 2 #define K_UNIT__MM 3 #define K_UNIT__BP 4 - "pt", "in", "cm", "mm", "bp", +#define K_UNIT__PC 5 +#define K_UNIT__DD 6 +#define K_UNIT__CC 7 +#define K_UNIT__SP 8 + "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp", NULL }; int k, error = 0; @@ -2193,6 +2197,10 @@ read_length (double *vp, double mag, const char **pp, const char *endptr) case K_UNIT__CM: u *= 72.0 / 2.54 ; break; case K_UNIT__MM: u *= 72.0 / 25.4 ; break; case K_UNIT__BP: u *= 1.0 ; break; + case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break; + case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break; default: WARN("Unknown unit of measure: %s", q); error = -1; diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c index bb8e56730cd..f262951deac 100644 --- a/Build/source/texk/dvipdfm-x/dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c @@ -257,7 +257,11 @@ read_length (double *vp, const char **pp, const char *endptr) #define K_UNIT__CM 2 #define K_UNIT__MM 3 #define K_UNIT__BP 4 - "pt", "in", "cm", "mm", "bp", +#define K_UNIT__PC 5 +#define K_UNIT__DD 6 +#define K_UNIT__CC 7 +#define K_UNIT__SP 8 + "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp", NULL }; int k, error = 0; @@ -292,6 +296,10 @@ read_length (double *vp, const char **pp, const char *endptr) case K_UNIT__CM: u *= 72.0 / 2.54 ; break; case K_UNIT__MM: u *= 72.0 / 25.4 ; break; case K_UNIT__BP: u *= 1.0 ; break; + case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break; + case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break; default: WARN("Unknown unit of measure: %s", q); error = -1; diff --git a/Build/source/texk/dvipdfm-x/spc_html.c b/Build/source/texk/dvipdfm-x/spc_html.c index 0f7f8d21ec0..83c6e0a28af 100644 --- a/Build/source/texk/dvipdfm-x/spc_html.c +++ b/Build/source/texk/dvipdfm-x/spc_html.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2017 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -486,8 +486,12 @@ atopt (const char *a) #define K_UNIT__CM 2 #define K_UNIT__MM 3 #define K_UNIT__BP 4 - "pt", "in", "cm", "mm", "bp", -#define K_UNIT__PX 5 +#define K_UNIT__PC 5 +#define K_UNIT__DD 6 +#define K_UNIT__CC 7 +#define K_UNIT__SP 8 + "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp", +#define K_UNIT__PX 9 "px", NULL }; @@ -511,6 +515,10 @@ atopt (const char *a) case K_UNIT__CM: u *= 72.0 / 2.54 ; break; case K_UNIT__MM: u *= 72.0 / 25.4 ; break; case K_UNIT__BP: u *= 1.0 ; break; + case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break; + case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break; case K_UNIT__PX: u *= 1.0 ; break; /* 72dpi */ default: WARN("Unknown unit of measure: %s", q); diff --git a/Build/source/texk/dvipdfm-x/spc_util.c b/Build/source/texk/dvipdfm-x/spc_util.c index c9cbcc87d0c..4c34ce03f3c 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-2016 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2017 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -290,7 +290,11 @@ spc_util_read_length (struct spc_env *spe, double *vp /* ret. */, struct spc_arg #define K_UNIT__CM 2 #define K_UNIT__MM 3 #define K_UNIT__BP 4 - "pt", "in", "cm", "mm", "bp", NULL +#define K_UNIT__PC 5 +#define K_UNIT__DD 6 +#define K_UNIT__CC 7 +#define K_UNIT__SP 8 + "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp", NULL }; int k, error = 0; @@ -325,6 +329,10 @@ spc_util_read_length (struct spc_env *spe, double *vp /* ret. */, struct spc_arg case K_UNIT__CM: u *= 72.0 / 2.54 ; break; case K_UNIT__MM: u *= 72.0 / 25.4 ; break; case K_UNIT__BP: u *= 1.0 ; break; + case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break; + case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break; + case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break; default: spc_warn(spe, "Unknown unit of measure: %s", q); error = -1; |