summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/tex
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2020-02-15 12:45:08 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2020-02-15 12:45:08 +0000
commit1eb99bf05849e3108129d32eaacaa40c9e266c4b (patch)
tree23d14dd9414feedf2c78eb5029a5c7ed60c2bca2 /Build/source/texk/web2c/luatexdir/tex
parentc919a62f6a535e0c586534c9ac6d8f671d91c02c (diff)
sync with luatex rev. 7287
git-svn-id: svn://tug.org/texlive/trunk@53789 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex')
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/filename.c4
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/linebreak.c17
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/maincontrol.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/postlinebreak.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texmath.c6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texnodes.c3
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/textoken.c2
7 files changed, 24 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/filename.c b/Build/source/texk/web2c/luatexdir/tex/filename.c
index b1f810d2305..1e06e877ae8 100644
--- a/Build/source/texk/web2c/luatexdir/tex/filename.c
+++ b/Build/source/texk/web2c/luatexdir/tex/filename.c
@@ -197,6 +197,8 @@ void scan_file_name_toks(void)
{
char *a, *n, *e, *s = NULL;
int i, l = 0;
+ int save_scanner_status = scanner_status;
+ halfword save_def_ref = def_ref;
(void) scan_toks(false, true);
s = tokenlist_to_cstring(def_ref, true, &l);
a = n = s;
@@ -224,6 +226,8 @@ void scan_file_name_toks(void)
cur_ext = get_nullstr();
}
flush_list(def_ref);
+ scanner_status = save_scanner_status;
+ def_ref = save_def_ref;
xfree(s);
}
diff --git a/Build/source/texk/web2c/luatexdir/tex/linebreak.c b/Build/source/texk/web2c/luatexdir/tex/linebreak.c
index 3da4b1386a0..646a5a771f7 100644
--- a/Build/source/texk/web2c/luatexdir/tex/linebreak.c
+++ b/Build/source/texk/web2c/luatexdir/tex/linebreak.c
@@ -1813,10 +1813,19 @@ static void ext_try_break(
}
/*tex
- Direct calculation of the absolute value of ((|fit_class| - |fitness(r)|) > 1) where
- |fitness(r)| is an unsigned integral type can lead to unexpected results if
- |fitness(r)| is not an |int|, due to the rules of integer promotions.
- It's better to use the equivalent expanded expression.
+ Direct calculation of the absolute value in ((|fit_class| - |fitness(r)|) > 1)
+ can lead to unexpected results even if the type of the members of |fit_class|, which is |int|
+ (see C99 §6.7.2.2), and the integer promotion rules for |fitness(r)|, whose also
+ give an |int| type, should set the expression as substraction between two |int|.
+ In this case GCC set the type of |fit_class| to |unsigned int| (perhaps because the members are all positives?)
+ and hence the expression is converted to a sum of |unsigned int|, leading to a different result.
+ The choice of type is implementation-defined, as stated in C99 §6.7.2.2.4:
+
+ "Each enumerated type shall be compatible with char, a signed integer type, or an unsigned integer type.
+ The choice of type is implementation-defined, but shall be capable of representing the values
+ of all the members of the enumeration."
+
+ It's better to use the equivalent expanded expression.
*/
if ( (fit_class>(fitness(r)+1)) || (fitness(r)>(fit_class+1)) )
d = d + adj_demerits;
diff --git a/Build/source/texk/web2c/luatexdir/tex/maincontrol.c b/Build/source/texk/web2c/luatexdir/tex/maincontrol.c
index f68f9e7ad76..22f601ba275 100644
--- a/Build/source/texk/web2c/luatexdir/tex/maincontrol.c
+++ b/Build/source/texk/web2c/luatexdir/tex/maincontrol.c
@@ -3824,8 +3824,6 @@ void open_or_close_in(void)
if (cur_cmd != left_brace_cmd) {
/*tex Set |cur_name| to desired file name. */
scan_file_name();
- if (cur_ext == get_nullstr())
- cur_ext = maketexstring(".tex");
} else {
scan_file_name_toks();
}
diff --git a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c
index cbc77e556fa..c6f82d56052 100644
--- a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c
+++ b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c
@@ -437,6 +437,8 @@ void ext_post_line_break(int paragraph_dir,
} else {
cur_indent = varmem[(par_shape_ptr + 2 * cur_line)].cint;
cur_width = varmem[(par_shape_ptr + 2 * cur_line + 1)].cint;
+ /* needs checking */
+ cur_indent = swap_parshape_indent(cur_indent,cur_width);
}
adjust_tail = adjust_head;
pre_adjust_tail = pre_adjust_head;
diff --git a/Build/source/texk/web2c/luatexdir/tex/texmath.c b/Build/source/texk/web2c/luatexdir/tex/texmath.c
index 67f352d40fc..fd04e2a5c11 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texmath.c
+++ b/Build/source/texk/web2c/luatexdir/tex/texmath.c
@@ -1448,8 +1448,7 @@ void set_math_char(mathcodeval mval)
} else {
math_class_to_type(subtype(p),mval.class_value);
}
- vlink(tail) = p;
- tail = p;
+ tail_append(p);
}
}
@@ -1474,8 +1473,7 @@ void math_char_in_text(mathcodeval mval)
back_input();
} else {
p = new_char(fam_fnt(mval.family_value, text_size), mval.character_value);
- vlink(tail) = p;
- tail = p;
+ tail_append(p);
}
}
diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.c b/Build/source/texk/web2c/luatexdir/tex/texnodes.c
index e0bf1522749..6f1a6280eee 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texnodes.c
+++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.c
@@ -2220,7 +2220,7 @@ static void flush_node_wrapup_core(halfword p)
case 'd':
break;
case 'l':
- free_user_lua(user_node_value(p));
+ free_user_lua(p);
break;
case 'n':
flush_node_list(user_node_value(p));
@@ -2499,6 +2499,7 @@ static void check_node_wrapup_core(halfword p)
break;
case 's':
case 'd':
+ case 'l':
break;
default:
confusion("unknown user node type");
diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.c b/Build/source/texk/web2c/luatexdir/tex/textoken.c
index 609eae8104b..a59e650df42 100644
--- a/Build/source/texk/web2c/luatexdir/tex/textoken.c
+++ b/Build/source/texk/web2c/luatexdir/tex/textoken.c
@@ -76,7 +76,7 @@ unsigned fix_mem_max;
/*tex how much memory is in use */
-int var_used, dyn_used;
+int dyn_used;
/*tex head of the list of available one-word nodes */