summaryrefslogtreecommitdiff
path: root/tex/context/base/core-sys.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/core-sys.lua')
-rw-r--r--tex/context/base/core-sys.lua23
1 files changed, 19 insertions, 4 deletions
diff --git a/tex/context/base/core-sys.lua b/tex/context/base/core-sys.lua
index ddcb6e938..8e4286cae 100644
--- a/tex/context/base/core-sys.lua
+++ b/tex/context/base/core-sys.lua
@@ -11,13 +11,28 @@ local suffix, basename, removesuffix = file.suffix, file.basename, file.removesu
local environment = environment
-function commands.updatefilenames(inputfilename,outputfilename)
- environment.inputfilename = inputfilename or ""
- environment.outputfilename = outputfilename or ""
- environment.jobfilename = inputfilename or tex.jobname or ""
+-- function commands.updatefilenames(inputfilename,outputfilename)
+-- --
+-- environment.jobfilename = inputfilename or tex.jobname or ""
+-- environment.jobfilesuffix = lower(suffix(environment.jobfilename))
+-- --
+-- environment.inputfilename = inputfilename or ""
+-- environment.inputfilebarename = removesuffix(basename(inputfilename))
+-- environment.inputfilesuffix = lower(suffix(inputfilename))
+-- --
+-- environment.outputfilename = outputfilename or ""
+-- end
+
+function commands.updatefilenames(jobname,inputfilename,outputfilename)
+ --
+ environment.jobfilename = jobname or inputfilename or tex.jobname or ""
environment.jobfilesuffix = lower(suffix(environment.jobfilename))
+ --
+ environment.inputfilename = inputfilename or ""
environment.inputfilebarename = removesuffix(basename(inputfilename))
environment.inputfilesuffix = lower(suffix(inputfilename))
+ --
+ environment.outputfilename = outputfilename or environment.inputfilebarename or ""
end
statistics.register("result saved in file", function()