summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/util-env.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-02-27 16:48:07 +0000
committerKarl Berry <karl@freefriends.org>2024-02-27 16:48:07 +0000
commitff3b6d10a05ce9bffa52a27ffa6e11e5ecf22c72 (patch)
tree35152df3770855d042b005decdfa9d63b686f446 /Master/texmf-dist/tex/context/base/mkiv/util-env.lua
parent4624d267ff83f197bbce4cf296d291465069296c (diff)
context 2024.02.27 09:18, and luametatex
git-svn-id: svn://tug.org/texlive/trunk@70189 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/util-env.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/util-env.lua49
1 files changed, 28 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-env.lua b/Master/texmf-dist/tex/context/base/mkiv/util-env.lua
index dde76587486..c98cd5f1335 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/util-env.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/util-env.lua
@@ -15,12 +15,14 @@ local concat, insert, remove = table.concat, table.insert, table.remove
environment = environment or { }
local environment = environment
--- locales are a useless feature in and even dangerous for luatex
-
-local setlocale = os.setlocale
-
-setlocale(nil,nil) -- setlocale("all","C")
+-- -- These locales are a useless feature in and even dangerous for luatex, so
+-- -- we just ignore them. We used to warn but I assume no one needs it anyway
+-- -- so let's save some bytes.
+-- local setlocale = os.setlocale
+--
+-- setlocale(nil,nil) -- setlocale("all","C")
+--
-- function os.resetlocale()
-- setlocale(nil,nil)
-- end
@@ -53,21 +55,25 @@ setlocale(nil,nil) -- setlocale("all","C")
-- end
-- end
-local report = logs.reporter("system")
-
-function os.setlocale(a,b)
- if a or b then
- if report then
- report()
- report("You're messing with os.locale in a supposedly locale neutral enviroment. From")
- report("now on are on your own and without support. Crashes or unexpected side effects")
- report("can happen but don't bother the luatex and context developer team with it.")
- report()
- report = nil
- end
- setlocale(a,b)
- end
-end
+-- local report = logs.reporter("system")
+--
+-- function os.setlocale(a,b)
+-- if a or b then
+-- if report then
+-- report()
+-- report("You're messing with os.setlocale in a supposedly locale neutral enviroment. From")
+-- report("now on are on your own and without support. Crashes or unexpected side effects")
+-- report("can happen but don't bother the luatex and context developer team with it.")
+-- report()
+-- report = nil
+-- end
+-- setlocale(a,b)
+-- end
+-- end
+
+-- It's time to get rid of it:
+
+os.setlocale(nil,nil) function os.setlocale() end
-- dirty tricks (we will replace the texlua call by luatex --luaonly)
@@ -191,7 +197,8 @@ end
-- a registration of arguments so from now on we have 'partial'
function environment.getargument(name,partial)
- local arguments, sortedflags = environment.arguments, environment.sortedflags
+ local arguments = environment.arguments
+ local sortedflags = environment.sortedflags
if arguments[name] then
return arguments[name]
elseif partial then