diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2024-12-21 20:35:02 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2024-12-21 20:35:02 +0000 |
commit | 8a0bb23a585990c80eb6b2c7747454b620e49924 (patch) | |
tree | 4562a6c4e12a4a3cb6df8239122e17a720920154 /Build | |
parent | ad4dc133d9b24f8ee5b2ba4f045441aaecc9c662 (diff) |
\globaldefs: more tracing (H.Hagen). LuaTeX 1.19.1
git-svn-id: svn://tug.org/texlive/trunk@73179 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex.c | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex_svnversion.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/maincontrol.c | 52 |
4 files changed, 50 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 34a147313f7..84a2b79d46d 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,7 @@ +2024-12-21 Luigi Scarso <luigi.scarso@gmail.com> + * \globaldefs: more tracing (H.Hagen) + * LuaTeX 1.19.1 + 2024-11-02 Luigi Scarso <luigi.scarso@gmail.com> * Fixed a memory leak in token.put_next() (thanks to user202729@protonmail.com) * Fixed a memory leak in token.set_macro() implementation (thanks to user202729@protonmail.com) diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c index 11d1ad08d51..adad229b269 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.c +++ b/Build/source/texk/web2c/luatexdir/luatex.c @@ -33,8 +33,8 @@ */ int luatex_version = 119; -int luatex_revision = '9'; -const char *luatex_version_string = "1.19.0"; +int luatex_revision = '1'; +const char *luatex_version_string = "1.19.1"; const char *engine_name = my_name; #include <kpathsea/c-ctype.h> diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h index 1216908b078..9a4d31d574e 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 7628 +#define luatex_svn_revision 7629 #endif diff --git a/Build/source/texk/web2c/luatexdir/tex/maincontrol.c b/Build/source/texk/web2c/luatexdir/tex/maincontrol.c index 5be4577ad38..7c00f003047 100644 --- a/Build/source/texk/web2c/luatexdir/tex/maincontrol.c +++ b/Build/source/texk/web2c/luatexdir/tex/maincontrol.c @@ -2685,6 +2685,17 @@ halfword swap_parshape_indent(halfword indentation, halfword width, halfword sha */ +/* + +\def\foo{0} {\tracingcommands2 \tracingonline2 \globaldefs 1 \global\def \foo{1}} \foo 1 \par +\def\foo{0} {\tracingcommands2 \tracingonline2 \globaldefs 1 \def \foo{2}} \foo 2 \par % {\global enforced} +\def\foo{0} {\tracingcommands2 \tracingonline2 \globaldefs 0 \def \foo{4}} \foo 0 \par +\def\foo{0} {\tracingcommands2 \tracingonline2 \globaldefs 0 \gdef\foo{4}} \foo 4 \par +\def\foo{0} {\tracingcommands2 \tracingonline2 \globaldefs-1 \global\def \foo{3}} \foo 0 \par % {\global canceled} +\def\foo{0} {\tracingcommands2 \tracingonline2 \globaldefs-1 \gdef\foo{4}} \foo 0 \par % {\global canceled} + +*/ + void prefixed_command(void) { int a; /* accumulated prefix codes so far */ @@ -2743,13 +2754,35 @@ void prefixed_command(void) /*tex Adjust for the setting of \.{\\globaldefs} */ - if (global_defs_par != 0) { - if (global_defs_par < 0) { - if (is_global(a)) - a = a - 4; - } else { - if (!is_global(a)) - a = a + 4; + /* if (global_defs_par != 0) { */ + /* if (global_defs_par < 0) { */ + /* if (is_global(a)) */ + /* a = a - 4; */ + /* } else { */ + /* if (!is_global(a)) */ + /* a = a + 4; */ + /* } */ + /* } */ + if (cur_cmd == def_cmd && odd(cur_chr) && ! is_global(a)) { + a += 4; + } + if (global_defs_par < 0) { + if (is_global(a)) { + a -= 4; + if (tracing_commands_par > 1) { + begin_diagnostic(); + tprint_nl("{\\global canceled}"); + end_diagnostic(false); + } + } + } else if (global_defs_par > 0) { + if (! is_global(a)) { + a += 4; + if (tracing_commands_par > 1) { + begin_diagnostic(); + tprint_nl("{\\global enforced}"); + end_diagnostic(false); + } } } switch (cur_cmd) { @@ -2766,8 +2799,9 @@ void prefixed_command(void) definition is supposed to be global, and |cur_chr>=2| if the definition is supposed to be expanded. */ - if (odd(cur_chr) && !is_global(a) && (global_defs_par >= 0)) - a = a + 4; + /* if (odd(cur_chr) && !is_global(a) && (global_defs_par >= 0)) { */ + /* a = a + 4; */ + /* } */ e = (cur_chr >= 2); get_r_token(); p = cur_cs; |