summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-07-30 20:58:50 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-07-30 20:58:50 +0000
commit42d70ab4dea888ef87579e9d8356e533b1936c8b (patch)
tree0fc8a466a5f7c399812461425c0eaa4ed2ecfe16 /Build/source/texk
parenta6f1ddb40c042b11d028d25c768cf5d9f5ca16b7 (diff)
luatex: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@64010 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/luatexdir/lang/texlang.c29
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex_svnversion.h2
3 files changed, 28 insertions, 9 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 70497ad9bfe..9454d04d5ab 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,9 @@
+2022-07-30 Luigi Scarso <luigi.scarso@gmail.com>
+ * Backtrack replace pointer when successive disc in exceptions (H.Hagen)
+
+2022-07-30 Luigi Scarso <luigi.scarso@gmail.com>
+ * Take exception pre/port disc font from wordstart (H.Hagen)
+
2022-05-23 Luigi Scarso <luigi.scarso@gmail.com>
* Fixed mp_begin_iteration (H.Hagen)
diff --git a/Build/source/texk/web2c/luatexdir/lang/texlang.c b/Build/source/texk/web2c/luatexdir/lang/texlang.c
index 67ef25ca1d1..a0d067251b0 100644
--- a/Build/source/texk/web2c/luatexdir/lang/texlang.c
+++ b/Build/source/texk/web2c/luatexdir/lang/texlang.c
@@ -358,7 +358,9 @@ static halfword insert_discretionary(halfword t, halfword pre, halfword post, ha
f = get_cur_font();
}
for (g = pre; g != null; g = vlink(g)) {
- font(g) = f;
+ if (! font(g)) {
+ font(g) = f;
+ }
if (attr != null) {
delete_attribute_ref(node_attr(g));
node_attr(g) = attr;
@@ -366,7 +368,9 @@ static halfword insert_discretionary(halfword t, halfword pre, halfword post, ha
}
}
for (g = post; g != null; g = vlink(g)) {
- font(g) = f;
+ if (! font(g)) {
+ font(g) = f;
+ }
if (attr != null) {
delete_attribute_ref(node_attr(g));
node_attr(g) = attr;
@@ -531,9 +535,14 @@ char *exception_strings(struct tex_language *lang)
The sequence from |wordstart| to |r| can contain only normal characters it
could be faster to modify a halfword pointer and return an integer
+ We now take the font from the wordstart (as in \LUAMETATEX) but leave the
+ rest as it is, because we don't want to break compatibility (end June 2022).
+ We make a copy now of the parent and hope for the best. Backporting would be
+ too intrusive so this has to do. It went unnoticed for ages anyway.
+
*/
-static halfword find_exception_part(unsigned int *j, unsigned int *uword, int len)
+static halfword find_exception_part(unsigned int *j, unsigned int *uword, int len, halfword parent)
{
halfword g = null, gg = null;
register unsigned i = *j;
@@ -541,13 +550,16 @@ static halfword find_exception_part(unsigned int *j, unsigned int *uword, int le
i++;
while (i < (unsigned) len && uword[i + 1] != '}') {
if (g == null) {
- gg = new_char(0, (int) uword[i + 1]);
+ /* gg = new_char(font(parent), (int) uword[i + 1]); */
+ gg = copy_node(parent);
g = gg;
} else {
- halfword s = new_char(0, (int) uword[i + 1]);
+ /* halfword s = new_char(font(parent), (int) uword[i + 1]); */
+ halfword s = copy_node(parent);
couple_nodes(g, s);
- g = vlink(g);
+ g = s;
}
+ character(g) = (int) uword[i + 1];
i++;
}
*j = ++i;
@@ -614,12 +626,12 @@ static void do_exception(halfword wordstart, halfword r, char *replacement)
halfword gg, hh, replace = null;
int repl;
/*tex |pre| */
- gg = find_exception_part(&i, uword, (int) len);
+ gg = find_exception_part(&i, uword, (int) len, wordstart);
if (i == len || uword[i + 1] != '{') {
tex_error("broken pattern 1", PAT_ERROR);
}
/*tex |post| */
- hh = find_exception_part(&i, uword, (int) len);
+ hh = find_exception_part(&i, uword, (int) len, wordstart);
if (i == len || uword[i + 1] != '{') {
tex_error("broken pattern 2", PAT_ERROR);
}
@@ -693,6 +705,7 @@ static void do_exception(halfword wordstart, halfword r, char *replacement)
/*tex check if we have two exceptions in a row */
if (uword[i + 1] == '{') {
i--;
+t = alink(t);
}
} else {
t = vlink(t);
diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
index c143acff89d..0f1c3154a0a 100644
--- a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
+++ b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
@@ -1,4 +1,4 @@
#ifndef luatex_svn_revision_h
#define luatex_svn_revision_h
-#define luatex_svn_revision 7528
+#define luatex_svn_revision 7532
#endif