summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-11-12 17:10:00 +0100
committerHans Hagen <pragma@wxs.nl>2012-11-12 17:10:00 +0100
commitec5b3fac84c9df82a073b18a1c70038ce41f325b (patch)
tree656c64a80f33a66e86d1b2937bbe721460257673 /scripts
parent45a97c1060f2edcb0556e36950b2bc0f549af0ae (diff)
downloadcontext-ec5b3fac84c9df82a073b18a1c70038ce41f325b.tar.gz
beta 2012.11.12 17:10
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua13
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua13
-rwxr-xr-xscripts/context/stubs/unix/mtxrun13
3 files changed, 27 insertions, 12 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 114d2ef0c..7a721829e 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -1185,10 +1185,11 @@ function table.unique(old)
return new
end
--- function table.sorted(t,...)
--- table.sort(t,...)
--- return t -- still sorts in-place
--- end
+function table.sorted(t,...)
+ sort(t,...)
+ return t -- still sorts in-place
+end
+
end -- of closure
@@ -15009,6 +15010,10 @@ prefixes.home = function(str)
end
local function toppath()
+ local inputstack = resolvers.inputstack -- dependency, actually the code should move but it's
+ if not inputstack then -- more convenient to keep it here
+ return "."
+ end
local pathname = dirname(inputstack[#inputstack] or "")
if pathname == "" then
return "."
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 114d2ef0c..7a721829e 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -1185,10 +1185,11 @@ function table.unique(old)
return new
end
--- function table.sorted(t,...)
--- table.sort(t,...)
--- return t -- still sorts in-place
--- end
+function table.sorted(t,...)
+ sort(t,...)
+ return t -- still sorts in-place
+end
+
end -- of closure
@@ -15009,6 +15010,10 @@ prefixes.home = function(str)
end
local function toppath()
+ local inputstack = resolvers.inputstack -- dependency, actually the code should move but it's
+ if not inputstack then -- more convenient to keep it here
+ return "."
+ end
local pathname = dirname(inputstack[#inputstack] or "")
if pathname == "" then
return "."
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 114d2ef0c..7a721829e 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -1185,10 +1185,11 @@ function table.unique(old)
return new
end
--- function table.sorted(t,...)
--- table.sort(t,...)
--- return t -- still sorts in-place
--- end
+function table.sorted(t,...)
+ sort(t,...)
+ return t -- still sorts in-place
+end
+
end -- of closure
@@ -15009,6 +15010,10 @@ prefixes.home = function(str)
end
local function toppath()
+ local inputstack = resolvers.inputstack -- dependency, actually the code should move but it's
+ if not inputstack then -- more convenient to keep it here
+ return "."
+ end
local pathname = dirname(inputstack[#inputstack] or "")
if pathname == "" then
return "."