From b93bad8b17f5dbbd5b4ef469b72d71171effdbb2 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Tue, 5 Apr 2016 09:14:41 +0000 Subject: web2c/luatexdir: sync with the upstream git-svn-id: svn://tug.org/texlive/trunk@40245 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/luatexdir/tex/mlist.w | 31 +++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/luatexdir/tex/mlist.w b/Build/source/texk/web2c/luatexdir/tex/mlist.w index 0fc21de7ceb..1695fb7ac8e 100644 --- a/Build/source/texk/web2c/luatexdir/tex/mlist.w +++ b/Build/source/texk/web2c/luatexdir/tex/mlist.w @@ -1532,11 +1532,9 @@ one that is expressed in `\.{mu}', given the value of the math unit. static pointer math_glue(pointer g, scaled m) { - pointer p; /* the new glue specification */ - int n; /* integer part of |m| */ - scaled f; /* fraction part of |m| */ - n = x_over_n(m, unity); - f = tex_remainder; + int n = x_over_n(m, unity); /* integer part of |m| */ + scaled f = tex_remainder; /* fraction part of |m| */ + pointer p; /* the new glue specification */ if (f < 0) { decr(n); f = f + unity; @@ -1556,6 +1554,22 @@ static pointer math_glue(pointer g, scaled m) return p; } +static void math_glue_to_glue(pointer p, scaled m) +{ + int n = x_over_n(m, unity); /* integer part of |m| */ + scaled f = tex_remainder; /* fraction part of |m| */ + if (f < 0) { + decr(n); + f = f + unity; + } + width(p) = mu_mult(width(p)); /* convert \.{mu} to \.{pt} */ + if (stretch_order(p) == normal) + stretch(p) = mu_mult(stretch(p)); + if (shrink_order(p) == normal) + shrink(p) = mu_mult(shrink(p)); + subtype(p) = normal; +} + @ The |math_kern| subroutine removes |mu_glue| from a kern node, given the value of the math unit. @@ -3789,8 +3803,6 @@ void mlist_to_hlist(pointer mlist, boolean penalties, int cur_style) int t; /* the effective |type| of noad |q| during the second pass */ int t_subtype; /* the effective |subtype| of noad |q| during the second pass */ pointer p = null; - pointer x = null; - pointer y = null; pointer z = null; int pen; /* a penalty to be inserted */ scaled max_hl = 0; /* maximum height of the list translated so far */ @@ -3964,10 +3976,7 @@ void mlist_to_hlist(pointer mlist, boolean penalties, int cur_style) */ if (subtype(q) == mu_glue) { - x = q; /* was ptr */ - y = math_glue(x, cur_mu); - q = y; /* we can get rid of the indirect */ - subtype(q) = normal; + math_glue_to_glue(q, cur_mu); } else if ((cur_size != text_size) && (subtype(q) == cond_math_glue)) { p = vlink(q); if (p != null) -- cgit v1.2.3