summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2021-12-31 10:38:50 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2021-12-31 10:38:50 +0000
commitcb71b62afd23fc35a04304858ee2d221b8a51dcb (patch)
tree17511b8aa9976f8420b25c24dc1060b65074257c /Build/source/texk/web2c/luatexdir/lua
parentc46a6d281af96d35e0b0efa75a7aafac88677a8a (diff)
sync luatex with upstream r7476.
git-svn-id: svn://tug.org/texlive/trunk@61453 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lnodelib.c40
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/loslibext.c12
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luatex-api.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luatoken.c2
4 files changed, 56 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
index 0cd68038415..1ff36bc955c 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
@@ -4548,7 +4548,7 @@ static void lua_nodelib_getfield_whatsit(lua_State * L, int n, const char *s)
} else if (lua_key_eq(s, named_id)) {
lua_pushinteger(L, pdf_action_named_id(n));
} else if (lua_key_eq(s, action_id)) {
- if (pdf_action_named_id(n) == 1) {
+ if (pdf_action_named_id(n) & 1) {
tokenlist_to_luastring(L, pdf_action_id(n));
} else {
lua_pushinteger(L, pdf_action_id(n));
@@ -4559,6 +4559,14 @@ static void lua_nodelib_getfield_whatsit(lua_State * L, int n, const char *s)
lua_pushinteger(L, pdf_action_new_window(n));
} else if (lua_key_eq(s, data)) {
tokenlist_to_luastring(L, pdf_action_tokens(n));
+ } else if (lua_key_eq(s, struct_id)) {
+ if (pdf_action_struct_id(n) == null) {
+ lua_pushnil(L);
+ } else if (pdf_action_named_id(n) & 2) {
+ tokenlist_to_luastring(L, pdf_action_struct_id(n));
+ } else {
+ lua_pushinteger(L, pdf_action_struct_id(n));
+ }
} else {
lua_pushnil(L);
}
@@ -5320,7 +5328,7 @@ static void lua_nodelib_direct_getfield_whatsit(lua_State * L, int n, const char
} else if (lua_key_eq(s, named_id)) {
lua_pushinteger(L, pdf_action_named_id(n));
} else if (lua_key_eq(s, action_id)) {
- if (pdf_action_named_id(n) == 1) {
+ if (pdf_action_named_id(n) & 1) {
tokenlist_to_luastring(L, pdf_action_id(n));
} else {
lua_pushinteger(L, pdf_action_id(n));
@@ -5331,6 +5339,14 @@ static void lua_nodelib_direct_getfield_whatsit(lua_State * L, int n, const char
lua_pushinteger(L, pdf_action_new_window(n));
} else if (lua_key_eq(s, data)) {
tokenlist_to_luastring(L, pdf_action_tokens(n));
+ } else if (lua_key_eq(s, struct_id)) {
+ if (pdf_action_struct_id(n) == null) {
+ lua_pushnil(L);
+ } else if (pdf_action_named_id(n) & 2) {
+ tokenlist_to_luastring(L, pdf_action_struct_id(n));
+ } else {
+ lua_pushinteger(L, pdf_action_struct_id(n));
+ }
} else {
lua_pushnil(L);
}
@@ -6714,7 +6730,7 @@ static int lua_nodelib_setfield_whatsit(lua_State * L, int n, const char *s)
} else if (lua_key_eq(s, named_id)) {
pdf_action_named_id(n) = (quarterword) lua_tointeger(L, 3);
} else if (lua_key_eq(s, action_id)) {
- if (pdf_action_named_id(n) == 1) {
+ if (pdf_action_named_id(n) & 1) {
pdf_action_id(n) = nodelib_gettoks(L, 3);
} else {
pdf_action_id(n) = (halfword) lua_tointeger(L, 3);
@@ -6725,6 +6741,14 @@ static int lua_nodelib_setfield_whatsit(lua_State * L, int n, const char *s)
pdf_action_new_window(n) = (halfword) lua_tointeger(L, 3);
} else if (lua_key_eq(s, data)) {
pdf_action_tokens(n) = nodelib_gettoks(L, 3);
+ } else if (lua_key_eq(s, struct_id)) {
+ if (lua_isnil(L, 3)) {
+ pdf_action_struct_id(n) = null;
+ } else if (pdf_action_named_id(n) & 2) {
+ pdf_action_struct_id(n) = nodelib_gettoks(L, 3);
+ } else {
+ pdf_action_struct_id(n) = (halfword) lua_tointeger(L, 3);
+ }
} else {
return nodelib_cantset(L, n, s);
}
@@ -7461,7 +7485,7 @@ static int lua_nodelib_direct_setfield_whatsit(lua_State * L, int n, const char
} else if (lua_key_eq(s, named_id)) {
pdf_action_named_id(n) = (quarterword) lua_tointeger(L, 3);
} else if (lua_key_eq(s, action_id)) {
- if (pdf_action_named_id(n) == 1) {
+ if (pdf_action_named_id(n) & 1) {
pdf_action_id(n) = nodelib_gettoks(L, 3);
} else {
pdf_action_id(n) = (halfword) lua_tointeger(L, 3);
@@ -7472,6 +7496,14 @@ static int lua_nodelib_direct_setfield_whatsit(lua_State * L, int n, const char
pdf_action_new_window(n) = (halfword) lua_tointeger(L, 3);
} else if (lua_key_eq(s, data)) {
pdf_action_tokens(n) = nodelib_gettoks(L, 3);
+ } else if (lua_key_eq(s, struct_id)) {
+ if (lua_isnil(L, 3)) {
+ pdf_action_struct_id(n) = null;
+ } else if (pdf_action_named_id(n) & 2) {
+ pdf_action_struct_id(n) = nodelib_gettoks(L, 3);
+ } else {
+ pdf_action_struct_id(n) = (halfword) lua_tointeger(L, 3);
+ }
} else {
return nodelib_cantset(L, n, s);
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/loslibext.c b/Build/source/texk/web2c/luatexdir/lua/loslibext.c
index 979f724720f..2e6befc2da2 100644
--- a/Build/source/texk/web2c/luatexdir/lua/loslibext.c
+++ b/Build/source/texk/web2c/luatexdir/lua/loslibext.c
@@ -786,6 +786,18 @@ static int uname(struct utsname *uts)
sprintf(uts->release, "build %ld", osver.dwBuildNumber & 0xFFFF);
switch (sysinfo.wProcessorArchitecture) {
+ case PROCESSOR_ARCHITECTURE_AMD64:
+ strcpy(uts->machine, "amd64");
+ break;
+ case PROCESSOR_ARCHITECTURE_ARM:
+ strcpy(uts->machine, "arm");
+ break;
+ case PROCESSOR_ARCHITECTURE_ARM64:
+ strcpy(uts->machine, "arm64");
+ break;
+ case PROCESSOR_ARCHITECTURE_IA64:
+ strcpy(uts->machine, "ia64");
+ break;
case PROCESSOR_ARCHITECTURE_PPC:
strcpy(uts->machine, "ppc");
break;
diff --git a/Build/source/texk/web2c/luatexdir/lua/luatex-api.h b/Build/source/texk/web2c/luatexdir/lua/luatex-api.h
index 5f42bd5895c..c1e618f7a5d 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luatex-api.h
+++ b/Build/source/texk/web2c/luatexdir/lua/luatex-api.h
@@ -565,6 +565,7 @@ make_lua_key(advance);\
make_lua_key(after_assignment);\
make_lua_key(after_display);\
make_lua_key(after_group);\
+make_lua_key(partoken_name);\
make_lua_key(after_output);\
make_lua_key(afterdisplaypenalty);\
make_lua_key(align);\
@@ -1141,6 +1142,7 @@ make_lua_key(streamprovider);\
make_lua_key(stretch);\
make_lua_key(stretch_order);\
make_lua_key(string);\
+make_lua_key(struct_id);\
make_lua_key(style);\
make_lua_key(sub);\
make_lua_key(subfont);\
@@ -1276,6 +1278,7 @@ init_lua_key(advance);\
init_lua_key(after_assignment);\
init_lua_key(after_display);\
init_lua_key(after_group);\
+init_lua_key(partoken_name);\
init_lua_key(after_output);\
init_lua_key(afterdisplaypenalty);\
init_lua_key(align);\
@@ -1839,6 +1842,7 @@ init_lua_key(streamprovider);\
init_lua_key(stretch);\
init_lua_key(stretch_order);\
init_lua_key(string);\
+init_lua_key(struct_id);\
init_lua_key(style);\
init_lua_key(sub);\
init_lua_key(subfont);\
@@ -2036,6 +2040,7 @@ use_lua_key(advance);
use_lua_key(after_assignment);
use_lua_key(after_display);
use_lua_key(after_group);
+use_lua_key(partoken_name);
use_lua_key(after_output);
use_lua_key(afterdisplaypenalty);
use_lua_key(align);
@@ -2612,6 +2617,7 @@ use_lua_key(streamprovider);
use_lua_key(stretch);
use_lua_key(stretch_order);
use_lua_key(string);
+use_lua_key(struct_id);
use_lua_key(style);
use_lua_key(sub);
use_lua_key(subfont);
diff --git a/Build/source/texk/web2c/luatexdir/lua/luatoken.c b/Build/source/texk/web2c/luatexdir/lua/luatoken.c
index 874fbc99a5d..dc2c6b8aaa5 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luatoken.c
+++ b/Build/source/texk/web2c/luatexdir/lua/luatoken.c
@@ -70,6 +70,7 @@ command_item command_names[] = {
{ ignore_spaces_cmd, NULL, 0},
{ after_assignment_cmd, NULL, 0},
{ after_group_cmd, NULL, 0},
+ { partoken_name_cmd, NULL, 0},
{ break_penalty_cmd, NULL, 0},
{ start_par_cmd, NULL, 0},
{ ital_corr_cmd, NULL, 0},
@@ -235,6 +236,7 @@ void l_set_token_data(void)
init_token_key(command_names, ignore_spaces_cmd, ignore_spaces);
init_token_key(command_names, after_assignment_cmd, after_assignment);
init_token_key(command_names, after_group_cmd, after_group);
+ init_token_key(command_names, partoken_name_cmd, partoken_name);
init_token_key(command_names, break_penalty_cmd, break_penalty);
init_token_key(command_names, start_par_cmd, start_par);
init_token_key(command_names, ital_corr_cmd, ital_corr);