diff options
author | Marius <mariausol@gmail.com> | 2012-11-12 18:20:22 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-11-12 18:20:22 +0200 |
commit | 2f3268bacfd74738c63390f4b9e3f2266ef29694 (patch) | |
tree | 2f4aa0adff045fb3dad67b2fb1e6f427ff7815d7 /scripts | |
parent | 049b3c22a9db6218bf934d77356cc2d397fe5078 (diff) | |
download | context-2f3268bacfd74738c63390f4b9e3f2266ef29694.tar.gz |
beta 2012.11.12 17:10
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 13 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 13 | ||||
-rw-r--r-- | scripts/context/stubs/unix/mtxrun | 13 |
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 100644 --- 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 "." |